Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.muse.ws.resource.impl
Class SimpleWsResource

    java.lang.Object
      org.apache.muse.core.SimpleResource
          org.apache.muse.ws.resource.impl.SimpleWsResource

All Implemented Interfaces:
  org.apache.muse.core.CapabilityContainer, Initialization, InitializationParameters, Resource, Shutdown, WsResource

public class SimpleWsResource
extends SimpleResource
implements WsResource

SimpleResource is Muse's default implementation of a WS-RF-compliant resource (WsResource). It parses the resource's WSDL to find the WSRP document schema and then creates the WSRP state model using Muse's default WSRP implementation. The WSRP implementation class can be modified by overriding the createPropertyCollection() method in this class.

Author:
  Dan Jemiolo (danj)

Constructor Summary
`SimpleWsResource()`

Method Summary
`protected MetadataDescriptor` | `createMetadataDescriptor(org.w3c.dom.Document wsdl)`
`protected ResourcePropertiesSchema` | `createPropertiesSchema(org.w3c.dom.Document wsdl)`
`protected ResourcePropertyCollection` | `createPropertyCollection()` This method returns the concrete WSRP state model - this is not the implementation of the WSRP capabilities (which map SOAP requests to WSRP operations), but it does implement the actual WSRP operations and does the delegation of read/write requests to the capabilities defining the properties.
`ResourcePropertyCollection` | `getPropertyCollection()`
`void` | `initialize()` The SimpleWsResource implementation takes the following steps: Create WSRP state model - createPropertyCollection() Create WSRP document schema and apply it to the collection. Create WSRP metadata and apply it to the collection. Call super.initialize() to initialize capabilities.

Methods inherited from class org.apache.muse.core.SimpleResource
`addCapability, getCapability, getCapabilityActions, getCapabilityForAction, getCapabilityURIs, getContextPath, getEndpointReference, getEnvironment, getInitializationParameter, getInitializationParameters, getLog, getResourceManager, getWsdlPath, getWsdlPortType, hasBeenInitialized, hasBeenShutdown, hasCapability, initializeCapabilities, invoke, setContextPath, setEndpointReference, setEnvironment, setInitializationParameters, setLog, setResourceManager, setWsdlPath, setWsdlPortType, shutdown, shutdownCapabilities, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.apache.muse.core.Resource
`addCapability, getCapability, getCapabilityURIs, getContextPath, getEndpointReference, getEnvironment, getLog, getResourceManager, getWsdlPath, getWsdlPortType, hasCapability, invoke, setContextPath, setEndpointReference, setEnvironment, setLog, setResourceManager, setWsdlPath, setWsdlPortType`

Methods inherited from interface org.apache.muse.core.Initialization
`hasBeenInitialized`

Methods inherited from interface org.apache.muse.core.InitializationParameters
`getInitializationParameter, getInitializationParameters, setInitializationParameters`

Methods inherited from interface org.apache.muse.core.Shutdown
`hasBeenShutdown, shutdown`

Constructor Detail

### SimpleWsResource

    public SimpleWsResource()

Method Detail

### createMetadataDescriptor

    protected MetadataDescriptor createMetadataDescriptor(org.w3c.dom.Document wsdl)

  Parameters:
    `wsdl` - The DOM document holding the resource's WSDL.
  Returns:
    The metadata descriptor referenced in the resource's WSDL, or an 'open' descriptor (no restrictions) if none is found.

### createPropertiesSchema

    protected ResourcePropertiesSchema createPropertiesSchema(org.w3c.dom.Document wsdl)

  Parameters:
    `wsdl` - The DOM document holding the resource's WSDL.
  Returns:
    The WSRP document schema from the WSDL's types section, or an 'open' schema (no restrictions) if none is found.

### createPropertyCollection

    protected ResourcePropertyCollection createPropertyCollection()

  This method returns the concrete WSRP state model - this is not the implementation of the WSRP capabilities (which map SOAP requests to WSRP operations), but it does implement the actual WSRP operations and does the delegation of read/write requests to the capabilities defining the properties. It is available no matter how many of the WSRP capabilites are exposed to remote clients.
  You can replace the default implementation by overriding this method to instantiate a different concrete class. You would then specify the name of your new sub-class using the java-resource-class element in muse.xml.

  Returns:
    An instance of SimpleResourcePropertyCollection.

### getPropertyCollection

    public final ResourcePropertyCollection getPropertyCollection()

  Specified by:
    `getPropertyCollection` in interface `WsResource`
  Returns:
    The internal WSRP state model - despite the fact that this has all of the WSRP operations available, none of them is exposed to remote clients until one or more of the WSRP capabilities is used in the resource's definition.
  See Also:
    `GetCapability`, `QueryCapability`, `SetCapability`

### initialize

    public void initialize()
                    throws SoapFault

  The SimpleWsResource implementation takes the following steps:
  1. Create WSRP state model - createPropertyCollection()
  2. Create WSRP document schema and apply it to the collection.
  3. Create WSRP metadata and apply it to the collection.
  4. Call super.initialize() to initialize capabilities. The WSRP collection is now available to the capabilities during their startup cycle.
  5. Apply metadata by creating components needed to enforce it.
  6. Validate WSRP document according to schema and metadata.

  Specified by:
    `initialize` in interface `Initialization`
  Overrides:
    `initialize` in class `SimpleResource`
  Throws:
    `SoapFault`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD