org.ogf.graap.wsag.api
Interface Agreement

All Known Implementing Classes:
AbstractAgreementType, DatabasePersistentAgreement, ExampleAgreement, MonitorableAgreement, PendingAgreement, PendingAgreementFacade, PendingAgreementImpl, SampleAgreement, SampleAgreement, SampleMonitoredAgreement, SimpleMonitoredAgreement

public interface Agreement

Agreement interface used by the server module. It provides the required methods to access the properties of the agreement and to terminate the agreement instance. Moreover, it provides access to the domains-specific agreement implementation via the getAgreementInstance() method.

Author:
Oliver Waeldrich
See Also:
AgreementFactory

Method Summary
 String getAgreementId()
          Returns the agreement id.
 AbstractAgreementType getAgreementInstance()
          Returns a domain-specific agreement implementation.
 AgreementContextType getContext()
           
 GuaranteeTermStateType[] getGuaranteeTermStates()
           
 String getName()
          Returns the agreement name.
 ServiceTermStateType[] getServiceTermStates()
           
 AgreementStateType getState()
           
 TermTreeType getTerms()
           
 void terminate(TerminateInputType reason)
          Terminates an agreement.
 

Method Detail

getName

String getName()
Returns the agreement name.

Returns:
the agreement name

getAgreementId

String getAgreementId()
Returns the agreement id.

Returns:
the agreement id

getAgreementInstance

AbstractAgreementType getAgreementInstance()
Returns a domain-specific agreement implementation. The AbstractAgreementType implements the domain-specific termination method and stored the agreement properties. The AbstractAgreementType.getXMLObject() returns the actual properties of an agreement implementation. These properties must be valid at all time, i.e. if an agreement implementation overrides the getState() method the implementation must make sure that the agreement properties are updated with the returned state.

Returns:
the agreement implementation

getContext

AgreementContextType getContext()
Returns:
the agreement context

getTerms

TermTreeType getTerms()
Returns:
the agreement terms

terminate

void terminate(TerminateInputType reason)
Terminates an agreement.

Parameters:
reason - termination reason

getState

AgreementStateType getState()
Returns:
the agreement state

getGuaranteeTermStates

GuaranteeTermStateType[] getGuaranteeTermStates()
Returns:
the agreement guarantee term states

getServiceTermStates

ServiceTermStateType[] getServiceTermStates()
Returns:
the agreement service term states


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