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
Action for editing a calendar event
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
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 Details
-
_workflowProvider
Workflow provider
-
-
Constructor Details
-
EditEventFunction
public EditEventFunction()
-
-
Method Details
-
service
- 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
Exclude a occurrence of a event- Parameters:
event
- The eventoccurrenceDate
- The date to exclude
-
_computeEventDates
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
Notify listeners that the event has been updated- Overrides:
_notifyListeners
in classAddEventFunction
- Parameters:
event
- The updated event
-