Class TaskCalendar
java.lang.Object
org.ametys.plugins.workspaces.calendars.task.TaskCalendar
- All Implemented Interfaces:
Calendar,ModifiableCalendar
Task calendar object
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.plugins.workspaces.calendars.Calendar
Calendar.CalendarVisibility -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe attribute name for the task calendar colorstatic final StringThe attribute name to detect is the task calendar is disabledstatic final StringThe attribute name for the task calendar namestatic final StringThe attribute name for the task calendar tokenstatic final StringThe attribute name for the task calendar visibility -
Constructor Summary
ConstructorsConstructorDescriptionTaskCalendar(Project project, JCRResourcesCollection calendarModuleRoot, WorkspaceTaskDAO taskDAO) The constructor -
Method Summary
Modifier and TypeMethodDescriptionvoiddisable(boolean disabled) Disable the task calendarGet all events of the calendarGet the child calendarsgetColor()Get the color of the calendarGet the description of the calendargetEvents(ZonedDateTime startDate, ZonedDateTime endDate) Get the events and its occurrences of the calendar between two datesGet the token used by the ICS public URLgetId()Get the id of the calendargetName()Get the name of the calendarGet the projectGet the template description of the calendarGet the calendar visibilitybooleantrueif the calendar is disabledvoidSet the calendar namevoidset the color of the calendarvoidsetDescription(String desc) set the description of the calendarvoidsetIcsUrlToken(String token) Set the token used by the ICS public URLvoidsetTemplateDescription(String templateDesc) set the template description of the calendarvoidsetVisibility(Calendar.CalendarVisibility visibility) Set the visibility of the calendar
-
Field Details
-
TASK_CALENDAR_DISABLED_ATTR
The attribute name to detect is the task calendar is disabled- See Also:
-
TASK_CALENDAR_NAME_ATTR
The attribute name for the task calendar name- See Also:
-
TASK_CALENDAR_TOKEN_ATTR
The attribute name for the task calendar token- See Also:
-
TASK_CALENDAR_VISIBILITY_ATTR
The attribute name for the task calendar visibility- See Also:
-
TASK_CALENDAR_COLOR_ATTR
The attribute name for the task calendar color- See Also:
-
-
Constructor Details
-
TaskCalendar
public TaskCalendar(Project project, JCRResourcesCollection calendarModuleRoot, WorkspaceTaskDAO taskDAO) The constructor- Parameters:
project- the projectcalendarModuleRoot- the calendar module roottaskDAO- the task DAO
-
-
Method Details
-
isDisabled
trueif the calendar is disabled- Returns:
trueif the calendar is disabled
-
disable
Disable the task calendar- Parameters:
disabled-trueto disable the task calendar
-
getId
Description copied from interface:CalendarGet the id of the calendar- Specified by:
getIdin interfaceCalendar- Returns:
- the id
- Throws:
AmetysRepositoryException
-
getName
Description copied from interface:CalendarGet the name of the calendar- Specified by:
getNamein interfaceCalendar- Returns:
- the name
- Throws:
AmetysRepositoryException
-
rename
Description copied from interface:ModifiableCalendarSet the calendar name- Specified by:
renamein interfaceModifiableCalendar- Parameters:
name- The name
-
getProject
Description copied from interface:CalendarGet the project- Specified by:
getProjectin interfaceCalendar- Returns:
- the project
-
getColor
Description copied from interface:CalendarGet the color of the calendar -
setColor
Description copied from interface:ModifiableCalendarset the color of the calendar- Specified by:
setColorin interfaceModifiableCalendar- Parameters:
color- The color to set
-
getVisibility
Description copied from interface:CalendarGet the calendar visibility- Specified by:
getVisibilityin interfaceCalendar- Returns:
- the calendar visibility
-
setVisibility
Description copied from interface:ModifiableCalendarSet the visibility of the calendar- Specified by:
setVisibilityin interfaceModifiableCalendar- Parameters:
visibility- The visibility
-
getIcsUrlToken
Description copied from interface:CalendarGet the token used by the ICS public URL- Specified by:
getIcsUrlTokenin interfaceCalendar- Returns:
- The token, or null if no token exists for the calendar
-
setIcsUrlToken
Description copied from interface:ModifiableCalendarSet the token used by the ICS public URL- Specified by:
setIcsUrlTokenin interfaceModifiableCalendar- Parameters:
token- The token, or null to delete the existing token
-
getDescription
Description copied from interface:CalendarGet the description of the calendar- Specified by:
getDescriptionin interfaceCalendar- Returns:
- the description
-
setDescription
Description copied from interface:ModifiableCalendarset the description of the calendar- Specified by:
setDescriptionin interfaceModifiableCalendar- Parameters:
desc- The description
-
getTemplateDescription
Description copied from interface:CalendarGet the template description of the calendar- Specified by:
getTemplateDescriptionin interfaceCalendar- Returns:
- the template description of the calendar
-
setTemplateDescription
Description copied from interface:ModifiableCalendarset the template description of the calendar- Specified by:
setTemplateDescriptionin interfaceModifiableCalendar- Parameters:
templateDesc- The template description
-
getChildCalendars
Description copied from interface:CalendarGet the child calendars- Specified by:
getChildCalendarsin interfaceCalendar- Returns:
- the child calendars
-
getAllEvents
Description copied from interface:CalendarGet all events of the calendar- Specified by:
getAllEventsin interfaceCalendar- Returns:
- the list of events
-
getEvents
public Map<CalendarEvent,List<CalendarEventOccurrence>> getEvents(ZonedDateTime startDate, ZonedDateTime endDate) Description copied from interface:CalendarGet the events and its occurrences of the calendar between two dates
-