public class WorkspaceCalendarDAO extends CalendarDAO
| Modifier and Type | Field and Description | 
|---|---|
private MessagingConnectorCalendarManager | 
_messagingConnectorCalendarManager  | 
private ProjectManager | 
_projectManager  | 
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 
 | 
Calendar | 
getCalendarFromIcsToken(String token)
Retrieve the calendar for the matching ICS token 
 | 
String | 
getCalendarIcsToken(Calendar calendar,
                   boolean createIfNotExisting)
Get or create the calendar ICS token 
 | 
Map<String,Object> | 
getCalendarIcsToken(String calendarId)
Get the ICS token for the given calendar 
 | 
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, moveenableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate ProjectManager _projectManager
private MessagingConnectorCalendarManager _messagingConnectorCalendarManager
public WorkspaceCalendarDAO()
public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class CalendarDAOServiceExceptionpublic 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
CalendarDAOdeleteEvent in class CalendarDAOid - 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)
CalendarDAOgetCalendarData in class CalendarDAOcalendar - The calendarrecursive - True to get data for sub calendarsincludeEvents - True to also include child eventspublic Map<String,Object> getEventData(CalendarEvent event, boolean fullInfo)
CalendarDAOgetEventData in class CalendarDAOevent - 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 eventpublic Map<String,Object> getCalendarIcsToken(String calendarId)
calendarId - The calendar idpublic String getCalendarIcsToken(Calendar calendar, boolean createIfNotExisting)
calendar - The calendarcreateIfNotExisting - Create the token if none exists for the given calendarpublic Calendar getCalendarFromIcsToken(String token)
token - The ICS tokenprotected 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