Package org.apache.ws.resource.properties

Source Code of org.apache.ws.resource.properties.AbstractSushiService

/*=============================================================================*
*  Copyright 2004 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.ws.resource.properties;

import org.apache.ws.resource.ResourceContext;
import org.apache.ws.resource.properties.v2004_06.porttype.SetResourcePropertiesPortType;
import org.apache.ws.resource.properties.v2004_06.porttype.GetMultipleResourcePropertiesPortType;
import org.apache.ws.resource.properties.v2004_06.porttype.GetResourcePropertyPortType;
import org.apache.ws.resource.properties.v2004_06.porttype.QueryResourcePropertiesPortType;
import org.apache.ws.resource.properties.v2004_06.porttype.impl.GetMultipleResourcePropertiesPortTypeImpl;
import org.apache.ws.resource.properties.v2004_06.porttype.impl.SetResourcePropertiesPortTypeImpl;
import org.apache.ws.resource.properties.v2004_06.porttype.impl.GetResourcePropertyPortTypeImpl;
import org.apache.ws.resource.properties.v2004_06.porttype.impl.QueryResourcePropertiesPortTypeImpl;
import org.apache.ws.resource.handler.SoapMethodNameMap;
import org.apache.ws.resource.handler.WsrfService;
import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesResponseDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument;
import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesResponseDocument;
import javax.xml.namespace.QName;

/**
* @author Sal Campana
*/
public abstract class AbstractSushiService
   implements WsrfService,
        GetResourcePropertyPortType,
        GetMultipleResourcePropertiesPortType,
        SetResourcePropertiesPortType,
        QueryResourcePropertiesPortType
{
   /** DOCUMENT_ME */
   public static final String TARGET_NSURI    = "http://ws.apache.org/resource/sushi";

   /** DOCUMENT_ME */
   public static final String TARGET_NSPREFIX = "fish";

   /**
    * DOCUMENT_ME
    */
   private ServiceSoapMethodNameMap m_methodNameMap;

   /**
    * DOCUMENT_ME
    */
   private boolean isInitialized = false;

   /**
    * DOCUMENT_ME
    *
    * @param requestQname DOCUMENT_ME
    *
    * @return DOCUMENT_ME
    */
   public String getMethodName( QName requestQname )
   {
      if ( !isInitialized )
      {
         init(  );
      }

      return m_methodNameMap.getMethodName( requestQname );
   }

   /**
    * DOCUMENT_ME
    *
    * @return DOCUMENT_ME
    */
   public abstract ResourceContext getResourceContext(  );

   /**
    * DOCUMENT_ME
    *
    * @return DOCUMENT_ME
    */
   public final SoapMethodNameMap getMethodNameMap(  )
   {
      return m_methodNameMap;
   }

   /**
    * DOCUMENT_ME
    *
    * @param requestDoc DOCUMENT_ME
    *
    * @return DOCUMENT_ME
    */
   public GetMultipleResourcePropertiesResponseDocument getMultipleResourceProperties( GetMultipleResourcePropertiesDocument requestDoc )
   {
      return new GetMultipleResourcePropertiesPortTypeImpl( getResourceContext(  ) ).getMultipleResourceProperties( requestDoc );
   }

   /**
    * DOCUMENT_ME
    *
    * @param requestDoc DOCUMENT_ME
    *
    * @return DOCUMENT_ME
    */
   public SetResourcePropertiesResponseDocument setResourceProperties( SetResourcePropertiesDocument requestDoc )
   {
      return new SetResourcePropertiesPortTypeImpl( getResourceContext(  ) ).setResourceProperties( requestDoc );
   }

   /**
    * DOCUMENT_ME
    *
    * @param requestDoc DOCUMENT_ME
    *
    * @return DOCUMENT_ME
    */
   public GetResourcePropertyResponseDocument getResourceProperty( GetResourcePropertyDocument requestDoc )
   {
      return new GetResourcePropertyPortTypeImpl( getResourceContext(  ) ).getResourceProperty( requestDoc );
   }

   /**
    * DOCUMENT_ME
    */
   public void init(  )
   {
      m_methodNameMap    = new ServiceSoapMethodNameMap( getResourceContext(  ) );
      isInitialized      = true;
   }

   /**
    * DOCUMENT_ME
    *
    * @param requestDoc DOCUMENT_ME
    *
    * @return DOCUMENT_ME
    */
   public QueryResourcePropertiesResponseDocument queryResourceProperties( QueryResourcePropertiesDocument requestDoc )
   {
      return new QueryResourcePropertiesPortTypeImpl( getResourceContext(  ) ).queryResourceProperties( requestDoc );
   }

   /**
    * DOCUMENT_ME
    *
    * @return DOCUMENT_ME
    */
   protected final boolean isInitialized(  )
   {
      return isInitialized;
   }
}
TOP

Related Classes of org.apache.ws.resource.properties.AbstractSushiService

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.