org.ogf.graap.wsag.samples
Class SampleAgreementFactory

java.lang.Object
  extended by java.util.Observable
      extended by org.ogf.graap.wsag.api.types.WSAGXmlType
          extended by org.ogf.graap.wsag.api.types.AbstractAgreementFactoryType
              extended by org.ogf.graap.wsag.samples.SampleAgreementFactory
All Implemented Interfaces:
AgreementFactory

Deprecated. the framework is customized by agreement actions only

@Deprecated
public class SampleAgreementFactory
extends AbstractAgreementFactoryType
implements AgreementFactory

Sample implementation of an agreement factory.

Author:
Oliver Waeldrich

Constructor Summary
SampleAgreementFactory()
          Deprecated. default constructor
 
Method Summary
 Agreement createAgreement(AgreementOffer offer)
          Deprecated. Creates a new agreement based on an offer.
 AgreementTemplateType[] getTemplates()
          Deprecated. 
 Negotiation initiateNegotiation(NegotiationContextType context, org.apache.xmlbeans.XmlObject[] criticalExtensions, org.apache.xmlbeans.XmlObject[] nonCriticalExtensions, Map<String,Object> environment)
          Deprecated. Initializes a new negotiation instance.
 
Methods inherited from class org.ogf.graap.wsag.api.types.AbstractAgreementFactoryType
addNewTemplate, getTemplateArray, getXMLObject, initialize, setTemplateArray, setTemplateArray, sizeOfTemplateArray, validate
 
Methods inherited from class org.ogf.graap.wsag.api.types.WSAGXmlType
processTemplate, validate
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleAgreementFactory

public SampleAgreementFactory()
Deprecated. 
default constructor

Method Detail

getTemplates

public AgreementTemplateType[] getTemplates()
Deprecated. 

Specified by:
getTemplates in interface AgreementFactory
Overrides:
getTemplates in class AbstractAgreementFactoryType
Returns:
the templates supported by this factory instance

createAgreement

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

Specified by:
createAgreement in interface AgreementFactory
Parameters:
offer - agreement offer
Returns:
the created agreement instance
Throws:
AgreementFactoryException - Indicates that the agreement offer was rejected or another fault occurred.

initiateNegotiation

public Negotiation initiateNegotiation(NegotiationContextType context,
                                       org.apache.xmlbeans.XmlObject[] criticalExtensions,
                                       org.apache.xmlbeans.XmlObject[] nonCriticalExtensions,
                                       Map<String,Object> environment)
                                throws NegotiationFactoryException
Deprecated. 
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.

Specified by:
initiateNegotiation in interface AgreementFactory
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.