Class StartupDataGenerator

    • Field Detail

      • logger

        protected static final org.apache.log4j.Logger logger
      • channel

        protected Channel channel
    • Constructor Detail

      • StartupDataGenerator

        public StartupDataGenerator()
    • Method Detail

      • createData

        protected abstract void createData()
        This method is called to generate the Data
        Since:
        jcms-10.0.5
      • createCategory

        protected Category createCategory​(java.lang.String vid)
      • createCategory

        protected Category createCategory​(java.lang.String vid,
                                          Category parent)
        Crate a category
        Parameters:
        vid - the virtual ID
        parent - the parent category
        Returns:
        the category
        Since:
        jcms-10.0.5
      • buildCategory

        protected Category buildCategory​(java.lang.String vid,
                                         Category parent)
      • createAcl

        protected AccessControlList createAcl​(java.lang.String vid,
                                              java.lang.String resource)
        Create an ACL
        Parameters:
        vid - the virtual ID
        resource - the resource controled by this ACL
        Returns:
        the ACL
        Since:
        jcms-10.0.5
      • buildAcl

        protected AccessControlList buildAcl​(java.lang.String vid,
                                             java.lang.String resource)
      • createGroup

        protected Group createGroup​(java.lang.String vid)
        Create a group
        Parameters:
        vid - the virtual ID
        Returns:
        the group
        Since:
        jcms-10.0.5
      • createGroup

        protected Group createGroup​(java.lang.String vid,
                                    AccessControlList acl)
        Create a group
        Parameters:
        vid - the virtual ID
        acl - the ACL
        Returns:
        the group
        Since:
        jcms-10.0.5
      • createGroup

        protected Group createGroup​(java.lang.String vid,
                                    java.util.HashMap<java.lang.String,​DataRight> rightFromClassMap)
        Create a group
        Parameters:
        vid - the virtual ID
        rightFromClassMap - the map of DataRight
        Returns:
        the group
        Since:
        jcms-10.0.5
      • createGroup

        protected Group createGroup​(java.lang.String vid,
                                    java.util.HashMap<java.lang.String,​DataRight> rightFromClassMap,
                                    AccessControlList acl,
                                    int visibility)
        Create a group
        Parameters:
        vid - the virtual ID
        rightFromClassMap - the map of DataRight
        acl - the ACL
        visibility - the group visibility
        Returns:
        the group
        Since:
        jcms-10.0.5
      • buildGroup

        protected Group buildGroup​(java.lang.String vid,
                                   java.util.HashMap<java.lang.String,​DataRight> rightFromClassMap,
                                   AccessControlList acl,
                                   int visibility)
      • saveData

        protected <T extends Data> T saveData​(java.lang.String vid,
                                              T data)
        Save a Data
        Type Parameters:
        T - A class inherited from Data
        Parameters:
        vid - the virtual ID
        data - the Data
        Returns:
        the Data
        Since:
        jcms-10.0.5
      • setProperty

        protected void setProperty​(java.lang.String key,
                                   java.lang.String value)
        Set a property to save
        Parameters:
        key - the key
        value - the value
        Since:
        jcms-10.0.5
      • initBeforeStoreLoad

        public void initBeforeStoreLoad()
                                 throws java.lang.Exception
        Description copied from class: ChannelListener
        Called just before the store has been loaded. If for any reason you want to interrupt JCMS startup, you can throw an exception. The exception's message will be displayed in JCMS status page (to any user!).
        Overrides:
        initBeforeStoreLoad in class ChannelListener
        Throws:
        java.lang.Exception - any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.
      • initAfterStoreLoad

        public void initAfterStoreLoad()
                                throws java.lang.Exception
        Description copied from class: ChannelListener
        Called just after the store has been loaded and the channel has been initialized. If for any reason you want to interrupt JCMS startup, you can throw an exception. The exception's message will be displayed in JCMS status page (to any user!).
        Overrides:
        initAfterStoreLoad in class ChannelListener
        Throws:
        java.lang.Exception - any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.