org.ogf.graap.wsag.wsrf.persistence
Class WsDatabasePersistentAgreement

java.lang.Object
  extended by org.ogf.graap.wsag.wsrf.persistence.WsDatabasePersistentAgreement
All Implemented Interfaces:
PersistentAgreement

public class WsDatabasePersistentAgreement
extends Object
implements PersistentAgreement

Web service based extension of the DatabasePersistentAgreement. It is used to bind an EPR to the agreement, which is stored inside the AgreementEprContainer instance.

Author:
T.Weuffel

Constructor Summary
WsDatabasePersistentAgreement(PersistentAgreement agreement, EndpointReferenceType epr, String agreementFactoryId)
          Creates a new persisted agreement.
 
Method Summary
 Agreement getAgreement()
           
 EndpointReferenceType getAgreementEPR()
           
 void load()
          Loads the agreement (based on the persisted /information/state, the configuration/etc.).
 void save()
          Saves/persistes an agreement.
 void setAgreementEPR(EndpointReferenceType agreementEpr)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WsDatabasePersistentAgreement

public WsDatabasePersistentAgreement(PersistentAgreement agreement,
                                     EndpointReferenceType epr,
                                     String agreementFactoryId)
Creates a new persisted agreement.

Parameters:
agreement - the agreement to persist
epr - the agreement EPR
agreementFactoryId - the id of the agreement factory that created the agreement
See Also:
EntityManagerFactory, PersistentAgreementContainer
Method Detail

save

public void save()
          throws Exception
Saves/persistes an agreement.

Specified by:
save in interface PersistentAgreement
Throws:
Exception - indicates an exception while saving the agreement to the database

getAgreementEPR

public EndpointReferenceType getAgreementEPR()
Specified by:
getAgreementEPR in interface PersistentAgreement
Returns:
the endpoint reference of the web service agreement resource

setAgreementEPR

public void setAgreementEPR(EndpointReferenceType agreementEpr)
Parameters:
agreementEpr - the agreement endpoint reference

toString

public String toString()
Overrides:
toString in class Object

getAgreement

public Agreement getAgreement()
Specified by:
getAgreement in interface PersistentAgreement
Returns:
the concrete agreement instance that is associated with the web service resource
See Also:
PersistentAgreement.getAgreement()

load

public void load()
          throws Exception
Loads the agreement (based on the persisted /information/state, the configuration/etc.).

Specified by:
load in interface PersistentAgreement
Throws:
Exception - indicates an exception while loading the agreement from the database
See Also:
PersistentAgreement.load()


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