org.ogf.graap.wsag.server.persistence
Interface IAgreementHome

All Known Subinterfaces:
PersistentAgreementFactory, WsPersistentAgreementFactory
All Known Implementing Classes:
AbstractPersistentAgreementFactory, DatabaseAgreementHome, DatabasePersistentAgreementFactory, SimplePersistentAgreementFactory, WsDatabaseAgreementFactory

public interface IAgreementHome

Specification of an agreement home implementation. Implementations are used to retrieve (list and find) agreements and to remove existing agreements.

A global instance of the agreement home implementations stored in the WsagEngine instance. It can be used to access all agreements known to the wsag4j-instance.

The default implementation of an agreement home is DatabaseAgreementHome.

Author:
Oliver Waeldrich

Method Summary
 PersistentAgreement find(String agreementId)
          Finds an agreement with a given ID.
 PersistentAgreement[] list()
          Lists all agreements.
 PersistentAgreement[] list(String agreementFactoryId)
          Deprecated. the agreement home is implemented by a specific agreement factory instance
 void remove(String agreementId)
          Removes the agreement with the given id.
 

Method Detail

find

PersistentAgreement find(String agreementId)
                         throws PersistedResourceException
Finds an agreement with a given ID.

Parameters:
agreementId - the ID of the agreement
Returns:
the agreement
Throws:
PersistedResourceException - indicates an exception while loading the agreement from the database

list

PersistentAgreement[] list()
                           throws Exception
Lists all agreements.

Returns:
List of all agreements.
Throws:
Exception - indicates an exception while loading the agreements from the database

list

PersistentAgreement[] list(String agreementFactoryId)
                           throws Exception
Deprecated. the agreement home is implemented by a specific agreement factory instance

Lists all agreements for one specific agreement factory.

Parameters:
agreementFactoryId - the id of the factory for which the agreements should be listed
Returns:
a list of all agreements for a specified agreement factory
Throws:
Exception - indicates an exception while loading the agreements from the database

remove

void remove(String agreementId)
            throws PersistedResourceException
Removes the agreement with the given id.

Parameters:
agreementId - the ID of the agreement, which should be removed
Throws:
PersistedResourceException - indicates an exception while removing the agreement from the database


Copyright © 2008-2012. All Rights Reserved.