public class InitializeProjectSitemapObserver extends AbstractLogEnabled implements Observer, Serviceable, PluginAware
| Modifier and Type | Field and Description |
|---|---|
protected CurrentUserProvider |
_currentUserProvider
Current user provider
|
protected String |
_i18nCatalogue
The i18n catalogue.
|
protected I18nUtils |
_i18nUtils
The i18n utils.
|
protected ObservationManager |
_observationManager
The observation manager.
|
protected String |
_pluginName
The plugin name.
|
protected ProjectManager |
_projectManager
Workspaces project manager
|
protected ServiceExtensionPoint |
_serviceEP
The service extension point.
|
protected SkinsManager |
_skinsManager
The skins manager.
|
protected WorkflowProvider |
_workflowProvider
The workflow provider
|
MAX_PRIORITY, MIN_PRIORITY| Constructor and Description |
|---|
InitializeProjectSitemapObserver() |
| Modifier and Type | Method and Description |
|---|---|
protected ModifiablePage |
_createPage(Sitemap sitemap,
String name,
I18nizableText i18nTitle)
Create a new page if not already exists
|
private String |
_getDefaultXslt(String serviceId) |
protected void |
_initializeIndexBottomLeftZone(ModifiablePage indexPage,
String zoneName)
Initialize the bottom left zone for the index page
|
protected void |
_initializeIndexBottomRightZone(ModifiablePage indexPage,
String zoneName)
Initialize the bottom right zone for the index page
|
protected void |
_initializeIndexDefaultZone(ModifiablePage indexPage)
Initialize the default zone for the index page
|
protected void |
_initializeIndexPage(ModifiablePage indexPage)
Initialize the index page.
|
protected void |
_initializeSitemap(Sitemap sitemap,
Project project)
Initialize the given sitemap.
|
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
void |
observe(Event event,
Map<String,Object> transientVars)
Observes an event.
|
void |
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. |
boolean |
supports(Event event)
Checks if the event is supported.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected ProjectManager _projectManager
protected I18nUtils _i18nUtils
protected ObservationManager _observationManager
protected SkinsManager _skinsManager
protected CurrentUserProvider _currentUserProvider
protected ServiceExtensionPoint _serviceEP
protected String _pluginName
protected String _i18nCatalogue
protected WorkflowProvider _workflowProvider
public InitializeProjectSitemapObserver()
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAwaresetPluginInfo in interface PluginAwarepluginName - Unique identifier for the plugin hosting the extensionfeatureName - Unique feature identifier (unique for a given pluginName)id - Unique identifier of this componentpublic void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic boolean supports(Event event)
Observerpublic int getPriority(Event event)
ObservergetPriority in interface Observerevent - the event.public void observe(Event event, Map<String,Object> transientVars) throws Exception
Observerobserve in interface Observerevent - the event.transientVars - transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.Exception - if an error occurs.
All exceptions will be logged but not propagated, as the observation mechanism should never fail.protected void _initializeSitemap(Sitemap sitemap, Project project)
sitemap - the Sitemap object.project - the corresponding projectprotected ModifiablePage _createPage(Sitemap sitemap, String name, I18nizableText i18nTitle)
sitemap - The sitemap where the page will be createdname - The page's namei18nTitle - The page's titlenull if page already existsprotected void _initializeIndexPage(ModifiablePage indexPage)
indexPage - the index page.protected void _initializeIndexDefaultZone(ModifiablePage indexPage)
indexPage - The index pageprotected void _initializeIndexBottomLeftZone(ModifiablePage indexPage, String zoneName)
indexPage - the index pagezoneName - The zone name where to insert the serviceprotected void _initializeIndexBottomRightZone(ModifiablePage indexPage, String zoneName)
indexPage - the index pagezoneName - The zone name where to insert the serviceprivate String _getDefaultXslt(String serviceId)