Class AbstractModuleFactory

  • All Implemented Interfaces:
    java.io.Serializable, IModuleFactory

    public abstract class AbstractModuleFactory
    extends java.lang.Object
    implements IModuleFactory, java.io.Serializable
    Base imlementation of IModuleFactory interface which only demands createModule method.
    Version:
    $Id: $Id
    Author:
    another
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractModuleFactory

        protected AbstractModuleFactory()

        Constructor for AbstractModuleFactory.

    • Method Detail

      • getLog

        protected org.slf4j.Logger getLog()

        Getter for the field log.

        Returns:
        a Logger object.
      • createDocument

        public Document createDocument​(java.lang.String name,
                                       DataHolder context)
        Creates a new Document from a name and a context (like list). If this function is not overwritten, it call createDocument(name).
        Specified by:
        createDocument in interface IModuleFactory
        Parameters:
        name - a String object.
        context - a DataHolder object.
        Returns:
        new Document
      • createDocument

        public Document createDocument​(java.lang.String name,
                                       java.lang.String typeIdentifier)
        Creates a new Document with given name and a type identifier. Creates a new Document from a name and a typeidentifier. If this function is not overwritten, it call createDocument(name).
        Specified by:
        createDocument in interface IModuleFactory
        Parameters:
        name - a String object.
        typeIdentifier - a String object.
        Returns:
        new Document
      • createDocument

        public Document createDocument​(java.lang.String id)
        Creates a new Document with given name. Creates and returns a new Document. This method should be overwritten by the extending class, since usage of Document directly in your modell is not fitting in the concept of ano-doc.
        Specified by:
        createDocument in interface IModuleFactory
        Parameters:
        id - a String object.
        Returns:
        a Document object.
      • createDocumentList

        public <D extends DocumentDocumentList<D> createDocumentList​(java.lang.String name)
        Creates a new DocumentList with given name and without a context. Normally you don't need this method, since list is seldom overwritten. Creates and returns a DocumentList.
        Specified by:
        createDocumentList in interface IModuleFactory
        Parameters:
        name - a String object.
        Returns:
        a DocumentList object.
      • createModule

        public final Module createModule​(java.lang.String ownerId,
                                         java.lang.String copyId)
        Creates a new Module Instance for given owner and copy ids.
        Specified by:
        createModule in interface IModuleFactory
        Parameters:
        ownerId - a String object.
        copyId - a String object.
        Returns:
        a Module object.
      • recreateModule

        public abstract Module recreateModule​(java.lang.String ownerId,
                                              java.lang.String copyId)
        Recreates a Module. This method is called by the AbstractModuleFactory in the createModule method. It sets the proper owner and copy ids in the newly created Module instance, so the extending class doesn't need to do it itself.
        Parameters:
        ownerId - a String object.
        copyId - a String object.
        Returns:
        recreated module