public class WorkspaceCalendarDAO extends CalendarDAO
Modifier and Type | Field and Description |
---|---|
private MessagingConnectorCalendarManager |
_messagingConnectorCalendarManager |
private ProjectManager |
_projectManager |
static String |
RIGHTS_PLACE_ADD
Right to add a place
|
static String |
RIGHTS_PLACE_DELETE
Right to delete a place
|
static String |
RIGHTS_TAG_ADD
Right to add a tag
|
static String |
RIGHTS_TAG_DELETE
Right to delete a tag
|
static String |
ROLE
Avalon Role
|
_currentUserProvider, _explorerResourcesDAO, _observationManager, _resolver, _rightManager, _userManager, _workflowHelper, _workflowProvider, RIGHTS_CALENDAR_ADD, RIGHTS_CALENDAR_DELETE, RIGHTS_CALENDAR_EDIT, RIGHTS_EVENT_ADD, RIGHTS_EVENT_DELETE, RIGHTS_EVENT_DELETE_OWN, RIGHTS_EVENT_EDIT, RIGHTS_EVENT_PROPOSE, RIGHTS_EVENT_REFUSE, RIGHTS_EVENT_VALIDATE
Constructor and Description |
---|
WorkspaceCalendarDAO() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
_extractCalendarRightData(Calendar calendar)
Internal method to extract the data concerning the right of the current user for a calendar
|
protected Map<String,Object> |
_extractEventRightData(CalendarEvent event)
Internal method to extract the data concerning the right of the current user for an event
|
protected Map<String,Object> |
_getAction(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Get a map of data about an action
|
protected List<Map<String,Object>> |
_getActions(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor)
Get the actions of a workflow
|
protected Map<String,Object> |
_getStep(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
Get a map of data about a step
|
protected List<Map<String,Object>> |
_getSteps(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor)
Get the steps of a workflow
|
protected Collection<String> |
_sanitizeEventKeywordsInput(Collection<String> keywords)
Sanitize the keyword parameters received as input
|
protected String |
_sanitizeEventLocationsInput(Collection<String> locations)
Sanitize the locations parameters received as input
|
Map<String,Object> |
addEvent(Map<String,Object> parameters)
Add an event
|
Map<String,Object> |
deleteEvent(String id,
String occurrence,
String choice)
Delete an event
|
Map<String,Object> |
editEvent(Map<String,Object> parameters)
Edit an event
|
Map<String,Object> |
getCalendarData(Calendar calendar,
boolean recursive,
boolean includeEvents)
Get calendar info
|
Map<String,Object> |
getEventData(CalendarEvent event,
boolean fullInfo)
Get event info
|
List<Map<String,Object>> |
getWorkflows(boolean withSteps)
Retrieves the available workflows for the calendars
|
Map<String,Object> |
getWorkflowState(String eventId)
Get the workflow state of an event
|
void |
service(ServiceManager manager) |
_getEventDataFullInfo, _getUserRights, addCalendar, deleteCalendar, doWorkflowEventAction, editCalendar, getCalendarData, getEventData, getEventDataById, getEventDataById, getEventOccurrenceData, getEventsData, getEventsDataByIds, getTemplateDescription, move
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public static final String RIGHTS_TAG_ADD
public static final String RIGHTS_TAG_DELETE
public static final String RIGHTS_PLACE_ADD
public static final String RIGHTS_PLACE_DELETE
private ProjectManager _projectManager
private MessagingConnectorCalendarManager _messagingConnectorCalendarManager
public WorkspaceCalendarDAO()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class CalendarDAO
ServiceException
public Map<String,Object> addEvent(Map<String,Object> parameters) throws com.opensymphony.workflow.WorkflowException, IllegalAccessException
parameters
- The map of parameters to perform the actioncom.opensymphony.workflow.WorkflowException
- if an error occurredIllegalAccessException
- If the user does not have the right to add an eventpublic Map<String,Object> editEvent(Map<String,Object> parameters) throws com.opensymphony.workflow.WorkflowException
parameters
- The map of parameters to perform the actioncom.opensymphony.workflow.WorkflowException
- if an error occurredpublic Map<String,Object> deleteEvent(String id, String occurrence, String choice) throws IllegalAccessException
CalendarDAO
deleteEvent
in class CalendarDAO
id
- The id of the eventoccurrence
- a string representing the occurrence date (ISO format).choice
- The type of modificationIllegalAccessException
- If the user has no sufficient rightspublic Map<String,Object> getCalendarData(Calendar calendar, boolean recursive, boolean includeEvents)
CalendarDAO
getCalendarData
in class CalendarDAO
calendar
- The calendarrecursive
- True to get data for sub calendarsincludeEvents
- True to also include child eventspublic Map<String,Object> getEventData(CalendarEvent event, boolean fullInfo)
CalendarDAO
getEventData
in class CalendarDAO
event
- The eventfullInfo
- true to include full info (rights, parent id, etc...)public List<Map<String,Object>> getWorkflows(boolean withSteps)
withSteps
- true to include the list of steps and corresponding actionspublic Map<String,Object> getWorkflowState(String eventId)
eventId
- The id of the eventprotected List<Map<String,Object>> _getSteps(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor)
workflowDescriptor
- workflow descriptorprotected Map<String,Object> _getStep(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
workflowDescriptor
- workflow descriptorstepDescriptor
- step descriptorprotected List<Map<String,Object>> _getActions(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor)
workflowDescriptor
- workflow descriptorprotected Map<String,Object> _getAction(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
workflowDescriptor
- workflow descriptoractionDescriptor
- action descriptorprotected Map<String,Object> _extractEventRightData(CalendarEvent event)
event
- The eventprotected Map<String,Object> _extractCalendarRightData(Calendar calendar)
calendar
- The calendarprotected String _sanitizeEventLocationsInput(Collection<String> locations)
locations
- collection of locations passed as an inputprotected Collection<String> _sanitizeEventKeywordsInput(Collection<String> keywords)
keywords
- collection of keywords passed as an input