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,EnhancedFunction,LogEnabled,Serviceable
Action for editing a calendar event
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.plugins.workflow.EnhancedFunction
EnhancedFunction.FunctionArgument -
Field Summary
FieldsFields inherited from class org.ametys.plugins.workspaces.calendars.workflow.AddEventFunction
_calendarDAO, _calendarEventDAO, _calendarEventJSONHelper, _currentUserProvider, _observationManager, _projectTagsDAO, _resolverFields inherited from class org.ametys.plugins.workspaces.workflow.AbstractNodeWorkflowComponent
EXPLORERNODE_KEYFields 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 -
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 updatedvoidGet the list of accepted arguments for this functiongetDescription(Map<String, String> args) Get the function descriptions depending on arguments valuesvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.plugins.workspaces.calendars.workflow.AddEventFunction
_initializeWorkflow, _setEventDataMethods inherited from class org.ametys.plugins.workspaces.workflow.AbstractNodeWorkflowComponent
getExplorerNodeMethods 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:
servicein interfaceServiceable- Overrides:
servicein classAddEventFunction- Throws:
ServiceException
-
execute
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException - Specified by:
executein interfacecom.opensymphony.workflow.FunctionProvider- Overrides:
executein 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:
_notifyListenersin classAddEventFunction- Parameters:
event- The updated event
-
getArguments
Description copied from interface:EnhancedFunctionGet the list of accepted arguments for this function- Specified by:
getArgumentsin interfaceEnhancedFunction- Overrides:
getArgumentsin classAddEventFunction- Returns:
- a List of argument names and associated description
-
getDescription
Description copied from interface:EnhancedFunctionGet the function descriptions depending on arguments values- Specified by:
getDescriptionin interfaceEnhancedFunction- Overrides:
getDescriptionin classAddEventFunction- Parameters:
args- a map of the arguments with their values in current workflow- Returns:
- a description to display in workflow editor vue
-