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
FieldsModifier and TypeFieldDescriptionstatic final Stringapplication id for resources collections.static final StringConstants for color Calendar*static final StringConstants for description Calendar*static final StringConstants for Calendar ICS tokenstatic final StringConstants for template description Calendar*static final StringConstants for title Calendar*static final StringConstants for color Visibility*static final StringConstants for workflowName Calendar*Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionJCRCalendar(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 theDataHolderof 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 calendarbooleanReturns true if this explorer node contains child explorer nodes.voidset 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 calendarvoidsetWorkflowName(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, removeDeniedUsersMethods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAXMethods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNodeMethods inherited from interface org.ametys.cms.data.ametysobject.ModelAwareDataAwareAmetysObject
getSystemPropertyExtensionPoint, indexData, indexDataMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAXForEdition, getComments, getDataNames, getDefinition, getDifferences, getDifferences, getDifferences, getDifferences, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, hasDifferences, hasDifferences, hasDifferences, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmptyMethods 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, isMultipleMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryDataMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.cms.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRootDataHolderMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getRepositoryData, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChildMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
removeMethods 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 thisAmetysObjectparentPath- the parentPath in the Ametys hierarchyfactory- the DefaultAmetysObjectFactory which created the AmetysObject
-
-
Method Details
-
getIconCls
Description copied from interface:ExplorerNodeReturns the icon css class for this Node.- Specified by:
getIconClsin interfaceExplorerNode- Returns:
- the icon css class for this Node for rendering in the tree.
-
getApplicationId
Description copied from interface:ExplorerNodeReturns the application id corresponding to this Node.- Specified by:
getApplicationIdin interfaceExplorerNode- Returns:
- the application id corresponding to this Node.
-
getExplorerPath
Description copied from interface:ExplorerNodeReturns 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:
getExplorerPathin interfaceExplorerNode- Returns:
- the path of this node in its hierarchy.
-
getDescription
Description copied from interface:ExplorerNodeGet the description of the application- Specified by:
getDescriptionin interfaceExplorerNode- Returns:
- the description
-
getColor
Description copied from interface:CalendarGet the color of the calendar -
getVisibility
Description copied from interface:CalendarGet the calendar visibility- Specified by:
getVisibilityin interfaceCalendar- Returns:
- the calendar visibility
-
getWorkflowName
Description copied from interface:CalendarGet the name of the workflow of the calendar- Specified by:
getWorkflowNamein interfaceCalendar- Returns:
- the name of the workflow of the calendar
-
getTemplateDescription
Description copied from interface:CalendarGet the template description of the calendar- Specified by:
getTemplateDescriptionin interfaceCalendar- Returns:
- the template description of the calendar
-
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 -
setDescription
Description copied from interface:ModifiableCalendarset the description of the calendar- Specified by:
setDescriptionin interfaceModifiableCalendar- Specified by:
setDescriptionin interfaceModifiableExplorerNode- Parameters:
desc- The description
-
setColor
Description copied from interface:ModifiableCalendarset the color of the calendar- Specified by:
setColorin interfaceModifiableCalendar- Parameters:
color- The color to set
-
setVisibility
Description copied from interface:ModifiableCalendarSet the visibility of the calendar- Specified by:
setVisibilityin interfaceModifiableCalendar- Parameters:
visibility- The visibility
-
setWorkflowName
Description copied from interface:ModifiableCalendarset the name of the workflow of the calendar- Specified by:
setWorkflowNamein interfaceModifiableCalendar- Parameters:
workflowName- The workflow name
-
setTemplateDescription
Description copied from interface:ModifiableCalendarset the template description of the calendar- Specified by:
setTemplateDescriptionin interfaceModifiableCalendar- Parameters:
templateDesc- The template description
-
hasChildExplorerNodes
Description copied from interface:ExplorerNodeReturns true if this explorer node contains child explorer nodes.- Specified by:
hasChildExplorerNodesin interfaceExplorerNode- Returns:
- true if this explorer node contains child explorer nodes.
- Throws:
AmetysRepositoryException- if an error occurs.
-
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
-
getDataHolder
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-