org.ogf.graap.wsag.client.api.local
Class LocalAgreementClient

java.lang.Object
  extended by org.ogf.graap.wsag.client.api.impl.AbstractClient
      extended by org.ogf.graap.wsag.client.api.impl.AgreementClientImpl
          extended by org.ogf.graap.wsag.client.api.local.LocalAgreementClient
All Implemented Interfaces:
AgreementClient

public class LocalAgreementClient
extends AgreementClientImpl

LocalAgreementClientImpl

Author:
Oliver Waeldrich

Field Summary
 
Fields inherited from interface org.ogf.graap.wsag.client.api.AgreementClient
FACTORY
 
Constructor Summary
LocalAgreementClient(Agreement agreement)
          Creates a new local agreement instance using the given agreement object.
 
Method Summary
 AgreementClient clone()
          Returns a copy of the client.
 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.
 RemoteClient getRemoteClient()
          Returns the remote client used by this implementation in order to communicate with the WSAG4J server.
 AgreementPropertiesType getResourceProperties()
          Returns the resource properties 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.api.impl.AgreementClientImpl
getGuaranteeTermState, getServiceTermState, terminate
 
Methods inherited from class org.ogf.graap.wsag.client.api.impl.AbstractClient
getProperties, getRemoteReference, getSecurityProperties, isUsingTrace, setProperties, setTrace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalAgreementClient

public LocalAgreementClient(Agreement agreement)
Creates a new local agreement instance using the given agreement object.

Parameters:
agreement - the agreement instance
Method Detail

getName

public String getName()
Returns the name of the agreement instance.

Specified by:
getName in interface AgreementClient
Specified by:
getName in class AgreementClientImpl
Returns:
the agreement name
See Also:
Agreement.getName()

getAgreementId

public String getAgreementId()
Returns the id of the agreement instance.

Specified by:
getAgreementId in interface AgreementClient
Specified by:
getAgreementId in class AgreementClientImpl
Returns:
the agreement id
See Also:
Agreement.getAgreementId()

getContext

public AgreementContextType getContext()
Returns the context of the agreement instance.

Specified by:
getContext in interface AgreementClient
Specified by:
getContext in class AgreementClientImpl
Returns:
the agreement context
See Also:
Agreement.getContext()

getTerms

public TermTreeType getTerms()
Returns the terms of the agreement instance.

Specified by:
getTerms in interface AgreementClient
Specified by:
getTerms in class AgreementClientImpl
Returns:
the agreement terms
See Also:
Agreement.getTerms()

terminate

public void terminate(TerminateInputType reason)
Terminates the agreement instance.

Specified by:
terminate in interface AgreementClient
Specified by:
terminate in class AgreementClientImpl
Parameters:
reason - a domain-specific termination reason
See Also:
Agreement.terminate(org.ogf.schemas.graap.wsAgreement.TerminateInputType)

getState

public AgreementStateType getState()
Returns the state of the agreement instance.

Specified by:
getState in interface AgreementClient
Specified by:
getState in class AgreementClientImpl
Returns:
the agreement state
See Also:
Agreement.getState()

getGuaranteeTermStates

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

Specified by:
getGuaranteeTermStates in interface AgreementClient
Specified by:
getGuaranteeTermStates in class AgreementClientImpl
Returns:
the guarantee term states
See Also:
Agreement.getGuaranteeTermStates()

getServiceTermStates

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

Specified by:
getServiceTermStates in interface AgreementClient
Specified by:
getServiceTermStates in class AgreementClientImpl
Returns:
the service term states
See Also:
Agreement.getServiceTermStates()

clone

public AgreementClient clone()
                      throws CloneNotSupportedException
Returns a copy of the client.

Specified by:
clone in interface AgreementClient
Specified by:
clone in class AgreementClientImpl
Returns:
the cloned AgreementClient
Throws:
CloneNotSupportedException - indicates that the client implementation does not support cloning

getRemoteClient

public RemoteClient getRemoteClient()
Returns the remote client used by this implementation in order to communicate with the WSAG4J server.

Specified by:
getRemoteClient in interface AgreementClient
Specified by:
getRemoteClient in class AbstractClient
Returns:
the remote client
See Also:
org.ogf.graap.wsag.client.api.AgreementService#getRemoteClient()

destroy

public void destroy()
             throws ResourceUnknownException,
                    ResourceUnavailableException
Destroys agreement instance.

Specified by:
destroy in interface AgreementClient
Specified by:
destroy in class AgreementClientImpl
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable
See Also:
AgreementClientImpl.destroy()

getResourceProperties

public AgreementPropertiesType getResourceProperties()
                                              throws ResourceUnknownException,
                                                     ResourceUnavailableException
Returns the resource properties of the agreement instance.

Specified by:
getResourceProperties in interface AgreementClient
Specified by:
getResourceProperties in class AgreementClientImpl
Returns:
the agreement resource properties
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable
See Also:
AgreementClient.getResourceProperties()


Copyright © 2008-2012. All Rights Reserved.