Package net.anotheria.anodoc.util
Class CommonModuleStorageWrapper
- java.lang.Object
-
- net.anotheria.anodoc.util.CommonModuleStorageWrapper
-
- All Implemented Interfaces:
IModuleStorage
public class CommonModuleStorageWrapper extends java.lang.Object implements IModuleStorage
This class behaves likeIModuleStoragebut delegates all method calls to an instance ofICommonModuleStorage.- Version:
- $Id: $Id
- Author:
- another
-
-
Constructor Summary
Constructors Constructor Description CommonModuleStorageWrapper(java.lang.String aModuleId, IModuleFactory aFactory, ICommonModuleStorage aDelegate)Constructor for CommonModuleStorageWrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddModuleListener(IModuleListener listener)Adds a module listener.voiddeleteModule(java.lang.String ownerId, java.lang.String copyId)Delete the specified instance.ModuleloadModule(java.lang.String ownerId, java.lang.String copyId)Loads the specified instance.voidremoveModuleListener(IModuleListener listener)Removes the module listener from the module storage.voidsaveModule(Module module)Saves the given instance permanently.
-
-
-
Constructor Detail
-
CommonModuleStorageWrapper
public CommonModuleStorageWrapper(java.lang.String aModuleId, IModuleFactory aFactory, ICommonModuleStorage aDelegate)Constructor for CommonModuleStorageWrapper.
- Parameters:
aModuleId- aStringobject.aFactory- aIModuleFactoryobject.aDelegate- aICommonModuleStorageobject.
-
-
Method Detail
-
saveModule
public void saveModule(Module module) throws StorageFailureException
Saves the given instance permanently.- Specified by:
saveModulein interfaceIModuleStorage- Parameters:
module- aModuleobject.- Throws:
StorageFailureException- if any.
-
loadModule
public Module loadModule(java.lang.String ownerId, java.lang.String copyId) throws NoStoredModuleEntityException, StorageFailureException
Loads the specified instance.- Specified by:
loadModulein interfaceIModuleStorage- Parameters:
ownerId- aStringobject.copyId- aStringobject.- Returns:
- loaded module
- Throws:
NoStoredModuleEntityException- if any.StorageFailureException- if any.
-
deleteModule
public void deleteModule(java.lang.String ownerId, java.lang.String copyId) throws StorageFailureExceptionDelete the specified instance.- Specified by:
deleteModulein interfaceIModuleStorage- Parameters:
ownerId- aStringobject.copyId- aStringobject.- Throws:
StorageFailureException- if any.
-
addModuleListener
public void addModuleListener(IModuleListener listener)
Adds a module listener. Does nothing.- Specified by:
addModuleListenerin interfaceIModuleStorage- Parameters:
listener- the listener to add.
-
removeModuleListener
public void removeModuleListener(IModuleListener listener)
Removes the module listener from the module storage. Does nothing.- Specified by:
removeModuleListenerin interfaceIModuleStorage- Parameters:
listener- the listener to remove.
-
-