Class CommonHashtableModuleStorage

  • All Implemented Interfaces:
    IModuleStorage

    public class CommonHashtableModuleStorage
    extends java.lang.Object
    implements IModuleStorage
    This storage stores everything in a hashtable and stores this in the plain form (only IPlanDataObject and ICompositeDataObject) in ONE file.
    Version:
    $Id: $Id
    Author:
    another
    • Field Detail

      • DEF_KEY_CFG_STORAGE_DIRECTORY

        public static final java.lang.String DEF_KEY_CFG_STORAGE_DIRECTORY
        Key for storage directory.
        See Also:
        Constant Field Values
      • DEF_STORAGE_DIR

        public static final java.lang.String DEF_STORAGE_DIR
        Default name for storage directory.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CommonHashtableModuleStorage

        public CommonHashtableModuleStorage​(java.lang.String aFilename,
                                            IModuleFactory aFactory)

        Constructor for CommonHashtableModuleStorage.

        Parameters:
        aFilename - a String object.
        aFactory - a IModuleFactory object.
      • CommonHashtableModuleStorage

        public CommonHashtableModuleStorage​(java.lang.String aFilename,
                                            IModuleFactory aFactory,
                                            java.lang.String aCfgKeyStorageDir)

        Constructor for CommonHashtableModuleStorage.

        Parameters:
        aFilename - a String object.
        aFactory - a IModuleFactory object.
        aCfgKeyStorageDir - a String object.
    • Method Detail

      • saveModule

        public void saveModule​(Module module)
        Saves the given instance permanently.
        Specified by:
        saveModule in interface IModuleStorage
        Parameters:
        module - a Module object.
      • deleteModule

        public void deleteModule​(java.lang.String ownerId,
                                 java.lang.String copyId)
        Delete the specified instance.
        Specified by:
        deleteModule in interface IModuleStorage
        Parameters:
        ownerId - a String object.
        copyId - a String object.
      • getFile

        protected java.lang.String getFile​(java.lang.String aFilename)

        getFile.

        Parameters:
        aFilename - a String object.
        Returns:
        a String object.
      • getFileLock

        protected java.lang.String getFileLock​(java.lang.String aFilename)
        Return path for lock file by file name.
        Parameters:
        aFilename - file name for dat file.
        Returns:
        file name for lock file.
      • setStorageDir

        public void setStorageDir​(java.lang.String value)

        Setter for the field storageDir.

        Parameters:
        value - a String object.
      • addModuleListener

        public void addModuleListener​(IModuleListener listener)
        Adds a module listener. Adds a service listener to this module storage.
        Specified by:
        addModuleListener in interface IModuleStorage
        Parameters:
        listener - the listener to add.
      • removeModuleListener

        public void removeModuleListener​(IModuleListener listener)
        Removes the module listener from the module storage. Removes the service listener from the module storage.
        Specified by:
        removeModuleListener in interface IModuleStorage
        Parameters:
        listener - the listener to remove.
      • notifyConfigurationFinished

        public void notifyConfigurationFinished()

        notifyConfigurationFinished.