Class EditEventFunction
- java.lang.Object
-
- org.ametys.plugins.workflow.AbstractWorkflowComponent
-
- org.ametys.plugins.workspaces.workflow.AbstractNodeWorkflowComponent
-
- org.ametys.plugins.workspaces.calendars.workflow.AddEventFunction
-
- org.ametys.plugins.workspaces.calendars.workflow.EditEventFunction
-
- All Implemented Interfaces:
com.opensymphony.workflow.FunctionProvider
,LogEnabled
,Serviceable
public class EditEventFunction extends AddEventFunction
Action for editing a calendar event
-
-
Field Summary
Fields Modifier and Type Field Description protected WorkflowProvider
_workflowProvider
Workflow provider-
Fields inherited from class org.ametys.plugins.workspaces.calendars.workflow.AddEventFunction
_calendarDAO, _calendarEventDAO, _calendarEventJSONHelper, _currentUserProvider, _observationManager, _projectTagsDAO, _resolver
-
Fields inherited from class org.ametys.plugins.workspaces.workflow.AbstractNodeWorkflowComponent
EXPLORERNODE_KEY
-
Fields inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_ERRORS_KEY, WORKFLOW_WARNS_KEY
-
-
Constructor Summary
Constructors Constructor Description EditEventFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ZonedDateTime[]
_computeEventDates(CalendarEvent event, Map<String,Object> jsParameters)
Compute the start date and end date of the event from the edited occurrenceprotected void
_createEventFromOccurrence(CalendarEvent initialEvent, Calendar parentCalendar, Map transientVars, Map<String,Object> jsParameters)
Create a new event from the occurrence of a eventprotected void
_excludeOccurrence(ModifiableCalendarEvent event, ZonedDateTime occurrenceDate)
Exclude a occurrence of a eventprotected void
_notifyListeners(CalendarEvent event)
Notify listeners that the event has been updatedvoid
execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps)
void
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.plugins.workspaces.calendars.workflow.AddEventFunction
_initializeWorkflow, _setEventData
-
Methods inherited from class org.ametys.plugins.workspaces.workflow.AbstractNodeWorkflowComponent
getExplorerNode
-
Methods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUser
-
-
-
-
Field Detail
-
_workflowProvider
protected WorkflowProvider _workflowProvider
Workflow provider
-
-
Constructor Detail
-
EditEventFunction
public EditEventFunction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAddEventFunction
- Throws:
ServiceException
-
execute
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
- Specified by:
execute
in interfacecom.opensymphony.workflow.FunctionProvider
- Overrides:
execute
in classAddEventFunction
- Throws:
com.opensymphony.workflow.WorkflowException
-
_createEventFromOccurrence
protected void _createEventFromOccurrence(CalendarEvent initialEvent, Calendar parentCalendar, Map transientVars, Map<String,Object> jsParameters)
Create a new event from the occurrence of a event- Parameters:
initialEvent
- The initial eventparentCalendar
- The parent calendartransientVars
- The transient variablejsParameters
- The JS parameters
-
_excludeOccurrence
protected void _excludeOccurrence(ModifiableCalendarEvent event, ZonedDateTime occurrenceDate)
Exclude a occurrence of a event- Parameters:
event
- The eventoccurrenceDate
- The date to exclude
-
_computeEventDates
protected ZonedDateTime[] _computeEventDates(CalendarEvent event, Map<String,Object> jsParameters)
Compute the start date and end date of the event from the edited occurrence- Parameters:
event
- The eventjsParameters
- The JS parameters- Returns:
- an array with computed start and end dates
-
_notifyListeners
protected void _notifyListeners(CalendarEvent event)
Notify listeners that the event has been updated- Overrides:
_notifyListeners
in classAddEventFunction
- Parameters:
event
- The updated event
-
-