org.ogf.graap.wsag.client.local
Class LocalAgreementServiceImpl

java.lang.Object
  extended by org.ogf.graap.wsag.client.local.LocalWsClient
      extended by org.ogf.graap.wsag.client.local.LocalAgreementServiceImpl
All Implemented Interfaces:
AgreementService, WsClient

public class LocalAgreementServiceImpl
extends LocalWsClient
implements AgreementService

Implementation of the WSAG4J client API for accessing local agreement instances.

Author:
Oliver Waeldrich

Constructor Summary
LocalAgreementServiceImpl(Agreement agreement)
           
 
Method Summary
 void destroy()
          Destroys agreement instance.
 String getAgreementId()
          Returns the id of the agreement instance.
 AgreementContextType getContext()
          Returns the context of the agreement instance.
 GuaranteeTermStateType[] getGuaranteeTermStates()
          Returns the state for the individual guarantee terms of the agreement instance.
 String getName()
          Returns the name of the agreement instance.
 ServiceTermStateType[] getServiceTermStates()
          Returns the state for the individual service terms of the agreement instance.
 AgreementStateType getState()
          Returns the state of the agreement instance.
 TermTreeType getTerms()
          Returns the terms of the agreement instance.
 void terminate(TerminateInputType reason)
          Terminates the agreement instance.
 
Methods inherited from class org.ogf.graap.wsag.client.local.LocalWsClient
getEndpoint, getProperties, getSecurityProperties, getWebServiceClient, isUsingTrace, setProperties, setTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ogf.graap.wsag.api.client.AgreementService
getWebServiceClient
 

Constructor Detail

LocalAgreementServiceImpl

public LocalAgreementServiceImpl(Agreement agreement)
Parameters:
agreement - the local agreement instance
Method Detail

getAgreementId

public String getAgreementId()
                      throws ResourceUnknownException,
                             ResourceUnavailableException
Returns the id of the agreement instance.

Specified by:
getAgreementId in interface AgreementService
Returns:
the agreement id
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getContext

public AgreementContextType getContext()
                                throws ResourceUnknownException,
                                       ResourceUnavailableException
Returns the context of the agreement instance.

Specified by:
getContext in interface AgreementService
Returns:
the agreement context
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getGuaranteeTermStates

public GuaranteeTermStateType[] getGuaranteeTermStates()
                                                throws ResourceUnknownException,
                                                       ResourceUnavailableException
Returns the state for the individual guarantee terms of the agreement instance.

Specified by:
getGuaranteeTermStates in interface AgreementService
Returns:
the guarantee term states
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getName

public String getName()
               throws ResourceUnknownException,
                      ResourceUnavailableException
Returns the name of the agreement instance.

Specified by:
getName in interface AgreementService
Returns:
the agreement name
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getServiceTermStates

public ServiceTermStateType[] getServiceTermStates()
                                            throws ResourceUnknownException,
                                                   ResourceUnavailableException
Returns the state for the individual service terms of the agreement instance.

Specified by:
getServiceTermStates in interface AgreementService
Returns:
the service term states
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getState

public AgreementStateType getState()
                            throws ResourceUnknownException,
                                   ResourceUnavailableException
Returns the state of the agreement instance.

Specified by:
getState in interface AgreementService
Returns:
the agreement state
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getTerms

public TermTreeType getTerms()
                      throws ResourceUnknownException,
                             ResourceUnavailableException
Returns the terms of the agreement instance.

Specified by:
getTerms in interface AgreementService
Returns:
the agreement terms
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

terminate

public void terminate(TerminateInputType reason)
               throws ResourceUnknownException,
                      ResourceUnavailableException
Terminates the agreement instance.

Specified by:
terminate in interface AgreementService
Parameters:
reason - a domain-specific termination reason
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

destroy

public void destroy()
             throws ResourceUnknownException,
                    ResourceUnavailableException
Destroys agreement instance. local implementation does nothing here

Specified by:
destroy in interface AgreementService
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable


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