Class JCRCalendar
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<JCRCalendarFactory>
org.ametys.plugins.workspaces.calendars.jcr.JCRCalendar
- All Implemented Interfaces:
ModelAwareDataAwareAmetysObject
,ModifiableModelAwareDataAwareAmetysObject
,IndexableDataHolder
,ModifiableIndexableDataHolder
,ExplorerNode
,ModifiableExplorerNode
,ACLAmetysObject
,AmetysObject
,DataAwareAmetysObject
,ModelAwareDataAwareAmetysObject
,ModifiableModelAwareDataAwareAmetysObject
,DataHolder
,ModelAwareDataHolder
,ModifiableDataHolder
,ModifiableModelAwareDataHolder
,JCRAmetysObject
,JCRTraversableAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,ModifiableTraversableAmetysObject
,RemovableAmetysObject
,TraversableAmetysObject
,Calendar
,ModifiableCalendar
public class JCRCalendar
extends DefaultTraversableAmetysObject<JCRCalendarFactory>
implements ModifiableCalendar
Default implementation of an
Calendar
, backed by a JCR node.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.plugins.workspaces.calendars.Calendar
Calendar.CalendarVisibility
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
application id for resources collections.static final String
Constants for color Calendar*static final String
Constants for description Calendar*static final String
Constants for Calendar ICS tokenstatic final String
Constants for template description Calendar*static final String
Constants for title Calendar*static final String
Constants for color Visibility*static final String
Constants for workflowName Calendar*Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
-
Constructor Summary
ConstructorDescriptionJCRCalendar
(javax.jcr.Node node, String parentPath, JCRCalendarFactory factory) Creates anJCRCalendar
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the application id corresponding to this Node.getColor()
Get the color of the calendarReturns theDataHolder
of thisAmetysObject
.Get the description of the applicationgetEvents
(ZonedDateTime startDate, ZonedDateTime endDate) Get the events and its occurrences of the calendar between two datesReturns the path of this explorer node in the explorer hierarchy (which is a subset of the whole repository).
If this collection is the root explorer node, "" is returned.Returns the icon css class for this Node.Get the token used by the ICS public URLGet the template description of the calendarGet the calendar visibilityGet the name of the workflow of the calendarboolean
Returns true if this explorer node contains child explorer nodes.void
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 calendarvoid
setWorkflowName
(String workflowName) set the name of the workflow of the calendarMethods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, disallowInheritance, getChild, getChildren, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasChild, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
Methods inherited from interface org.ametys.cms.data.ametysobject.ModelAwareDataAwareAmetysObject
getSystemPropertyExtensionPoint, indexData, indexData
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAXForEdition, getComments, getDataNames, getDefinition, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, hasDifferences, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmpty
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getDataNames, getType, getValue, hasValue, hasValueOrEmpty, isMultiple
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryData
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
Methods inherited from interface org.ametys.cms.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRootDataHolder
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getRepositoryData, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues
Methods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChild
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, getChildren, hasChild
-
Field Details
-
APPLICATION_ID
application id for resources collections.- See Also:
-
CALENDAR_TITLE
Constants for title Calendar*- See Also:
-
CALENDAR_DESC
Constants for description Calendar*- See Also:
-
CALENDAR_COLOR
Constants for color Calendar*- See Also:
-
CALENDAR_VISIBILITY
Constants for color Visibility*- See Also:
-
CALENDAR_WORKFLOW_NAME
Constants for workflowName Calendar*- See Also:
-
CALENDAR_TEMPLATE_DESC
Constants for template description Calendar*- See Also:
-
CALENDAR_ICS_TOKEN
Constants for Calendar ICS token- See Also:
-
-
Constructor Details
-
JCRCalendar
Creates anJCRCalendar
.- Parameters:
node
- the node backing thisAmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the DefaultAmetysObjectFactory which created the AmetysObject
-
-
Method Details
-
getIconCls
Description copied from interface:ExplorerNode
Returns the icon css class for this Node.- Specified by:
getIconCls
in interfaceExplorerNode
- Returns:
- the icon css class for this Node for rendering in the tree.
-
getApplicationId
Description copied from interface:ExplorerNode
Returns the application id corresponding to this Node.- Specified by:
getApplicationId
in interfaceExplorerNode
- Returns:
- the application id corresponding to this Node.
-
getExplorerPath
Description copied from interface:ExplorerNode
Returns the path of this explorer node in the explorer hierarchy (which is a subset of the whole repository).
If this collection is the root explorer node, "" is returned.- Specified by:
getExplorerPath
in interfaceExplorerNode
- Returns:
- the path of this node in its hierarchy.
-
getDescription
Description copied from interface:ExplorerNode
Get the description of the application- Specified by:
getDescription
in interfaceExplorerNode
- Returns:
- the description
-
getColor
Description copied from interface:Calendar
Get the color of the calendar -
getVisibility
Description copied from interface:Calendar
Get the calendar visibility- Specified by:
getVisibility
in interfaceCalendar
- Returns:
- the calendar visibility
-
getWorkflowName
Description copied from interface:Calendar
Get the name of the workflow of the calendar- Specified by:
getWorkflowName
in interfaceCalendar
- Returns:
- the name of the workflow of the calendar
-
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
-
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 -
setDescription
Description copied from interface:ModifiableCalendar
set the description of the calendar- Specified by:
setDescription
in interfaceModifiableCalendar
- Specified by:
setDescription
in interfaceModifiableExplorerNode
- Parameters:
desc
- The description
-
setColor
Description copied from interface:ModifiableCalendar
set the color of the calendar- Specified by:
setColor
in interfaceModifiableCalendar
- Parameters:
color
- The color to set
-
setVisibility
Description copied from interface:ModifiableCalendar
Set the visibility of the calendar- Specified by:
setVisibility
in interfaceModifiableCalendar
- Parameters:
visibility
- The visibility
-
setWorkflowName
Description copied from interface:ModifiableCalendar
set the name of the workflow of the calendar- Specified by:
setWorkflowName
in interfaceModifiableCalendar
- Parameters:
workflowName
- The workflow name
-
setTemplateDescription
Description copied from interface:ModifiableCalendar
set the template description of the calendar- Specified by:
setTemplateDescription
in interfaceModifiableCalendar
- Parameters:
templateDesc
- The template description
-
hasChildExplorerNodes
Description copied from interface:ExplorerNode
Returns true if this explorer node contains child explorer nodes.- Specified by:
hasChildExplorerNodes
in interfaceExplorerNode
- Returns:
- true if this explorer node contains child explorer nodes.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
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
-
getDataHolder
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelAwareDataAwareAmetysObject
- Returns:
- the
DataHolder
of thisAmetysObject
-