org.ogf.graap.wsag.wsrf.impl
Class AgreementFactoryCapability
java.lang.Object
org.apache.muse.core.AbstractCapability
org.apache.muse.ws.resource.impl.AbstractWsResourceCapability
org.ogf.graap.wsag.wsrf.WSAG4JCapability
org.ogf.graap.wsag.wsrf.impl.AgreementFactoryCapability
- All Implemented Interfaces:
- org.apache.muse.core.Capability, org.apache.muse.core.Initialization, org.apache.muse.core.InitializationParameters, org.apache.muse.core.Shutdown, org.apache.muse.ws.resource.WsResourceCapability
public class AgreementFactoryCapability
- extends WSAG4JCapability
Default implementation of the agreement factory port type.
- Author:
- Oliver Waeldrich
Methods inherited from class org.apache.muse.ws.resource.impl.AbstractWsResourceCapability |
createGettersAndSetters, deleteProperty, getGetter, getProperty, getPropertyElements, getSetter, getWsResource, initialize, insertProperty, invokeMethod, setResource, updateProperty |
Methods inherited from class org.apache.muse.core.AbstractCapability |
getActions, getCapabilityURI, getEnvironment, getInitializationParameter, getInitializationParameters, getLog, getMessageHandler, getPersistence, getResource, hasBeenInitialized, hasBeenShutdown, initializeCompleted, 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.core.Capability |
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence |
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 |
AgreementFactoryCapability
public AgreementFactoryCapability()
getPropertyNames
public QName[] getPropertyNames()
- Overrides:
getPropertyNames
in class org.apache.muse.ws.resource.impl.AbstractWsResourceCapability
- Returns:
- the resource property QNames
getTemplate
public Element[] getTemplate()
throws org.apache.muse.ws.resource.faults.ResourceUnknownFault,
org.apache.muse.ws.resource.faults.ResourceUnavailableFault
- Returns:
- the agreement templates exposed by the factory
- Throws:
org.apache.muse.ws.resource.faults.ResourceUnknownFault
- the referenced resource is unknown
org.apache.muse.ws.resource.faults.ResourceUnavailableFault
- the referenced resource is unavailable
createAgreement
public CreateAgreementOutputType createAgreement(CreateAgreementInputDocument inputDoc)
throws AgreementFactoryFault,
org.apache.muse.ws.resource.faults.ResourceUnknownFault,
org.apache.muse.ws.resource.faults.ResourceUnavailableFault
- Creates an agreement for an offer.
- Parameters:
inputDoc
- the agreement offer
- Returns:
- the endpoint of the new created agreement
- Throws:
AgreementFactoryFault
- an AgreementFactoryFault indicates that the agreement offer was rejected
org.apache.muse.ws.resource.faults.ResourceUnknownFault
- the referenced resource is unknown
org.apache.muse.ws.resource.faults.ResourceUnavailableFault
- the referenced resource is unavailable
createPendingAgreement
public CreatePendingAgreementOutputType createPendingAgreement(CreatePendingAgreementInputDocument paInput)
throws AgreementFactoryFault,
org.apache.muse.ws.resource.faults.ResourceUnknownFault,
org.apache.muse.ws.resource.faults.ResourceUnavailableFault
- Creates an agreement for the given offer. The decision of agreement acceptance or rejection is delayed
to a later time. As long the decision was not made, the returned agreement is in the PENDING state.
- Parameters:
paInput
- the agreement offer
- Returns:
- the endpoint to the pending agreement
- Throws:
AgreementFactoryFault
- an error occurred in the agreement creation process
org.apache.muse.ws.resource.faults.ResourceUnknownFault
- the referenced agreement factory is unknown
org.apache.muse.ws.resource.faults.ResourceUnavailableFault
- the referenced agreement factory is unavailable
addNewAgreement
protected EndpointReferenceType addNewAgreement(Agreement agreement,
AgreementWsResource agreementInstance)
throws AgreementFactoryFault,
org.apache.muse.ws.resource.faults.ResourceUnknownFault,
org.apache.muse.ws.resource.faults.ResourceUnavailableFault
- Creates a new Agreement WS-Resource and returns the EPR.
- Parameters:
agreement
- the agreement to add
- Returns:
- the ERP of the added agreement
- Throws:
AgreementFactoryFault
- an error occurred in the agreement creation process
org.apache.muse.ws.resource.faults.ResourceUnknownFault
- the referenced agreement factory is unknown
org.apache.muse.ws.resource.faults.ResourceUnavailableFault
- the referenced agreement factory is unavailable
createPendingAgreementImpl
protected Agreement createPendingAgreementImpl(AgreementOffer offer,
AgreementAcceptanceClient acceptanceClient,
AgreementWsResource agreementResource)
throws AgreementFactoryException,
ResourceUnknownException,
ResourceUnavailableException
- Creates a new pending agreement instance. If an acceptance EPR is provided, the initiator is notified
of the result.
- Parameters:
offer
- the agreement offeracceptanceClient
- the agreement acceptance client
- Returns:
- the created agreement instance
- Throws:
AgreementFactoryException
- indicates that the agreement offer was rejected by the factory
ResourceUnknownException
- the referenced resource is unknown
ResourceUnavailableException
- the referenced resource is unavailable
Copyright © 2008-2012. All Rights Reserved.