Package com.jalios.jcms
Class StartupDataGenerator
java.lang.Object
com.jalios.jcms.ChannelListener
com.jalios.jcms.StartupDataGenerator
- All Implemented Interfaces:
PluginComponent,Comparable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Channelprotected static final org.apache.log4j.Loggerprotected static final Stringprotected JPropertiesFields inherited from class com.jalios.jcms.ChannelListener
order -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AccessControlListprotected CategorybuildCategory(String vid, Category parent) protected GroupbuildGroup(String vid, HashMap<String, DataRight> rightFromClassMap, AccessControlList acl, int visibility) protected AccessControlListCreate an ACLprotected CategorycreateCategory(String vid) protected CategorycreateCategory(String vid, Category parent) Crate a categoryprotected abstract voidThis method is called to generate the Dataprotected GroupcreateGroup(String vid) Create a groupprotected GroupcreateGroup(String vid, AccessControlList acl) Create a groupprotected GroupcreateGroup(String vid, HashMap<String, DataRight> rightFromClassMap) Create a groupprotected GroupcreateGroup(String vid, HashMap<String, DataRight> rightFromClassMap, AccessControlList acl, int visibility) Create a groupvoidCalled when the channel is finalizedvoidCalled at the end of JPlatform startup.voidCalled just after the store has been loaded and the channel has been initialized.voidCalled just before the store has been loaded.protected <T extends Data>
TSave a Dataprotected <T extends Data>
ControllerStatussaveData(T data) protected voidsetProperty(String key, String value) Set a property to saveMethods inherited from class com.jalios.jcms.ChannelListener
compareTo, equals, getOrder, init, initBeforeHibernateFactoryBuild
-
Field Details
-
logger
protected static final org.apache.log4j.Logger logger -
NAME_SUFFIX
- See Also:
-
channel
-
propToSave
-
-
Constructor Details
-
StartupDataGenerator
public StartupDataGenerator()
-
-
Method Details
-
initAfterStartup
public void initAfterStartup()Description copied from class:ChannelListenerCalled at the end of JPlatform startup.- Overrides:
initAfterStartupin classChannelListener
-
createData
protected abstract void createData()This method is called to generate the Data- Since:
- jcms-10.0.5
-
createCategory
-
createCategory
Crate a category- Parameters:
vid- the virtual IDparent- the parent category- Returns:
- the category
- Since:
- jcms-10.0.5
-
buildCategory
-
createAcl
Create an ACL- Parameters:
vid- the virtual IDresource- the resource controled by this ACL- Returns:
- the ACL
- Since:
- jcms-10.0.5
-
buildAcl
-
createGroup
Create a group- Parameters:
vid- the virtual ID- Returns:
- the group
- Since:
- jcms-10.0.5
-
createGroup
Create a group- Parameters:
vid- the virtual IDacl- the ACL- Returns:
- the group
- Since:
- jcms-10.0.5
-
createGroup
Create a group- Parameters:
vid- the virtual IDrightFromClassMap- the map of DataRight- Returns:
- the group
- Since:
- jcms-10.0.5
-
createGroup
protected Group createGroup(String vid, HashMap<String, DataRight> rightFromClassMap, AccessControlList acl, int visibility) Create a group- Parameters:
vid- the virtual IDrightFromClassMap- the map of DataRightacl- the ACLvisibility- the group visibility- Returns:
- the group
- Since:
- jcms-10.0.5
-
buildGroup
-
saveData
Save a Data- Type Parameters:
T- A class inherited from Data- Parameters:
vid- the virtual IDdata- the Data- Returns:
- the Data
- Since:
- jcms-10.0.5
-
setProperty
Set a property to save- Parameters:
key- the keyvalue- the value- Since:
- jcms-10.0.5
-
saveData
-
handleFinalize
public void handleFinalize()Description copied from class:ChannelListenerCalled when the channel is finalized- Overrides:
handleFinalizein classChannelListener
-
initBeforeStoreLoad
Description copied from class:ChannelListenerCalled 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:
initBeforeStoreLoadin classChannelListener- Throws:
Exception- any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.
-
initAfterStoreLoad
Description copied from class:ChannelListenerCalled 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:
initAfterStoreLoadin classChannelListener- Throws:
Exception- any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.
-