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 String
The attribute name for the task calendar colorstatic final String
The attribute name to detect is the task calendar is disabledstatic final String
The attribute name for the task calendar namestatic final String
The attribute name for the task calendar tokenstatic final String
The attribute name for the task calendar visibility -
Constructor Summary
ConstructorsConstructorDescriptionTaskCalendar
(Project project, JCRResourcesCollection calendarModuleRoot, WorkspaceTaskDAO taskDAO) The constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
disable
(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 visibilityboolean
true
if the calendar is disabledvoid
Set the calendar namevoid
set the color of the calendarvoid
setDescription
(String desc) set the description of the calendarvoid
setIcsUrlToken
(String token) Set the token used by the ICS public URLvoid
setTemplateDescription
(String templateDesc) set the template description of the calendarvoid
setVisibility
(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
true
if the calendar is disabled- Returns:
true
if the calendar is disabled
-
disable
Disable the task calendar- Parameters:
disabled
-true
to disable the task calendar
-
getId
Description copied from interface:Calendar
Get the id of the calendar- Specified by:
getId
in interfaceCalendar
- Returns:
- the id
- Throws:
AmetysRepositoryException
-
getName
Description copied from interface:Calendar
Get the name of the calendar- Specified by:
getName
in interfaceCalendar
- Returns:
- the name
- Throws:
AmetysRepositoryException
-
rename
Description copied from interface:ModifiableCalendar
Set the calendar name- Specified by:
rename
in interfaceModifiableCalendar
- Parameters:
name
- The name
-
getProject
Description copied from interface:Calendar
Get the project- Specified by:
getProject
in interfaceCalendar
- Returns:
- the project
-
getColor
Description copied from interface:Calendar
Get the color of the calendar -
setColor
Description copied from interface:ModifiableCalendar
set the color of the calendar- Specified by:
setColor
in interfaceModifiableCalendar
- Parameters:
color
- The color to set
-
getVisibility
Description copied from interface:Calendar
Get the calendar visibility- Specified by:
getVisibility
in interfaceCalendar
- Returns:
- the calendar visibility
-
setVisibility
Description copied from interface:ModifiableCalendar
Set the visibility of the calendar- Specified by:
setVisibility
in interfaceModifiableCalendar
- Parameters:
visibility
- The visibility
-
getIcsUrlToken
Description copied from interface:Calendar
Get the token used by the ICS public URL- Specified by:
getIcsUrlToken
in interfaceCalendar
- Returns:
- The token, or null if no token exists for the calendar
-
setIcsUrlToken
Description copied from interface:ModifiableCalendar
Set the token used by the ICS public URL- Specified by:
setIcsUrlToken
in interfaceModifiableCalendar
- Parameters:
token
- The token, or null to delete the existing token
-
getDescription
Description copied from interface:Calendar
Get the description of the calendar- Specified by:
getDescription
in interfaceCalendar
- Returns:
- the description
-
setDescription
Description copied from interface:ModifiableCalendar
set the description of the calendar- Specified by:
setDescription
in interfaceModifiableCalendar
- Parameters:
desc
- The description
-
getTemplateDescription
Description copied from interface:Calendar
Get the template description of the calendar- Specified by:
getTemplateDescription
in interfaceCalendar
- Returns:
- the template description of the calendar
-
setTemplateDescription
Description copied from interface:ModifiableCalendar
set the template description of the calendar- Specified by:
setTemplateDescription
in interfaceModifiableCalendar
- Parameters:
templateDesc
- The template description
-
getChildCalendars
Description copied from interface:Calendar
Get the child calendars- Specified by:
getChildCalendars
in interfaceCalendar
- Returns:
- the child calendars
-
getAllEvents
Description copied from interface:Calendar
Get all events of the calendar- Specified by:
getAllEvents
in interfaceCalendar
- Returns:
- the list of events
-
getEvents
public Map<CalendarEvent,List<CalendarEventOccurrence>> getEvents(ZonedDateTime startDate, ZonedDateTime endDate) Description copied from interface:Calendar
Get the events and its occurrences of the calendar between two dates
-