|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ogf.graap.wsag.server.persistence.impl.WSAG4JPersistenceFacade
public class WSAG4JPersistenceFacade
This class serves as a facade for multiple wsag4j engine instances that are deployed in a server. Since
multiple multiple wsag4j engine instances can be deployed in a server this facade allows to list, save and
remove agreement factories via the IAgreementFactoryHome
interface as there would be only one
engine instance.
Field Summary | |
---|---|
protected List<PersistentAgreementFactory> |
factoriesOL
An ordered list with the available agreement factories. |
protected Map<String,PersistentAgreementFactory> |
persistentFactories
A map that contains the available persistent agreement factory which are identified by their factory id. |
Constructor Summary | |
---|---|
WSAG4JPersistenceFacade(WSAG4JEngineConfigurationType[] config)
Creates a new facade for the given engine configurations. |
Method Summary | |
---|---|
PersistentAgreementFactory |
find(String factoryId)
looks up a factory with the given id. |
WSAG4JEngineConfigurationType |
getEngineConfiguration()
returns the configuration of the wsag4j engine |
void |
initialize()
|
PersistentAgreementFactory[] |
list()
Lists all agreement factories. |
void |
remove(String factoryId)
Removes the factory with the given ID. |
void |
save()
Saves all factories. |
void |
saveAgreementFactories(PersistentAgreementFactory[] factories)
|
void |
setEngineConfiguration(WSAG4JEngineConfigurationType configs)
sets the configuration of the wsag4j engine |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<String,PersistentAgreementFactory> persistentFactories
protected List<PersistentAgreementFactory> factoriesOL
Constructor Detail |
---|
public WSAG4JPersistenceFacade(WSAG4JEngineConfigurationType[] config)
config
- the configurations of the available WSAG4J enginesMethod Detail |
---|
public void initialize()
IEngineComponent
initialize
in interface IEngineComponent
IEngineComponent.initialize()
public PersistentAgreementFactory find(String factoryId) throws Exception
find
in interface IAgreementFactoryHome
factoryId
- the id of the factory to find
Exception
- an error occurred while looking up the factory.IAgreementFactoryHome.find(String)
public PersistentAgreementFactory[] list() throws Exception
IAgreementFactoryHome
list
in interface IAgreementFactoryHome
Exception
- indicates an error while generating the factory listIAgreementFactoryHome.list()
public void remove(String factoryId) throws Exception
IAgreementFactoryHome
remove
in interface IAgreementFactoryHome
factoryId
- removes the factory with the given id from the persistence layer
Exception
- an error occurred while removing the factoryIAgreementFactoryHome.remove(java.lang.String)
public void save() throws Exception
Exception
- indicates an error while saving the factoriespublic void setEngineConfiguration(WSAG4JEngineConfigurationType configs)
IEngineComponent
setEngineConfiguration
in interface IEngineComponent
configs
- the engine configuration to setIEngineComponent.setEngineConfiguration(org.ogf.graap.wsag4j.types.configuration.WSAG4JEngineConfigurationType)
public WSAG4JEngineConfigurationType getEngineConfiguration()
IEngineComponent
getEngineConfiguration
in interface IEngineComponent
IEngineComponent.getEngineConfiguration()
public void saveAgreementFactories(PersistentAgreementFactory[] factories) throws Exception
saveAgreementFactories
in interface IAgreementFactoryHome
factories
- the factories to save
Exception
- indicates an error while saving the factoriesIAgreementFactoryHome.saveAgreementFactories(org.ogf.graap.wsag.server.persistence.PersistentAgreementFactory[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |