Class DefaultStaticPageInitializer
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.initialization.DefaultStaticPageInitializer
- All Implemented Interfaces:
PageInitializer,LogEnabled,Prioritizable,Configurable,Serviceable
- Direct Known Subclasses:
ProjectsCatalogPageInitializer,UserDirectoryPageInitializer,UserSignupPageInitializer
public class DefaultStaticPageInitializer
extends AbstractLogEnabled
implements PageInitializer, Configurable, Serviceable
Implementation of
PageInitializer using a configuration to define the page and its content.
By default, priority is set to 100-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final recordFile reloader for the page model configuration -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderthe current user providerprotected ObservationManagerthe observation manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration configuration) createPage(ModifiableSitemapElement parent) Create a new page in the parentintGet the priority for the component.voidservice(ServiceManager manager) voidsetModel(String path, Configuration cfg) Store the page model located at a given pathMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_currentUserProvider
the current user provider -
_observationManager
the observation manager
-
-
Constructor Details
-
DefaultStaticPageInitializer
public DefaultStaticPageInitializer()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getPriority
Description copied from interface:PrioritizableGet the priority for the component. On components usingPrioritizableinterface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriorityin interfacePrioritizable- Returns:
- the priority
-
createPage
Description copied from interface:PageInitializerCreate a new page in the parent- Specified by:
createPagein interfacePageInitializer- Parameters:
parent- the parent where the new page should be created- Returns:
- the new page or empty if no page was created
-
setModel
Store the page model located at a given path- Parameters:
path- the path to retrieve the modelcfg- the page model
-