Class InitializeCalendarObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.project.observers.AbstractInitializeProjectObserver
org.ametys.plugins.workspaces.project.observers.InitializeCalendarObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class InitializeCalendarObserver
extends AbstractInitializeProjectObserver
implements Configurable
Initialize the calendar when a project is created
-
Field Summary
Modifier and TypeFieldDescriptionprotected WorkspaceCalendarDAO
Workspace Calendar DAOprotected I18nUtils
The i18n utils.protected WorkspaceModuleExtensionPoint
Workspace Module Extension PointFields 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 TypeMethodDescriptionvoid
configure
(Configuration configuration) protected void
This method will be called byObserver.observe(Event, Map)
when there is a project on this siteprotected String
Get the lang for this project, or fr if none foundint
getPriority
(Event event) Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.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.Methods inherited from class org.ametys.plugins.workspaces.project.observers.AbstractInitializeProjectObserver
observe, supports
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_calendarDAO
Workspace Calendar DAO -
_moduleEP
Workspace Module Extension Point -
_i18nUtils
The i18n utils.
-
-
Constructor Details
-
InitializeCalendarObserver
public InitializeCalendarObserver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractInitializeProjectObserver
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getPriority
Description copied from interface:Observer
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.- Specified by:
getPriority
in interfaceObserver
- Overrides:
getPriority
in classAbstractInitializeProjectObserver
- Parameters:
event
- the event.- Returns:
- the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
-
doObserve
protected 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
-
getLang
Get the lang for this project, or fr if none found- Parameters:
project
- the project to check- Returns:
- a lang in this project
-
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.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-