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
Modifier and TypeClassDescriptionprotected static final record
File reloader for the page model configuration -
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
the current user providerprotected ObservationManager
the observation manager -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) createPage
(ModifiableSitemapElement parent) Create a new page in the parentint
Get the priority for the component.void
service
(ServiceManager manager) void
setModel
(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:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getPriority
Description copied from interface:Prioritizable
Get the priority for the component. On components usingPrioritizable
interface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriority
in interfacePrioritizable
- Returns:
- the priority
-
createPage
Description copied from interface:PageInitializer
Create a new page in the parent- Specified by:
createPage
in 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
-