Package org.apache.muse.ws.resource.properties.set.impl

Source Code of org.apache.muse.ws.resource.properties.set.impl.SimpleSetCapability

/*=============================================================================*
*  Copyright 2006 The Apache Software Foundation
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*=============================================================================*/

package org.apache.muse.ws.resource.properties.set.impl;

import java.lang.reflect.Method;

import org.w3c.dom.Element;

import org.apache.muse.core.routing.MessageHandler;
import org.apache.muse.util.ReflectUtils;
import org.apache.muse.ws.addressing.soap.SoapFault;
import org.apache.muse.ws.resource.basefaults.BaseFault;
import org.apache.muse.ws.resource.impl.AbstractWsResourceCapability;
import org.apache.muse.ws.resource.properties.ResourcePropertyCollection;
import org.apache.muse.ws.resource.properties.set.SetCapability;
import org.apache.muse.ws.resource.properties.set.SetRequest;

/**
*
* SimpleSetCapability is Muse's default implementation of the WS-RP 'set'
* operations - the implementation simply forwards these requests to the
* equivalent methods in {@linkplain ResourcePropertyCollection ResourcePropertyCollection}.
*
* @author Dan Jemiolo (danj)
*
*/

public class SimpleSetCapability
    extends AbstractWsResourceCapability implements SetCapability
{
    protected MessageHandler createSetHandler()
    {
        MessageHandler handler = new SetHandler();
       
        Method method = ReflectUtils.getFirstMethod(getClass(), "setResourceProperties");
        handler.setMethod(method);
       
        return handler;
    }
   
    public void initialize()
        throws SoapFault
    {
        super.initialize();
        setMessageHandler(createSetHandler());
    }

    public Element putResourcePropertyDocument(Element wsrpDoc)
        throws BaseFault
    {
        return getWsResource().getPropertyCollection().putResourcePropertyDocument(wsrpDoc);
    }
   
    public void setResourceProperties(SetRequest request)
        throws BaseFault
    {
        getWsResource().getPropertyCollection().setResourceProperties(request);
    }
}
TOP

Related Classes of org.apache.muse.ws.resource.properties.set.impl.SimpleSetCapability

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.