org.ogf.graap.wsag.server.persistence.impl
Class SimpleWSAG4JPersistence

java.lang.Object
  extended by org.ogf.graap.wsag.server.api.EngineComponent
      extended by org.ogf.graap.wsag.server.persistence.impl.AbstractWSAG4JPersistence
          extended by org.ogf.graap.wsag.server.persistence.impl.SimpleWSAG4JPersistence
All Implemented Interfaces:
IEngineComponent, IAgreementFactoryHome

public class SimpleWSAG4JPersistence
extends AbstractWSAG4JPersistence

SimpleWSAG4JPersistence loads the factory configurations defined in the WSAG4J engine configuration files and and instantiates a factory for each engine instance.

Author:
Oliver Waeldrich

Constructor Summary
SimpleWSAG4JPersistence()
           
 
Method Summary
protected  PersistentAgreementFactory[] doLoad()
          Loads the agreement factories for this persistence layer.
protected  boolean doRemove(PersistentAgreementFactory factory)
          Removes a persistent factory from the persistence layer.
 void saveAgreementFactories(PersistentAgreementFactory[] factories)
          
 
Methods inherited from class org.ogf.graap.wsag.server.persistence.impl.AbstractWSAG4JPersistence
doInitialize, find, hasChanged, list, remove, setChanged
 
Methods inherited from class org.ogf.graap.wsag.server.api.EngineComponent
getEngine, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleWSAG4JPersistence

public SimpleWSAG4JPersistence()
Method Detail

doLoad

protected PersistentAgreementFactory[] doLoad()
                                       throws PersistedResourceException
Description copied from class: AbstractWSAG4JPersistence
Loads the agreement factories for this persistence layer. The load method is invoked during the initialization process of the persistence layer (see #initialize()) or during a AbstractWSAG4JPersistence.find(String), AbstractWSAG4JPersistence.list() or AbstractWSAG4JPersistence.remove(String) operation

Specified by:
doLoad in class AbstractWSAG4JPersistence
Returns:
the loaded factories
Throws:
PersistedResourceException - indicates an error while loading the persistent factories

saveAgreementFactories

public void saveAgreementFactories(PersistentAgreementFactory[] factories)

Parameters:
factories - List of factories, which should be saved/persisted.

doRemove

protected boolean doRemove(PersistentAgreementFactory factory)
                    throws PersistedResourceException
Removes a persistent factory from the persistence layer.

Specified by:
doRemove in class AbstractWSAG4JPersistence
Parameters:
factory - the factory to remove
Returns:
true if the factory was removed, otherwise false
Throws:
PersistedResourceException - indicates an error while removing the factory
See Also:
AbstractWSAG4JPersistence.doRemove(PersistentAgreementFactory)


Copyright © 2008-2012. All Rights Reserved.