Class CalendarEventActivityType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.repository.activities.DefaultActivityType
org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityType
org.ametys.plugins.workspaces.activities.calendars.CalendarEventActivityType
- All Implemented Interfaces:
ActivityType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
ActivityType
implementation for the creation of a calendar event-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant for event's categorystatic final String
data name for the event idstatic final String
data name for the event titlestatic final String
data name for the calendar idstatic final String
data name for the calendar titleFields inherited from class org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityType
_notificationPreferenceHelper, _projectManager, _resolver, PROJECT_ACCESS, PROJECT_CATEGORY, PROJECT_NAME, PROJECT_TITLE, PROJECT_URL
Fields inherited from class org.ametys.plugins.repository.activities.DefaultActivityType
_currentUserProvider, _userHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadditionnalDataToJSONForClient
(Activity activity) Retrieve data specific to theActivityType
that needs to be serialized but are not stored in theDataHolder
.getMailBodyURI
(Activity activity) Get the URI to resolve to get the mail bodygetProjectFromEvent
(Event event) Retrieve the project concerned by the event.getSubjectI18nParams
(Activity activity) A list of string that will be used to parameterize the i18n keygetTargetAmetysObject
(Activity activity) Retrieve the ametys object targeted by this activity.boolean
isMergeable
(Activity activity1, Activity activity2) Determines if two activities can be mergedmergeActivities
(List<Activity> activities) Merge activities into one activity.void
service
(ServiceManager serviceManager) void
setAdditionalActivityData
(Activity activity, Map<String, Object> parameters) Add the value specific to the activity type to the activityMethods inherited from class org.ametys.plugins.workspaces.activities.AbstractWorkspacesActivityType
_addValueIfExists, getParentProject, getSubjectI18nKey, getUsersEmailToNotify, support
Methods inherited from class org.ametys.plugins.repository.activities.DefaultActivityType
configure, getSupportedEventTypes, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ACTIVITY_CATEGORY_CALENDARS
Constant for event's category- See Also:
-
CALENDAR_EVENT_TITLE
data name for the event title- See Also:
-
CALENDAR_EVENT_ID
data name for the event id- See Also:
-
CALENDAR_TITLE
data name for the calendar title- See Also:
-
CALENDAR_ID
data name for the calendar id- See Also:
-
-
Constructor Details
-
CalendarEventActivityType
public CalendarEventActivityType()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractWorkspacesActivityType
- Throws:
ServiceException
-
setAdditionalActivityData
public void setAdditionalActivityData(Activity activity, Map<String, Object> parameters) throws javax.jcr.RepositoryExceptionDescription copied from interface:ActivityType
Add the value specific to the activity type to the activity- Specified by:
setAdditionalActivityData
in interfaceActivityType
- Overrides:
setAdditionalActivityData
in classAbstractWorkspacesActivityType
- Parameters:
activity
- the activityparameters
- the activity parameters- Throws:
javax.jcr.RepositoryException
- if an error occurs while manipulating the repository
-
additionnalDataToJSONForClient
Description copied from interface:ActivityType
Retrieve data specific to theActivityType
that needs to be serialized but are not stored in theDataHolder
. Those data will be added to the data of the dataHolder- Specified by:
additionnalDataToJSONForClient
in interfaceActivityType
- Overrides:
additionnalDataToJSONForClient
in classAbstractWorkspacesActivityType
- Parameters:
activity
- the activity to serialize- Returns:
- a json map of the specific data
-
isMergeable
Description copied from interface:ActivityType
Determines if two activities can be merged- Specified by:
isMergeable
in interfaceActivityType
- Overrides:
isMergeable
in classAbstractWorkspacesActivityType
- Parameters:
activity1
- The first activityactivity2
- The second activity- Returns:
- true if the events can be merged
-
mergeActivities
Description copied from interface:ActivityType
Merge activities into one activity. Be careful : be sure that the activities can be merged calling isMergeable method before- Specified by:
mergeActivities
in interfaceActivityType
- Overrides:
mergeActivities
in classDefaultActivityType
- Parameters:
activities
- The activities to merge- Returns:
- Merged activities
-
getProjectFromEvent
Description copied from class:AbstractWorkspacesActivityType
Retrieve the project concerned by the event. the event must be supported by the ActivityType.- Specified by:
getProjectFromEvent
in classAbstractWorkspacesActivityType
- Parameters:
event
- an event supported by the activity type- Returns:
- the targeted project
-
getTargetAmetysObject
Description copied from class:AbstractWorkspacesActivityType
Retrieve the ametys object targeted by this activity. This method is intended for right computation purposes.- Specified by:
getTargetAmetysObject
in classAbstractWorkspacesActivityType
- Parameters:
activity
- the activity- Returns:
- the target
-
getSubjectI18nParams
Description copied from class:AbstractWorkspacesActivityType
A list of string that will be used to parameterize the i18n key- Overrides:
getSubjectI18nParams
in classAbstractWorkspacesActivityType
- Parameters:
activity
- the activity- Returns:
- the list of parameters
-
getMailBodyURI
Description copied from class:AbstractWorkspacesActivityType
Get the URI to resolve to get the mail body- Specified by:
getMailBodyURI
in classAbstractWorkspacesActivityType
- Parameters:
activity
- the activity- Returns:
- the uri
-