|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ogf.graap.wsag.server.api.impl.AbstractAgreementFactory
org.ogf.graap.wsag.server.engine.GenericAgreementFactory
public class GenericAgreementFactory
The GenericAgreementFactory
is the default implementation of an agreement factory. It support
configuration of AgreementFactoryAction
's and automatic offer validation out of the box.
AgreementFactoryAction
Constructor Summary | |
---|---|
GenericAgreementFactory()
|
Method Summary | |
---|---|
Agreement |
createAgreement(AgreementOffer offer)
Creates a new agreement based on an offer. |
TemplateRegistry |
getTemplateRegistry()
The template registry stores the templates of this factory instance along with the associated AgreementFactoryAction . |
AgreementTemplateType[] |
getTemplates()
|
void |
initialize()
Initializes a GenericAgreementFactory instance based on a provided EngineConfiguration. |
Negotiation |
initiateNegotiation(NegotiationContextType context,
org.apache.xmlbeans.XmlObject[] criticalExtensions,
org.apache.xmlbeans.XmlObject[] nonCriticalExtensions,
Map<String,Object> environment)
Initializes a new negotiation instance. |
protected AgreementFactoryAction[] |
loadActions()
Load the agreement factory actions based on the WSAG4J factory configuration. |
Methods inherited from class org.ogf.graap.wsag.server.api.impl.AbstractAgreementFactory |
---|
getEngineConfiguration, getFactoryContext, setEngineConfiguration, setFactoryContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericAgreementFactory()
Method Detail |
---|
protected AgreementFactoryAction[] loadActions() throws Exception
WsagConstants.WSAG4J_FACTORY_CONFIGURATION
.
Exception
- indicates that an error occurred while loading the actionspublic void initialize()
GenericAgreementFactory
instance based on a provided EngineConfiguration. The
initialize method loads the engine configuration, initializes the configured actions, and populates the
action registry.
public Agreement createAgreement(AgreementOffer offer) throws AgreementFactoryException
offer
- agreement offer
AgreementFactoryException
- Indicates that the agreement offer was rejected or another fault occurred.AgreementFactory.createAgreement(org.ogf.graap.wsag.api.AgreementOffer)
public Negotiation initiateNegotiation(NegotiationContextType context, org.apache.xmlbeans.XmlObject[] criticalExtensions, org.apache.xmlbeans.XmlObject[] nonCriticalExtensions, Map<String,Object> environment) throws NegotiationFactoryException
context
- The negotiation context defines the roles and obligations of the negotiating parties.
Furthermore, it defines the nature of the negotiation process (e.g. negotiation or
re-negotiation).criticalExtensions
- Critical extensions must be supported during the negotiation process. If a critical
extension is not understood or supported by the negotiation factory, it must throw an @see
NegotiationFactoryException.nonCriticalExtensions
- Non-critical extensions should be supported during the negotiation process. If a
non-critical extension is not understood or supported by the negotiation factory, it can be
ignored. Alternatively, an @see NegotiationFactoryException could be thrown.environment
- Provides access to additional variables provided by the calling instance. These environment
variables are domain specific.
NegotiationFactoryException
- indicates that an error occurred while instantiating the negotiation processpublic AgreementTemplateType[] getTemplates()
AgreementFactory.getTemplates()
public TemplateRegistry getTemplateRegistry()
AgreementFactoryAction
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |