Class InitializeProjectSitemapObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.project.observers.AbstractInitializeProjectObserver
org.ametys.plugins.workspaces.project.observers.InitializeProjectSitemapObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,PluginAware
,Serviceable
Initializes all project workspace pages when a sitemap is created.
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
Current user providerprotected ObservationManager
The observation manager.protected PagePopulator
the page populatorprotected String
the plugin nameFields inherited from class org.ametys.plugins.workspaces.project.observers.AbstractInitializeProjectObserver
_projectManager
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_initializeSitemap
(Sitemap sitemap, Project project) Initialize the given sitemap.void
This method will be called byObserver.observe(Event, Map)
when there is a project on this sitevoid
service
(ServiceManager manager) void
setPluginInfo
(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.ametys.plugins.workspaces.project.observers.AbstractInitializeProjectObserver
getPriority, observe, supports
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_observationManager
The observation manager. -
_currentUserProvider
Current user provider -
_pagePopulator
the page populator -
_pluginName
the plugin name
-
-
Constructor Details
-
InitializeProjectSitemapObserver
public InitializeProjectSitemapObserver()
-
-
Method Details
-
setPluginInfo
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractInitializeProjectObserver
- Throws:
ServiceException
-
doObserve
public void doObserve(Event event, Map<String, Object> transientVars, Site site, Project project) throws ExceptionDescription copied from class:AbstractInitializeProjectObserver
This method will be called byObserver.observe(Event, Map)
when there is a project on this site- Specified by:
doObserve
in classAbstractInitializeProjectObserver
- Parameters:
event
- the eventtransientVars
- transientVars passed from one Observer to another when processing a single Event. This may allow optimizations between observers.site
- the site impactedproject
- the project impacted- Throws:
Exception
- something went wrong
-
_initializeSitemap
Initialize the given sitemap.- Parameters:
sitemap
- the Sitemap object.project
- the corresponding project
-