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.explorer.calendars.jcr.JCRCalendarEvent
- All Implemented Interfaces:
CalendarEvent
,ModifiableCalendarEvent
,ACLAmetysObject
,AmetysObject
,JCRAmetysObject
,JCRTraversableAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,ModifiableTraversableAmetysObject
,RemovableAmetysObject
,TraversableAmetysObject
,WorkflowAwareAmetysObject
public class JCRCalendarEvent
extends DefaultTraversableAmetysObject<JCRCalendarEventFactory>
implements ModifiableCalendarEvent
Default implementation of an
CalendarEvent
, backed by a JCR node.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Metadata's name for last contributor's event*static final String
Metadata's name for lastModified's event*static final String
Metadata's name for author's event*static final String
Metadata's name for description's event*static final String
Metadata's name for endDate's event*static final String
Metadata's name for excluded date event*static final String
Metadata's name for fullDay's event*static final String
Metadata's name for keywords' event*static final String
Metadata's name for location's event*static final String
Metadata's name for lastModified's event*static final String
Metadata's name for organiser's event*static final String
Metadata's name for recurrence type event*static final String
Metadata's name for startDate's event*static final String
Metadata's name for title's event*static final String
Metadata's name for until date event*static final String
Metadata's name for last validated date's event*static final String
Metadata's name for last validator's event*static final String
Name of the node for attendee *static final String
Name of the node for attendees *static final String
Property name for attendee email *static final String
Property name for attendee external *static final String
Property name for attendee login *static final String
Property name for attendee mandatory *static final String
Property name for attendee population *static final String
Property's name for workflow id -
Constructor Summary
ConstructorDescriptionJCRCalendarEvent
(Node node, String parentPath, JCRCalendarEventFactory factory) Creates anJCRCalendarEvent
. -
Method Summary
Modifier and TypeMethodDescriptionGet attendees to the eventRetrieves the creation date.Retrieves the the creator.long
Retrieves the current step id of the Ametys objectGet the description of the eventGet the date of the end of the eventRetrieves the list of excluded event date.getFirstOccurrence
(Date date) Retrieves the start date of the first Event which end after the dateGet if the event last all the dayString[]
Returns the keywords of this event, as a String array.Retrieves the last contributor.Retrieves the last modification date.Retrieves the last validation date.Retrieves the last validator.Get the location of the eventgetNextOccurrence
(Date date) Retrieves the date of the next event after the dategetOccurrences
(Date startDate, Date 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.Get the date of the begin of the eventgetTitle()
Get the title of the eventlong
Retrieves the workflow id associated with the Ametys object.Retrieves if the event is recurrent.void
setAttendees
(List<CalendarEventAttendee> attendees) Set attendees to the eventvoid
setCreationDate
(Date date) Set the creation datevoid
setCreator
(UserIdentity user) Set the creatorvoid
setCurrentStepId
(long stepId) Set the current step id of the Ametys objectvoid
setDescription
(String desc) Set the description of the eventvoid
setEndDate
(Date endDate) Set the endDate of the eventvoid
setExcludedOccurrences
(List<Date> excludedOccurrences) Set the list of excluded event date.void
setFullDay
(Boolean fullDay) Set if the event last all the dayvoid
setKeywords
(String[] keywords) Set this event's keywords.void
Set the last contributorvoid
setLastModified
(Date date) Set the last modified datevoid
setLastValidated
(Date date) Set the last validation date of the eventvoid
setLastValidator
(UserIdentity user) Set the last validator of the eventvoid
setLocation
(String location) Set the location of the eventvoid
setOrganiser
(UserIdentity user) Set the oragniservoid
setRecurrenceType
(String recurrenceType) Set the recurrence type.void
setRepeatUntil
(Date untilDate) Set the end date of the frequency.void
setStartDate
(Date startDate) Set the startDate of the eventvoid
Set the title of the eventvoid
setWorkflowId
(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.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, 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.jcr.JCRAmetysObject
getNode
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
Field Details
-
METADATA_CREATOR
Metadata's name for author's event*- See Also:
-
METADATA_CREATION
Metadata's name for lastModified's event*- See Also:
-
METADATA_CONTRIBUTOR
Metadata's name for last contributor's event*- See Also:
-
METADATA_MODIFIED
Metadata's name for lastModified's event*- See Also:
-
METADATA_TITLE
Metadata's name for title's event*- See Also:
-
METADATA_DESC
Metadata's name for description's event*- See Also:
-
METADATA_KEYWORDS
Metadata's name for keywords' event*- See Also:
-
METADATA_LOCATION
Metadata's name for location's event*- See Also:
-
METADATA_START_DATE
Metadata's name for startDate's event*- See Also:
-
METADATA_END_DATE
Metadata's name for endDate's event*- See Also:
-
METADATA_VALIDATED
Metadata's name for last validated date's event*- See Also:
-
METADATA_VALIDATOR
Metadata's name for last validator's event*- See Also:
-
METADATA_FULL_DAY
Metadata's name for fullDay's event*- See Also:
-
METADATA_RECURRENCE_TYPE
Metadata's name for recurrence type event*- See Also:
-
METADATA_UNTIL_DATE
Metadata's name for until date event*- See Also:
-
METADATA_EXCLUDED_DATE
Metadata's name for excluded date event*- See Also:
-
METADATA_ORGANISER
Metadata's name for organiser's event*- 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:
-
-
Constructor Details
-
JCRCalendarEvent
Creates anJCRCalendarEvent
.- Parameters:
node
- the node backing thisAmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the DefaultAmetysObjectFactory which created the AmetysObject
-
-
Method Details
-
getTitle
Description copied from interface:CalendarEvent
Get the title of the event- Specified by:
getTitle
in interfaceCalendarEvent
- Returns:
- the title of the event
-
getDescription
Description copied from interface:CalendarEvent
Get the description of the event- Specified by:
getDescription
in interfaceCalendarEvent
- Returns:
- the description of the event
-
getLocation
Description copied from interface:CalendarEvent
Get the location of the event- Specified by:
getLocation
in interfaceCalendarEvent
- Returns:
- the location of the event
-
getKeywords
Description copied from interface:CalendarEvent
Returns the keywords of this event, as a String array.- Specified by:
getKeywords
in interfaceCalendarEvent
- Returns:
- the keywords of this event.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getStartDate
Description copied from interface:CalendarEvent
Get the date of the begin of the event- Specified by:
getStartDate
in interfaceCalendarEvent
- Returns:
- the date of the event
-
getEndDate
Description copied from interface:CalendarEvent
Get the date of the end of the event- Specified by:
getEndDate
in interfaceCalendarEvent
- Returns:
- the date of the event
-
getFullDay
Description copied from interface:CalendarEvent
Get if the event last all the day- Specified by:
getFullDay
in interfaceCalendarEvent
- Returns:
- true if the event last all the day
-
getCreator
Description copied from interface:CalendarEvent
Retrieves the the creator.- Specified by:
getCreator
in interfaceCalendarEvent
- Returns:
- the creator.
-
getCreationDate
Description copied from interface:CalendarEvent
Retrieves the creation date.- Specified by:
getCreationDate
in interfaceCalendarEvent
- Returns:
- the creation date.
-
getLastContributor
Description copied from interface:CalendarEvent
Retrieves the last contributor.- Specified by:
getLastContributor
in interfaceCalendarEvent
- Returns:
- the last contributor.
-
getLastModified
Description copied from interface:CalendarEvent
Retrieves the last modification date.- Specified by:
getLastModified
in interfaceCalendarEvent
- Returns:
- the last modification date.
-
getLastValidator
Description copied from interface:CalendarEvent
Retrieves the last validator.- Specified by:
getLastValidator
in interfaceCalendarEvent
- Returns:
- the last validator.
- Throws:
UnknownMetadataException
- if this property does not exists.AmetysRepositoryException
- if an error occurs.
-
getLastValidated
Description copied from interface:CalendarEvent
Retrieves the last validation date.- Specified by:
getLastValidated
in interfaceCalendarEvent
- Returns:
- the last validation date.
- Throws:
UnknownMetadataException
- if this property does not exists.AmetysRepositoryException
- if an error occurs.
-
getRecurrenceType
Description copied from interface:CalendarEvent
Retrieves the recurrence type.- Specified by:
getRecurrenceType
in interfaceCalendarEvent
- Returns:
- the recurrence type.
-
isRecurrent
Description copied from interface:CalendarEvent
Retrieves if the event is recurrent.- Specified by:
isRecurrent
in interfaceCalendarEvent
- Returns:
- true if the event is recurrent.
-
getRepeatUntil
Description copied from interface:CalendarEvent
Retrieves the end date of the frequency.- Specified by:
getRepeatUntil
in interfaceCalendarEvent
- Returns:
- the end date of the frequency.
-
getExcludedOccurences
Description copied from interface:CalendarEvent
Retrieves the list of excluded event date.- Specified by:
getExcludedOccurences
in interfaceCalendarEvent
- Returns:
- the list of excluded event date.
-
getOrganiser
Description copied from interface:CalendarEvent
Retrieves the organiser.- Specified by:
getOrganiser
in interfaceCalendarEvent
- Returns:
- the organiser.
- Throws:
UnknownMetadataException
- if this property does not exists.AmetysRepositoryException
- if an error occurs.
-
setTitle
Description copied from interface:ModifiableCalendarEvent
Set the title of the event- Specified by:
setTitle
in interfaceModifiableCalendarEvent
- Parameters:
title
- the title
-
setDescription
Description copied from interface:ModifiableCalendarEvent
Set the description of the event- Specified by:
setDescription
in interfaceModifiableCalendarEvent
- Parameters:
desc
- the description
-
setLocation
Description copied from interface:ModifiableCalendarEvent
Set the location of the event- Specified by:
setLocation
in interfaceModifiableCalendarEvent
- Parameters:
location
- the location
-
setKeywords
Description copied from interface:ModifiableCalendarEvent
Set this event's keywords.- Specified by:
setKeywords
in interfaceModifiableCalendarEvent
- Parameters:
keywords
- the keywords.
-
setStartDate
Description copied from interface:ModifiableCalendarEvent
Set the startDate of the event- Specified by:
setStartDate
in interfaceModifiableCalendarEvent
- Parameters:
startDate
- the start date
-
setEndDate
Description copied from interface:ModifiableCalendarEvent
Set the endDate of the event- Specified by:
setEndDate
in interfaceModifiableCalendarEvent
- Parameters:
endDate
- the end date
-
setFullDay
Description copied from interface:ModifiableCalendarEvent
Set if the event last all the day- Specified by:
setFullDay
in interfaceModifiableCalendarEvent
- Parameters:
fullDay
- is a fullday event
-
setCreator
public void setCreator(UserIdentity user) throws UnknownMetadataException, AmetysRepositoryException Description copied from interface:ModifiableCalendarEvent
Set the creator- Specified by:
setCreator
in interfaceModifiableCalendarEvent
- Parameters:
user
- The creator- Throws:
UnknownMetadataException
AmetysRepositoryException
-
setCreationDate
Description copied from interface:ModifiableCalendarEvent
Set the creation date- Specified by:
setCreationDate
in interfaceModifiableCalendarEvent
- Parameters:
date
- The creation date- Throws:
UnknownMetadataException
AmetysRepositoryException
-
setLastContributor
public void setLastContributor(UserIdentity user) throws UnknownMetadataException, AmetysRepositoryException Description copied from interface:ModifiableCalendarEvent
Set the last contributor- Specified by:
setLastContributor
in interfaceModifiableCalendarEvent
- Parameters:
user
- The last contributor- Throws:
UnknownMetadataException
AmetysRepositoryException
-
setLastModified
Description copied from interface:ModifiableCalendarEvent
Set the last modified date- Specified by:
setLastModified
in interfaceModifiableCalendarEvent
- Parameters:
date
- The last modified date- Throws:
UnknownMetadataException
AmetysRepositoryException
-
setLastValidator
public void setLastValidator(UserIdentity user) throws UnknownMetadataException, AmetysRepositoryException Description copied from interface:ModifiableCalendarEvent
Set the last validator of the event- Specified by:
setLastValidator
in interfaceModifiableCalendarEvent
- Parameters:
user
- the last validator of the event- Throws:
UnknownMetadataException
AmetysRepositoryException
-
setLastValidated
Description copied from interface:ModifiableCalendarEvent
Set the last validation date of the event- Specified by:
setLastValidated
in interfaceModifiableCalendarEvent
- Parameters:
date
- the last validation date of the event- Throws:
UnknownMetadataException
AmetysRepositoryException
-
setRecurrenceType
Description copied from interface:ModifiableCalendarEvent
Set the recurrence type.- Specified by:
setRecurrenceType
in interfaceModifiableCalendarEvent
- Parameters:
recurrenceType
- the recurrence type
-
setRepeatUntil
Description copied from interface:ModifiableCalendarEvent
Set the end date of the frequency.- Specified by:
setRepeatUntil
in interfaceModifiableCalendarEvent
- Parameters:
untilDate
- the end date of the recurrence
-
setExcludedOccurrences
Description copied from interface:ModifiableCalendarEvent
Set the list of excluded event date.- Specified by:
setExcludedOccurrences
in interfaceModifiableCalendarEvent
- Parameters:
excludedOccurrences
- excluded date
-
getOccurrences
Description copied from interface:CalendarEvent
Retrieves the list of all event date between startDate and endDate.- Specified by:
getOccurrences
in 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:CalendarEvent
Retrieves the start date of the first Event which end after the date- Specified by:
getFirstOccurrence
in interfaceCalendarEvent
- Parameters:
date
- the date- Returns:
- the start date of the first Event which end after the date
-
getNextOccurrence
Description copied from interface:CalendarEvent
Retrieves the date of the next event after the date- Specified by:
getNextOccurrence
in interfaceCalendarEvent
- Parameters:
date
- the date- Returns:
- the date of the next event after the date
-
getWorkflowId
Description copied from interface:WorkflowAwareAmetysObject
Retrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setWorkflowId
Description copied from interface:WorkflowAwareAmetysObject
Set 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:
setWorkflowId
in interfaceWorkflowAwareAmetysObject
- Parameters:
workflowId
- the workflow id of the object.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCurrentStepId
Description copied from interface:WorkflowAwareAmetysObject
Retrieves the current step id of the Ametys object- Specified by:
getCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the current step id
-
setCurrentStepId
Description copied from interface:WorkflowAwareAmetysObject
Set the current step id of the Ametys object- Specified by:
setCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Parameters:
stepId
- the step id to set
-
setOrganiser
Description copied from interface:ModifiableCalendarEvent
Set the oragniser- Specified by:
setOrganiser
in interfaceModifiableCalendarEvent
- Parameters:
user
- The oragniser
-
getAttendees
Get attendees to the event- Returns:
- the attendees
- Throws:
RepositoryException
- if an error occurred
-
setAttendees
Set attendees to the event- Parameters:
attendees
- the list of attendees- Throws:
RepositoryException
- if an error occurred
-