|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ogf.graap.wsag.wsrf.persistence.WsDatabaseAgreementFactory
public class WsDatabaseAgreementFactory
The WsDatabaseAgreementFactory encapsulates a PersistentAgreementFactory and additionally
stores the endpoint reference of the persistent factory. Calls to this factory are delegated to the
PersistentAgreementFactory.
| Field Summary | |
|---|---|
static String |
FACTORY_EPR
|
| Constructor Summary | |
|---|---|
WsDatabaseAgreementFactory(PersistentAgreementFactory factory,
EndpointReferenceType epr)
Creates a persistent WS agreement factory for a given EPR and implementation. |
|
| Method Summary | |
|---|---|
void |
addAgreement(Agreement agreement,
EndpointReferenceType epr)
Deprecated. |
Agreement |
createAgreement(AgreementOffer offer,
Map<String,Object> context)
Creates a new agreement based on an offer. |
Agreement |
createPendingAgreement(AgreementOffer offer,
PendingAgreementListener listener,
Map<String,Object> context)
Creates a new pending agreement based on an offer. |
WsDatabasePersistentAgreement |
find(String epr)
Tries to find an agreement for a specified EPR. |
WsDatabasePersistentAgreement |
findByAgreementId(String agreementId)
Tries to find a agreement for a specified agreement ID. |
WsDatabasePersistentAgreement |
findByEprAddress(String eprAddress)
Tries to find a agreement for a specified EPR address of an agreement. |
AgreementFactory |
getAgreementFactory()
Deprecated. |
EndpointReferenceType |
getAgreementFactoryEPR()
use the resource id at the WSRF layer to construct the EPR |
AgreementFactoryContext |
getFactoryContext()
Returns the factory context. |
String |
getResourceId()
|
AgreementTemplateType[] |
getTemplates()
|
Negotiation |
initiateNegotiation(NegotiationContextType context,
org.apache.xmlbeans.XmlObject[] criticalExtensions,
org.apache.xmlbeans.XmlObject[] nonCriticalExtensions,
Map<String,Object> environment)
Initializes a new negotiation instance. |
WsDatabasePersistentAgreement[] |
list()
Creates a list of all webservice-based versions of agreements for one specific agreement factory. |
PersistentAgreement[] |
list(String agreementFactoryId)
Lists all agreements for one specific agreement factory. |
void |
load()
loads the factory instance |
void |
remove(String epr)
Removes the factory identified by the given EPR. |
void |
save()
saves the factory instance |
void |
setFactoryContext(AgreementFactoryContext context)
Sets the factory context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FACTORY_EPR
| Constructor Detail |
|---|
public WsDatabaseAgreementFactory(PersistentAgreementFactory factory,
EndpointReferenceType epr)
factory - the persistent factory where calls are delegated toepr - the endpoint reference of the persistent factory| Method Detail |
|---|
public String getResourceId()
getResourceId in interface PersistentAgreementFactoryPersistentAgreementFactory.getResourceId()@Deprecated public AgreementFactory getAgreementFactory()
getAgreementFactory in interface PersistentAgreementFactoryPersistentAgreementFactory.getAgreementFactory()
public void load()
throws Exception
load in interface PersistentAgreementFactoryException - indicates an exception while loading the agreement factory from the databasePersistentAgreementFactory.load()
public void save()
throws Exception
save in interface PersistentAgreementFactoryException - indicates an exception while saving the agreement to the databasePersistentAgreementFactory.save()
@Deprecated
public void addAgreement(Agreement agreement,
EndpointReferenceType epr)
addAgreement in interface PersistentAgreementFactoryagreement - the agreement instance to addepr - the external reference for this agreementPersistentAgreementFactory.addAgreement(org.ogf.graap.wsag.api.Agreement,
org.w3.x2005.x08.addressing.EndpointReferenceType)public AgreementTemplateType[] getTemplates()
getTemplates in interface AgreementFactoryAgreementFactory.getTemplates()
public Agreement createAgreement(AgreementOffer offer,
Map<String,Object> context)
throws AgreementFactoryException
createAgreement in interface AgreementFactoryoffer - agreement offercontext - invocation context
AgreementFactoryException - Indicates that the agreement offer was rejected or another fault occurred.org.ogf.graap.wsag.api.AgreementFactory#createAgreement(org.ogf.graap.wsag.api.AgreementOffer)
public Agreement createPendingAgreement(AgreementOffer offer,
PendingAgreementListener listener,
Map<String,Object> context)
throws AgreementFactoryException
createPendingAgreement in interface AgreementFactoryoffer - agreement offerlistener - the listener, when provided, receives the agreement acceptance events once the creation
process is finishedcontext - invocation context
AgreementFactoryException - Indicates that the agreement offer was rejected or another fault occurred.org.ogf.graap.wsag.api.AgreementFactory#createPendingAgreement(org.ogf.graap.wsag.api.AgreementOffer)
public Negotiation initiateNegotiation(NegotiationContextType context,
org.apache.xmlbeans.XmlObject[] criticalExtensions,
org.apache.xmlbeans.XmlObject[] nonCriticalExtensions,
Map<String,Object> environment)
throws NegotiationFactoryException
initiateNegotiation in interface AgreementFactorycontext - 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.
NegotiationFactoryException - indicates that an error occurred while instantiating the negotiation processAgreementFactory.initiateNegotiation(NegotiationContextType, XmlObject[],
XmlObject[], Map)
public WsDatabasePersistentAgreement find(String epr)
throws PersistedResourceException
AgreementEprContainer instance exists.
find in interface IAgreementHomeepr - EPR of the agreement.
PersistedResourceException - indicates an exception while loading the agreement from the database
public WsDatabasePersistentAgreement findByEprAddress(String eprAddress)
throws Exception
AgreementEprContainer instance exists.
eprAddress - Address of the EPR of the agreement.
Exception - failed to lookup the EPRpublic WsDatabasePersistentAgreement[] list()
list in interface IAgreementHomelist in interface WsPersistentAgreementFactory
public WsDatabasePersistentAgreement findByAgreementId(String agreementId)
throws Exception
AgreementEprContainer instance exists.
agreementId - ID of the requested agreement.
Exception - failed to look up the specified agreement, i.e. a database error occurred
public PersistentAgreement[] list(String agreementFactoryId)
throws Exception
list in interface IAgreementHomeagreementFactoryId - the id of the factory for which the agreements should be listed
Exception - indicates an exception while loading the agreements from the databaseIAgreementHome.list(java.lang.String)
public void remove(String epr)
throws PersistedResourceException
remove in interface IAgreementHomeepr - the EPR that identifies the factory resource
PersistedResourceException - the specified resource was not removed, i.e. it was not foundpublic EndpointReferenceType getAgreementFactoryEPR()
getAgreementFactoryEPR in interface WsPersistentAgreementFactoryWsPersistentAgreementFactory.getAgreementFactoryEPR()public AgreementFactoryContext getFactoryContext()
AgreementFactory
getFactoryContext in interface AgreementFactoryAgreementFactory.getFactoryContext()public void setFactoryContext(AgreementFactoryContext context)
AgreementFactory
setFactoryContext in interface AgreementFactorycontext - AgreementFactory.setFactoryContext(org.ogf.graap.wsag.api.AgreementFactoryContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||