org.apache.muse.ws.dm.muws
Interface Relationships
- All Superinterfaces:
- Capability, Initialization, InitializationParameters, ManageabilityCapability, Shutdown, WsResourceCapability
- All Known Implementing Classes:
- SimpleRelationships
public interface Relationships
- extends ManageabilityCapability
Relationships is an interface that represents the WSDM Relationships
capability. It provides access to the capability's one resource property
(muws2:Relationship) as well as methods for creating, destroying, and
querying relationships.
The QueryRelationshipsByType operation is exposed here and can be exposed
using the resource's WSDL. The other methods are for internal relationship
management and should not be made public. If one desires to make the
creation or manipulation of relationships possible through public APIs, he
should do so as a side effect of another operation; that is, the generic
methods for manipulation all relationships should remain private,
while individual relationships may be altered using operations created
specifically for that purpose.
- Author:
- Dan Jemiolo (danj)
Methods inherited from interface org.apache.muse.core.Capability |
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence, setResource |
PROPERTIES
static final QName[] PROPERTIES
addRelationship
WsResource addRelationship(String name,
RelationshipType type,
Participant[] participants)
throws BaseFault
- 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.
- Parameters:
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.
- Returns:
- The newly-created (and stored) Relationship resource.
- Throws:
BaseFault
-
- If there was an error during the initialization of the
Relationship resource instance.
- If there was an error inserting into the participant's
WS-RP container.
getRelationship
WsResource[] getRelationship()
throws BaseFault
- Returns:
- The resources that represent the relationships this resource
participates in. This is also the muws2:Relationship property.
The implementation of this capability must provide a means of
converting the WsResource objects into the proper XML format
for WSRP clients.
- Throws:
BaseFault
queryRelationshipsByType
WsResource[] queryRelationshipsByType(QName[] types)
throws BaseFault
- 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). The functional equivalent of this
call would be WS-RP QueryResourceProperties with an XPath query that
tries to match the value of the relationship's muws2:Type field.
- Parameters:
types
- The names of the types of relationships that should be
returned by the query processor.
- Returns:
- An array of resources that can be used to manipulate the
relationships that match the query. The array may be empty.
- Throws:
BaseFault
removeRelationship
void removeRelationship(WsResource relationship)
throws BaseFault
- Deletes the RelationshipResource from the owner's WS-RP container.
- Parameters:
relationship
-
- Throws:
BaseFault
deleteProperty
void deleteProperty(QName property)
throws BaseFault
- Throws:
BaseFault
getProperty
Element[] getProperty(QName property)
throws BaseFault
- Throws:
BaseFault
getPropertyNames
QName[] getPropertyNames()
- Concrete capability classes that define properties MUST override
this method and provide the names of the properties.
- Returns:
- The names of the resource properties defined by this capability.
insertProperty
void insertProperty(QName property,
Element[] values)
throws BaseFault
- Throws:
BaseFault
updateProperty
void updateProperty(QName property,
Element[] values)
throws BaseFault
- Throws:
BaseFault
Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.