org.apache.muse.ws.resource.sg
Interface ServiceGroup

All Superinterfaces:
Capability, Initialization, InitializationParameters, Shutdown, WsResourceCapability
All Known Implementing Classes:
SimpleServiceGroup

public interface ServiceGroup
extends WsResourceCapability

ServiceGroup is an internal representation of the WSDM ServiceGroup capability. It provides access to the service group properties along with methods for creating, destroying, and querying entries. Resources that use this capability will have the ability to act as directories for other resources while still performing other functions.

Author:
Dan Jemiolo (danj)

Field Summary
static QName[] PROPERTIES
           
 
Method Summary
 WsResource addEntry(EndpointReference memberEPR, Element content, Date termination)
          Creates a new Entry resource and adds it to Muse's ResourceManager and the ServiceGroup's WS-RP container.
 WsResource addEntry(EndpointReference memberEPR, WsResource entry)
          Adds the EPR/resource mapping to the implementation's collection of service group entries.
 void deleteProperty(QName property)
           
 QName[] getContentElements()
           
 WsResource[] getEntry()
           
 WsResource getEntry(EndpointReference memberEPR)
           
 MembershipContentRule[] getMembershipContentRule()
           
 Element[] getProperty(QName property)
           
 QName[] getPropertyNames()
          Concrete capability classes that define properties MUST override this method and provide the names of the properties.
 void insertProperty(QName property, Element[] values)
           
 boolean isMatch(EndpointReference epr)
           
 void removeEntry(WsResource entry)
           
 void setMembershipContentRule(MembershipContentRule[] mcr)
           
 void updateProperty(QName property, Element[] values)
           
 
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, initialize
 
Methods inherited from interface org.apache.muse.core.InitializationParameters
getInitializationParameter, getInitializationParameters, setInitializationParameters
 
Methods inherited from interface org.apache.muse.core.Shutdown
hasBeenShutdown, shutdown
 

Field Detail

PROPERTIES

static final QName[] PROPERTIES
Method Detail

addEntry

WsResource addEntry(EndpointReference memberEPR,
                    Element content,
                    Date termination)
                    throws AddRefusedFault,
                           ContentCreationFailedFault,
                           UnsupportedMemberInterfaceFault,
                           BaseFault
Creates a new Entry resource and adds it to Muse's ResourceManager and the ServiceGroup's WS-RP container.

Parameters:
memberEPR - The EPR of the resource that the Entry will represent.
termination - The initial termination time for the Entry. This may be null if the Entry is not scheduled for destruction.
Returns:
The newly-created (and stored) Entry resource.
Throws:
AddRefusedFault
ContentCreationFailedFault
UnsupportedMemberInterfaceFault
BaseFault

addEntry

WsResource addEntry(EndpointReference memberEPR,
                    WsResource entry)
                    throws AddRefusedFault,
                           ContentCreationFailedFault,
                           UnsupportedMemberInterfaceFault,
                           BaseFault
Adds the EPR/resource mapping to the implementation's collection of service group entries.

Parameters:
memberEPR - The EPR of the service group entry.
entry - The resource that represents the service group entry.
Returns:
The same resource provided as a second parameter.
Throws:
AddRefusedFault
ContentCreationFailedFault
UnsupportedMemberInterfaceFault
BaseFault

getContentElements

QName[] getContentElements()
                           throws BaseFault
Returns:
All of the content elements in the group's membership content rules.
Throws:
BaseFault

getEntry

WsResource[] getEntry()
                      throws BaseFault
Throws:
BaseFault

getEntry

WsResource getEntry(EndpointReference memberEPR)
                    throws BaseFault
Parameters:
memberEPR -
Returns:
The entry resource associated with the given EPR, or null if no such resource exists.
Throws:
BaseFault

getMembershipContentRule

MembershipContentRule[] getMembershipContentRule()
                                                 throws BaseFault
Throws:
BaseFault

isMatch

boolean isMatch(EndpointReference epr)
                throws BaseFault
Parameters:
epr - The EPR for the resource against which all the service group's membership content rules should be evaluated.
Returns:
True if the given resource's WS-RP document matches all of the service group's membership rules and can be safely added to the service group.
Throws:
BaseFault

removeEntry

void removeEntry(WsResource entry)
                 throws BaseFault
Throws:
BaseFault

setMembershipContentRule

void setMembershipContentRule(MembershipContentRule[] mcr)
                              throws BaseFault
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.