|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.core.AbstractCapability
org.apache.muse.ws.resource.impl.AbstractWsResourceCapability
org.apache.muse.ws.dm.muws.impl.AbstractManageabilityCapability
org.apache.muse.ws.dm.muws.impl.SimpleRelationships
public class SimpleRelationships
SimpleRelationships is Muse's default implementation of the MUWS (Part 2) Relationships capability. It performs the following tasks:
Field Summary |
---|
Fields inherited from interface org.apache.muse.ws.dm.muws.Relationships |
---|
PROPERTIES |
Constructor Summary | |
---|---|
SimpleRelationships()
|
Method Summary | |
---|---|
WsResource |
addRelationship(String name,
RelationshipType type,
Participant[] participants)
Creates a new Relationship resource with the given values, adds it to the ResourceManager and the participant resources' WS-RP container, and returns it to the caller. |
protected MessageHandler |
createQueryHandler()
|
protected WsResource |
createRelationship(Element xml)
This method reads the relationship fields from the XML and forwards them to createRelationship(String, RelationshipType, Participant[]). |
protected WsResource |
createRelationship(String name,
RelationshipType type,
Participant[] participants)
Creates a new relationship resource with the given fields, initializes it, and adds it to the ResourceManager before returning it. |
void |
deleteProperty(QName property)
|
Element[] |
getProperty(QName propertyName)
|
QName[] |
getPropertyNames()
Concrete capability classes that define properties MUST override this method and provide the names of the properties. |
WsResource[] |
getRelationship()
|
protected String |
getRelationshipContextPath()
|
protected Element[] |
getRelationshipElements()
This method converts the WsResource[] returned by getRelationship() into an Element[] with muws2:Relationship XML that is compliant with the MUWS Part 2 spec. |
void |
initialize()
AbstractWsResourceCapability continues the initialization process by inspecting the concrete class to find all of the getters (and, if applicable, setters) for its resource properties. |
void |
insertProperty(QName property,
Element[] values)
|
WsResource[] |
queryRelationshipsByType(QName[] types)
This method is defined by MUWS Part 2 in order to optimize the query of a resource property that will often have a large number of instances (which would make XPath-like queries and catch-all Get requests a performance bottleneck). |
void |
removeRelationship(WsResource relationship)
Deletes the RelationshipResource from the owner's WS-RP container. |
void |
updateProperty(QName property,
Element[] values)
|
Methods inherited from class org.apache.muse.ws.dm.muws.impl.AbstractManageabilityCapability |
---|
initializeCompleted |
Methods inherited from class org.apache.muse.ws.resource.impl.AbstractWsResourceCapability |
---|
createGettersAndSetters, deleteProperty, getGetter, getPropertyElements, getSetter, getWsResource, insertProperty, invokeMethod, setResource, updateProperty |
Methods inherited from class org.apache.muse.core.AbstractCapability |
---|
getActions, getCapabilityURI, getEnvironment, getInitializationParameter, getInitializationParameters, getLog, getMessageHandler, getPersistence, getResource, hasBeenInitialized, hasBeenShutdown, prepareShutdown, setCapabilityURI, setEnvironment, setInitializationParameters, setLog, setMessageHandler, setMessageHandlers, setPersistence, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.muse.ws.resource.WsResourceCapability |
---|
getWsResource |
Methods inherited from interface org.apache.muse.core.Capability |
---|
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence, setResource |
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 |
---|
public SimpleRelationships()
Method Detail |
---|
public WsResource addRelationship(String name, RelationshipType type, Participant[] participants) throws BaseFault
Relationships
addRelationship
in interface Relationships
name
- The descriptive name of the new relationship.type
- The XSD-defined type of the new relationship.participants
- The participant resources for the relationship. The array
must have a length of at least 2.
BaseFault
- protected MessageHandler createQueryHandler()
protected WsResource createRelationship(Element xml) throws BaseFault
BaseFault
protected WsResource createRelationship(String name, RelationshipType type, Participant[] participants) throws BaseFault
BaseFault
public Element[] getProperty(QName propertyName) throws BaseFault
getProperty
in class AbstractWsResourceCapability
BaseFault
public QName[] getPropertyNames()
getPropertyNames
in class AbstractWsResourceCapability
public WsResource[] getRelationship()
getRelationship
in interface Relationships
protected String getRelationshipContextPath()
protected Element[] getRelationshipElements()
public void initialize() throws SoapFault
AbstractWsResourceCapability
initialize
in interface Initialization
initialize
in class AbstractWsResourceCapability
SoapFault
public WsResource[] queryRelationshipsByType(QName[] types) throws BaseFault
Relationships
queryRelationshipsByType
in interface Relationships
types
- The names of the types of relationships that should be
returned by the query processor.
BaseFault
public void removeRelationship(WsResource relationship)
Relationships
removeRelationship
in interface Relationships
public void deleteProperty(QName property) throws BaseFault
BaseFault
public void insertProperty(QName property, Element[] values) throws BaseFault
BaseFault
public void updateProperty(QName property, Element[] values) throws BaseFault
BaseFault
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |