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 class org.ametys.plugins.workflow.AbstractWorkflowComponent
AbstractWorkflowComponent.ConditionFailureNested classes/interfaces inherited from interface org.ametys.plugins.workflow.EnhancedFunction
EnhancedFunction.FunctionType -
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_VALIDATION_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, JCRCalendar 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 updatedvoidgetLabel()Get the label for this functionvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.plugins.workspaces.calendars.workflow.AddEventFunction
_initializeWorkflow, _setEventData, getFunctionExecTypeMethods inherited from class org.ametys.plugins.workspaces.workflow.AbstractNodeWorkflowComponent
getExplorerNodeMethods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUserMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.plugins.workflow.EnhancedFunction
getArguments, getFullLabel, getVisibilities
-
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, JCRCalendar 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
-
getLabel
Description copied from interface:EnhancedFunctionGet the label for this function- Specified by:
getLabelin interfaceEnhancedFunction- Overrides:
getLabelin classAddEventFunction- Returns:
- the label
-