org.ogf.graap.wsag.server.api.impl
Class AgreementFactoryFacade

java.lang.Object
  extended by org.ogf.graap.wsag.server.api.impl.AbstractAgreementFactory
      extended by org.ogf.graap.wsag.server.api.impl.AgreementFactoryFacade
All Implemented Interfaces:
AgreementFactory, IAgreementFactory, IEngineComponent

public class AgreementFactoryFacade
extends AbstractAgreementFactory

The agreement factory facade is an implementation of a IAgreementFactory. Calls are delegated to an AgreementFactory implementation. This class is used for backward compatibility.

Author:
Oliver Waeldrich

Constructor Summary
AgreementFactoryFacade(AgreementFactory factory)
           
 
Method Summary
 Agreement createAgreement(AgreementOffer offer)
          Creates a new agreement based on an offer.
 AgreementFactory getAgreementFactory()
           
 AgreementTemplateType[] getTemplates()
          
 void initialize()
          
 Negotiation initiateNegotiation(NegotiationContextType context, org.apache.xmlbeans.XmlObject[] criticalExtensions, org.apache.xmlbeans.XmlObject[] nonCriticalExtensions, Map<String,Object> environment)
          Initializes a new negotiation instance.
 
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

AgreementFactoryFacade

public AgreementFactoryFacade(AgreementFactory factory)
Parameters:
factory - the factory implementation
Method Detail

initialize

public void initialize()
                throws Exception

Throws:
Exception - Indicates an error while initializing the engine component.

getAgreementFactory

public AgreementFactory getAgreementFactory()
Returns:
The agreement factory object of this facade.

createAgreement

public Agreement createAgreement(AgreementOffer offer)
                          throws AgreementFactoryException
Creates a new agreement based on an offer.

Parameters:
offer - agreement offer
Returns:
the created agreement instance
Throws:
AgreementFactoryException - Indicates that the agreement offer was rejected or another fault occurred.

getTemplates

public AgreementTemplateType[] getTemplates()

Returns:
the agreement templates exposed by this factory

initiateNegotiation

public Negotiation initiateNegotiation(NegotiationContextType context,
                                       org.apache.xmlbeans.XmlObject[] criticalExtensions,
                                       org.apache.xmlbeans.XmlObject[] nonCriticalExtensions,
                                       Map<String,Object> environment)
                                throws NegotiationFactoryException
Initializes a new negotiation instance. This method creates a new negotiation instance based on the provided negotiation context, taking into account the critical and non-critical extensions.

Parameters:
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.
Returns:
the new initiated negotiation instance
Throws:
NegotiationFactoryException - indicates that an error occurred while instantiating the negotiation process


Copyright © 2008-2012 Fraunhofer Institute SCAI. All Rights Reserved.