Class JCRCalendarEvent
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<JCRCalendarEventFactory>
org.ametys.plugins.workspaces.calendars.jcr.JCRCalendarEvent
- All Implemented Interfaces:
ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,IndexableDataHolder,ModifiableIndexableDataHolder,ACLAmetysObject,AmetysObject,DataAwareAmetysObject,ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,DataHolder,ModelAwareDataHolder,ModifiableDataHolder,ModifiableModelAwareDataHolder,JCRAmetysObject,JCRTraversableAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,ModifiableTraversableAmetysObject,RemovableAmetysObject,TagAwareAmetysObject,TaggableAmetysObject,TraversableAmetysObject,WorkflowAwareAmetysObject,CalendarEvent,ModifiableCalendarEvent
public class JCRCalendarEvent
extends DefaultTraversableAmetysObject<JCRCalendarEventFactory>
implements ModifiableCalendarEvent
Default implementation of an
CalendarEvent, backed by a JCR node.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAttribute name for event last contributorstatic final StringAttribute name for event lastModifiedstatic final StringAttribute name for event authorstatic final StringAttribute name for event date sonestatic final StringAttribute name for event descriptionstatic final StringAttribute name for event endDatestatic final StringAttribute name for event excluded datestatic final StringAttribute name for event fullDaystatic final StringAttribute name for event keywords'static final StringAttribute name for event locationstatic final StringAttribute name for event lastModifiedstatic final StringAttribute name for event organiserstatic final StringAttribute name for event recurrence typestatic final StringProperty's name for resourcesstatic final StringAttribute name for event startDatestatic final StringAttribute name for event titlestatic final StringAttribute name for event until datestatic final StringName of the node for attendee *static final StringName of the node for attendees *static final StringProperty name for attendee email *static final StringProperty name for attendee external *static final StringProperty name for attendee login *static final StringProperty name for attendee mandatory *static final StringProperty name for attendee population *static final StringProperty's name for workflow idFields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionJCRCalendarEvent(javax.jcr.Node node, String parentPath, JCRCalendarEventFactory factory) Creates anJCRCalendarEvent. -
Method Summary
Modifier and TypeMethodDescriptionGet attendees to the eventRetrieves the creation date.Retrieves the the creator.longRetrieves the current step id of the Ametys objectReturns theDataHolderof thisAmetysObject.Get the description of the eventGet the date of the end of the eventRetrieves the list of excluded event date.Retrieves the start date of the first Event which end after the dateGet if the event last all the dayRetrieves the last contributor.Retrieves the last modification date.Get the location of the eventgetNextOccurrence(CalendarEventOccurrence occurrence) Retrieves the date of the next event after the dategetOccurrences(ZonedDateTime startDate, ZonedDateTime endDate) Retrieves the list of all event date between startDate and endDate.Retrieves the organiser.Retrieves the recurrence type.Retrieves the end date of the frequency.Retrieves the resource list.Get the date of the begin of the eventgetTags()Retrieves current tags.getTitle()Get the title of the eventlongRetrieves the workflow id associated with the Ametys object.getZone()Get the date zone of the eventRetrieves if the event is recurrent.voidsetAttendees(List<CalendarEventAttendee> attendees) Set attendees to the eventvoidsetCreationDate(ZonedDateTime date) Set the creation datevoidsetCreator(UserIdentity user) Set the creatorvoidsetCurrentStepId(long stepId) Set the current step id of the Ametys objectvoidsetDescription(String desc) Set the description of the eventvoidsetEndDate(ZonedDateTime endDate) Set the endDate of the eventvoidsetExcludedOccurrences(List<ZonedDateTime> excludedOccurrences) Set the list of excluded event date.voidsetFullDay(Boolean fullDay) Set if the event last all the dayvoidSet the last contributorvoidsetLastModified(ZonedDateTime date) Set the last modified datevoidsetLocation(String location) Set the location of the eventvoidsetOrganiser(UserIdentity user) Set the oragniservoidsetRecurrenceType(String recurrenceType) Set the recurrence type.voidsetRepeatUntil(ZonedDateTime untilDate) Set the end date of the frequency.voidsetResources(List<String> resources) Set the resourcesvoidsetStartDate(ZonedDateTime startDate) Set the startDate of the eventvoidSet the title of the eventvoidsetWorkflowId(long workflowId) Set the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.voidSet the date zone of the eventvoidTags.voidUntags.Methods 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, 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, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, 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.RemovableAmetysObject
removeMethods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
Field Details
-
ATTRIBUTE_CREATOR
Attribute name for event author- See Also:
-
ATTRIBUTE_CREATION
Attribute name for event lastModified- See Also:
-
ATTRIBUTE_CONTRIBUTOR
Attribute name for event last contributor- See Also:
-
ATTRIBUTE_MODIFIED
Attribute name for event lastModified- See Also:
-
ATTRIBUTE_TITLE
Attribute name for event title- See Also:
-
ATTRIBUTE_DESC
Attribute name for event description- See Also:
-
ATTRIBUTE_KEYWORDS
Attribute name for event keywords'- See Also:
-
ATTRIBUTE_LOCATION
Attribute name for event location- See Also:
-
ATTRIBUTE_START_DATE
Attribute name for event startDate- See Also:
-
ATTRIBUTE_END_DATE
Attribute name for event endDate- See Also:
-
ATTRIBUTE_DATE_ZONE
Attribute name for event date sone- See Also:
-
ATTRIBUTE_FULL_DAY
Attribute name for event fullDay- See Also:
-
ATTRIBUTE_RECURRENCE_TYPE
Attribute name for event recurrence type- See Also:
-
ATTRIBUTE_UNTIL_DATE
Attribute name for event until date- See Also:
-
ATTRIBUTE_EXCLUDED_DATE
Attribute name for event excluded date- See Also:
-
ATTRIBUTE_ORGANISER
Attribute name for event organiser- See Also:
-
PROPERTY_ATTENDEE_POPULATION
Property name for attendee population *- See Also:
-
PROPERTY_ATTENDEE_LOGIN
Property name for attendee login *- See Also:
-
PROPERTY_ATTENDEE_EMAIL
Property name for attendee email *- See Also:
-
PROPERTY_ATTENDEE_EXTERNAL
Property name for attendee external *- See Also:
-
PROPERTY_ATTENDEE_MANDATORY
Property name for attendee mandatory *- See Also:
-
NODE_ATTENDEES_NAME
Name of the node for attendees *- See Also:
-
NODE_ATTENDEE_NAME
Name of the node for attendee *- See Also:
-
PROPERTY_WORKFLOW_ID
Property's name for workflow id- See Also:
-
ATTRIBUTE_RESOURCES
Property's name for resources- See Also:
-
-
Constructor Details
-
JCRCalendarEvent
Creates anJCRCalendarEvent.- Parameters:
node- the node backing thisAmetysObjectparentPath- the parentPath in the Ametys hierarchyfactory- the DefaultAmetysObjectFactory which created the AmetysObject
-
-
Method Details
-
getTitle
Description copied from interface:CalendarEventGet the title of the event- Specified by:
getTitlein interfaceCalendarEvent- Returns:
- the title of the event
-
getDescription
Description copied from interface:CalendarEventGet the description of the event- Specified by:
getDescriptionin interfaceCalendarEvent- Returns:
- the description of the event
-
getLocation
Description copied from interface:CalendarEventGet the location of the event- Specified by:
getLocationin interfaceCalendarEvent- Returns:
- the location of the event
-
tag
Description copied from interface:TaggableAmetysObjectTags.- Specified by:
tagin interfaceTaggableAmetysObject- Parameters:
tag- the tag to add.- Throws:
AmetysRepositoryException- if an error occurs.
-
untag
Description copied from interface:TaggableAmetysObjectUntags.- Specified by:
untagin interfaceTaggableAmetysObject- Parameters:
tag- the tag to remove.- Throws:
AmetysRepositoryException- if an error occurs.
-
getTags
Description copied from interface:TagAwareAmetysObjectRetrieves current tags.- Specified by:
getTagsin interfaceTagAwareAmetysObject- Returns:
- the current tags.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getStartDate
Description copied from interface:CalendarEventGet the date of the begin of the event- Specified by:
getStartDatein interfaceCalendarEvent- Returns:
- the date of the event
-
getEndDate
Description copied from interface:CalendarEventGet the date of the end of the event- Specified by:
getEndDatein interfaceCalendarEvent- Returns:
- the date of the event
-
getZone
Description copied from interface:CalendarEventGet the date zone of the event- Specified by:
getZonein interfaceCalendarEvent- Returns:
- the date zone of the event
-
getFullDay
Description copied from interface:CalendarEventGet if the event last all the day- Specified by:
getFullDayin interfaceCalendarEvent- Returns:
- true if the event last all the day
-
getCreator
Description copied from interface:CalendarEventRetrieves the the creator.- Specified by:
getCreatorin interfaceCalendarEvent- Returns:
- the creator.
-
getCreationDate
Description copied from interface:CalendarEventRetrieves the creation date.- Specified by:
getCreationDatein interfaceCalendarEvent- Returns:
- the creation date.
-
getLastContributor
Description copied from interface:CalendarEventRetrieves the last contributor.- Specified by:
getLastContributorin interfaceCalendarEvent- Returns:
- the last contributor.
-
getLastModified
Description copied from interface:CalendarEventRetrieves the last modification date.- Specified by:
getLastModifiedin interfaceCalendarEvent- Returns:
- the last modification date.
-
getRecurrenceType
Description copied from interface:CalendarEventRetrieves the recurrence type.- Specified by:
getRecurrenceTypein interfaceCalendarEvent- Returns:
- the recurrence type.
-
isRecurrent
Description copied from interface:CalendarEventRetrieves if the event is recurrent.- Specified by:
isRecurrentin interfaceCalendarEvent- Returns:
- true if the event is recurrent.
-
getRepeatUntil
Description copied from interface:CalendarEventRetrieves the end date of the frequency.- Specified by:
getRepeatUntilin interfaceCalendarEvent- Returns:
- the end date of the frequency.
-
getExcludedOccurences
Description copied from interface:CalendarEventRetrieves the list of excluded event date.- Specified by:
getExcludedOccurencesin interfaceCalendarEvent- Returns:
- the list of excluded event date.
-
getOrganiser
Description copied from interface:CalendarEventRetrieves the organiser.- Specified by:
getOrganiserin interfaceCalendarEvent- Returns:
- the organiser.
-
getResources
Description copied from interface:CalendarEventRetrieves the resource list.- Specified by:
getResourcesin interfaceCalendarEvent- Returns:
- the resource list.
-
setTitle
Description copied from interface:ModifiableCalendarEventSet the title of the event- Specified by:
setTitlein interfaceModifiableCalendarEvent- Parameters:
title- the title
-
setDescription
Description copied from interface:ModifiableCalendarEventSet the description of the event- Specified by:
setDescriptionin interfaceModifiableCalendarEvent- Parameters:
desc- the description
-
setLocation
Description copied from interface:ModifiableCalendarEventSet the location of the event- Specified by:
setLocationin interfaceModifiableCalendarEvent- Parameters:
location- the location
-
setStartDate
Description copied from interface:ModifiableCalendarEventSet the startDate of the event- Specified by:
setStartDatein interfaceModifiableCalendarEvent- Parameters:
startDate- the start date
-
setEndDate
Description copied from interface:ModifiableCalendarEventSet the endDate of the event- Specified by:
setEndDatein interfaceModifiableCalendarEvent- Parameters:
endDate- the end date
-
setZone
Description copied from interface:ModifiableCalendarEventSet the date zone of the event- Specified by:
setZonein interfaceModifiableCalendarEvent- Parameters:
dateZone- the date zone
-
setFullDay
Description copied from interface:ModifiableCalendarEventSet if the event last all the day- Specified by:
setFullDayin interfaceModifiableCalendarEvent- Parameters:
fullDay- is a fullday event
-
setCreator
Description copied from interface:ModifiableCalendarEventSet the creator- Specified by:
setCreatorin interfaceModifiableCalendarEvent- Parameters:
user- The creator
-
setCreationDate
Description copied from interface:ModifiableCalendarEventSet the creation date- Specified by:
setCreationDatein interfaceModifiableCalendarEvent- Parameters:
date- The creation date
-
setLastContributor
Description copied from interface:ModifiableCalendarEventSet the last contributor- Specified by:
setLastContributorin interfaceModifiableCalendarEvent- Parameters:
user- The last contributor
-
setLastModified
Description copied from interface:ModifiableCalendarEventSet the last modified date- Specified by:
setLastModifiedin interfaceModifiableCalendarEvent- Parameters:
date- The last modified date
-
setRecurrenceType
Description copied from interface:ModifiableCalendarEventSet the recurrence type.- Specified by:
setRecurrenceTypein interfaceModifiableCalendarEvent- Parameters:
recurrenceType- the recurrence type
-
setRepeatUntil
Description copied from interface:ModifiableCalendarEventSet the end date of the frequency.- Specified by:
setRepeatUntilin interfaceModifiableCalendarEvent- Parameters:
untilDate- the end date of the recurrence
-
setExcludedOccurrences
Description copied from interface:ModifiableCalendarEventSet the list of excluded event date.- Specified by:
setExcludedOccurrencesin interfaceModifiableCalendarEvent- Parameters:
excludedOccurrences- excluded date
-
getOccurrences
Description copied from interface:CalendarEventRetrieves the list of all event date between startDate and endDate.- Specified by:
getOccurrencesin interfaceCalendarEvent- Parameters:
startDate- the start dateendDate- the end date- Returns:
- the list of all event date between startDate and endDate.
-
getFirstOccurrence
Description copied from interface:CalendarEventRetrieves the start date of the first Event which end after the date- Specified by:
getFirstOccurrencein interfaceCalendarEvent- Parameters:
date- the date- Returns:
- the start date of the first Event which end after the date
-
getNextOccurrence
Description copied from interface:CalendarEventRetrieves the date of the next event after the date- Specified by:
getNextOccurrencein interfaceCalendarEvent- Parameters:
occurrence- the current occurrence- Returns:
- the occurrence of the next event after the date
-
getWorkflowId
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowIdin interfaceWorkflowAwareAmetysObject- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setWorkflowId
Description copied from interface:WorkflowAwareAmetysObjectSet the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.- Specified by:
setWorkflowIdin interfaceWorkflowAwareAmetysObject- Parameters:
workflowId- the workflow id of the object.- Throws:
AmetysRepositoryException- if an error occurs.
-
getCurrentStepId
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the current step id of the Ametys object- Specified by:
getCurrentStepIdin interfaceWorkflowAwareAmetysObject- Returns:
- the current step id
-
setCurrentStepId
Description copied from interface:WorkflowAwareAmetysObjectSet the current step id of the Ametys object- Specified by:
setCurrentStepIdin interfaceWorkflowAwareAmetysObject- Parameters:
stepId- the step id to set
-
setOrganiser
Description copied from interface:ModifiableCalendarEventSet the oragniser- Specified by:
setOrganiserin interfaceModifiableCalendarEvent- Parameters:
user- The oragniser
-
getAttendees
Get attendees to the event- Returns:
- the attendees
- Throws:
javax.jcr.RepositoryException- if an error occurred
-
setAttendees
public void setAttendees(List<CalendarEventAttendee> attendees) throws javax.jcr.RepositoryException Set attendees to the event- Parameters:
attendees- the list of attendees- Throws:
javax.jcr.RepositoryException- if an error occurred
-
setResources
Description copied from interface:ModifiableCalendarEventSet the resources- Specified by:
setResourcesin interfaceModifiableCalendarEvent- Parameters:
resources- The resources
-
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
-