org.ogf.graap.wsag.server.persistence.impl
Class SimplePersistentAgreementFactory
java.lang.Object
org.ogf.graap.wsag.server.persistence.impl.AbstractPersistentAgreementFactory
org.ogf.graap.wsag.server.persistence.impl.SimplePersistentAgreementFactory
- All Implemented Interfaces:
- AgreementFactory, IAgreementHome, PersistentAgreementFactory
public class SimplePersistentAgreementFactory
- extends AbstractPersistentAgreementFactory
- implements PersistentAgreementFactory
SimplePersistentAgreementFactory. Agreement factories are persisted by the WSAG4J engine configuration
files. Each engine instance is treated as an agreement factory configuration. Therefore, for each engine
instance one SimplePersistentAgreementFactory
instance is created and initialized.
SimplePersistentAgreementFactory
is an adapter between the PersistentAgreementFactory
and
the AgreementFactory
interfaces (between persistence layer and factory implementation).
- Author:
- Oliver Waeldrich
Methods inherited from class org.ogf.graap.wsag.server.persistence.impl.AbstractPersistentAgreementFactory |
addAgreement, createAgreement, find, getAgreementFactory, getResourceId, getTemplates, initiateNegotiation, list, list, load, remove, save, setResourceId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimplePersistentAgreementFactory
public SimplePersistentAgreementFactory(AgreementFactory factory)
- Parameters:
factory
- the delegation target
doLoad
protected PersistentAgreement[] doLoad()
throws PersistedResourceException
- This agreement factory does not support persistence. Calls to this method will have no effect.
Loads all agreements that were created by this factory.
- Specified by:
doLoad
in class AbstractPersistentAgreementFactory
- Returns:
- the loaded agreements
- Throws:
PersistedResourceException
- indicates an error while loading the agreements from the persistence layer
persistAgreement
protected PersistentAgreement persistAgreement(Agreement agreement)
throws PersistedResourceException
- This agreement factory does not support persistence. Calls to this method will return a
SimplePersistentAgreement
.
- Specified by:
persistAgreement
in class AbstractPersistentAgreementFactory
- Parameters:
agreement
- the agreement to persist
- Returns:
- the persisted agreement
- Throws:
{@inheritDoc}
PersistedResourceException
- indicates that an error occurred while persisting the agreement
doRemove
protected void doRemove(PersistentAgreement agreement)
throws PersistedResourceException
- This agreement factory does not support persistence. Calls to this method will have no effect.
- Specified by:
doRemove
in class AbstractPersistentAgreementFactory
- Parameters:
agreement
- the agreement to remove
- Throws:
PersistedResourceException
- indicates that the agreement could not be removed from the persistence layer- See Also:
IAgreementHome.remove(java.lang.String)
Copyright © 2008-2012 Fraunhofer Institute SCAI. All Rights Reserved.