public class JCRCalendarEvent extends DefaultTraversableAmetysObject<JCRCalendarEventFactory> implements ModifiableCalendarEvent
CalendarEvent
, backed by a JCR node.Modifier and Type | Field and Description |
---|---|
static String |
METADATA_CONTRIBUTOR
Metadata's name for last contributor's event*
|
static String |
METADATA_CREATION
Metadata's name for lastModified's event*
|
static String |
METADATA_CREATOR
Metadata's name for author's event*
|
static String |
METADATA_DESC
Metadata's name for description's event*
|
static String |
METADATA_END_DATE
Metadata's name for endDate's event*
|
static String |
METADATA_EXCLUDED_DATE
Metadata's name for excluded date event*
|
static String |
METADATA_FULL_DAY
Metadata's name for fullDay's event*
|
static String |
METADATA_KEYWORDS
Metadata's name for keywords' event*
|
static String |
METADATA_LOCATION
Metadata's name for location's event*
|
static String |
METADATA_MODIFIED
Metadata's name for lastModified's event*
|
static String |
METADATA_ORGANISER
Metadata's name for organiser's event*
|
static String |
METADATA_RECURRENCE_TYPE
Metadata's name for recurrence type event*
|
static String |
METADATA_START_DATE
Metadata's name for startDate's event*
|
static String |
METADATA_TITLE
Metadata's name for title's event*
|
static String |
METADATA_UNTIL_DATE
Metadata's name for until date event*
|
static String |
METADATA_VALIDATED
Metadata's name for last validated date's event*
|
static String |
METADATA_VALIDATOR
Metadata's name for last validator's event*
|
static String |
NODE_ATTENDEE_NAME
Name of the node for attendee *
|
static String |
NODE_ATTENDEES_NAME
Name of the node for attendees *
|
static String |
PROPERTY_ATTENDEE_EMAIL
Property name for attendee email *
|
static String |
PROPERTY_ATTENDEE_EXTERNAL
Property name for attendee external *
|
static String |
PROPERTY_ATTENDEE_LOGIN
Property name for attendee login *
|
static String |
PROPERTY_ATTENDEE_MANDATORY
Property name for attendee mandatory *
|
static String |
PROPERTY_ATTENDEE_POPULATION
Property name for attendee population *
|
static String |
PROPERTY_WORKFLOW_ID
Property's name for workflow id
|
Constructor and Description |
---|
JCRCalendarEvent(Node node,
String parentPath,
JCRCalendarEventFactory factory)
Creates an
JCRCalendarEvent . |
Modifier and Type | Method and Description |
---|---|
List<CalendarEventAttendee> |
getAttendees()
Get attendees to the event
|
Date |
getCreationDate()
Retrieves the creation date.
|
UserIdentity |
getCreator()
Retrieves the the creator.
|
long |
getCurrentStepId()
Retrieves the current step id of the Ametys object
|
String |
getDescription()
Get the description of the event
|
Date |
getEndDate()
Get the date of the end of the event
|
List<Date> |
getExcludedOccurences()
Retrieves the list of excluded event date.
|
Date |
getFirstOccurrence(Date date)
Retrieves the start date of the first Event which end after the date
|
Boolean |
getFullDay()
Get if the event last all the day
|
String[] |
getKeywords()
Returns the keywords of this event, as a String array.
|
UserIdentity |
getLastContributor()
Retrieves the last contributor.
|
Date |
getLastModified()
Retrieves the last modification date.
|
Date |
getLastValidated()
Retrieves the last validation date.
|
UserIdentity |
getLastValidator()
Retrieves the last validator.
|
String |
getLocation()
Get the location of the event
|
Date |
getNextOccurrence(Date date)
Retrieves the date of the next event after the date
|
List<Date> |
getOccurrences(Date startDate,
Date endDate)
Retrieves the list of all event date between startDate and endDate.
|
UserIdentity |
getOrganiser()
Retrieves the organiser.
|
EventRecurrenceTypeEnum |
getRecurrenceType()
Retrieves the recurrence type.
|
Date |
getRepeatUntil()
Retrieves the end date of the frequency.
|
Date |
getStartDate()
Get the date of the begin of the event
|
String |
getTitle()
Get the title of the event
|
long |
getWorkflowId()
Retrieves the workflow id associated with the Ametys object.
|
Boolean |
isRecurrent()
Retrieves if the event is recurrent.
|
void |
setAttendees(List<CalendarEventAttendee> attendees)
Set attendees to the event
|
void |
setCreationDate(Date date)
Set the creation date
|
void |
setCreator(UserIdentity user)
Set the creator
|
void |
setCurrentStepId(long stepId)
Set the current step id of the Ametys object
|
void |
setDescription(String desc)
Set the description of the event
|
void |
setEndDate(Date endDate)
Set the endDate of the event
|
void |
setExcludedOccurrences(List<Date> excludedOccurrences)
Set the list of excluded event date.
|
void |
setFullDay(Boolean fullDay)
Set if the event last all the day
|
void |
setKeywords(String[] keywords)
Set this event's keywords.
|
void |
setLastContributor(UserIdentity user)
Set the last contributor
|
void |
setLastModified(Date date)
Set the last modified date
|
void |
setLastValidated(Date date)
Set the last validation date of the event
|
void |
setLastValidator(UserIdentity user)
Set the last validator of the event
|
void |
setLocation(String location)
Set the location of the event
|
void |
setOrganiser(UserIdentity user)
Set the oragniser
|
void |
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 event
|
void |
setTitle(String title)
Set the title of the event
|
void |
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. |
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getAllowedUsers, getChild, getChildren, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, hasChild, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getNode
getMetadataHolder
needsSave, rename, revertChanges, saveChanges
equals, getId, getName, getParent, getParentPath, getPath, hashCode
remove
getChildAt, getChildPosition
public static final String METADATA_CREATOR
public static final String METADATA_CREATION
public static final String METADATA_CONTRIBUTOR
public static final String METADATA_MODIFIED
public static final String METADATA_TITLE
public static final String METADATA_DESC
public static final String METADATA_KEYWORDS
public static final String METADATA_LOCATION
public static final String METADATA_START_DATE
public static final String METADATA_END_DATE
public static final String METADATA_VALIDATED
public static final String METADATA_VALIDATOR
public static final String METADATA_FULL_DAY
public static final String METADATA_RECURRENCE_TYPE
public static final String METADATA_UNTIL_DATE
public static final String METADATA_EXCLUDED_DATE
public static final String METADATA_ORGANISER
public static final String PROPERTY_ATTENDEE_POPULATION
public static final String PROPERTY_ATTENDEE_LOGIN
public static final String PROPERTY_ATTENDEE_EMAIL
public static final String PROPERTY_ATTENDEE_EXTERNAL
public static final String PROPERTY_ATTENDEE_MANDATORY
public static final String NODE_ATTENDEES_NAME
public static final String NODE_ATTENDEE_NAME
public static final String PROPERTY_WORKFLOW_ID
public JCRCalendarEvent(Node node, String parentPath, JCRCalendarEventFactory factory)
JCRCalendarEvent
.node
- the node backing this AmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the DefaultAmetysObjectFactory which created the AmetysObjectpublic String getTitle()
CalendarEvent
getTitle
in interface CalendarEvent
public String getDescription()
CalendarEvent
getDescription
in interface CalendarEvent
public String getLocation()
CalendarEvent
getLocation
in interface CalendarEvent
public String[] getKeywords() throws AmetysRepositoryException
CalendarEvent
getKeywords
in interface CalendarEvent
AmetysRepositoryException
- if an error occurs.public Date getStartDate()
CalendarEvent
getStartDate
in interface CalendarEvent
public Date getEndDate()
CalendarEvent
getEndDate
in interface CalendarEvent
public Boolean getFullDay()
CalendarEvent
getFullDay
in interface CalendarEvent
public UserIdentity getCreator()
CalendarEvent
getCreator
in interface CalendarEvent
public Date getCreationDate()
CalendarEvent
getCreationDate
in interface CalendarEvent
public UserIdentity getLastContributor()
CalendarEvent
getLastContributor
in interface CalendarEvent
public Date getLastModified()
CalendarEvent
getLastModified
in interface CalendarEvent
public UserIdentity getLastValidator() throws UnknownMetadataException, AmetysRepositoryException
CalendarEvent
getLastValidator
in interface CalendarEvent
UnknownMetadataException
- if this property does not exists.AmetysRepositoryException
- if an error occurs.public Date getLastValidated() throws UnknownMetadataException, AmetysRepositoryException
CalendarEvent
getLastValidated
in interface CalendarEvent
UnknownMetadataException
- if this property does not exists.AmetysRepositoryException
- if an error occurs.public EventRecurrenceTypeEnum getRecurrenceType()
CalendarEvent
getRecurrenceType
in interface CalendarEvent
public Boolean isRecurrent()
CalendarEvent
isRecurrent
in interface CalendarEvent
public Date getRepeatUntil()
CalendarEvent
getRepeatUntil
in interface CalendarEvent
public List<Date> getExcludedOccurences()
CalendarEvent
getExcludedOccurences
in interface CalendarEvent
public UserIdentity getOrganiser() throws UnknownMetadataException, AmetysRepositoryException
CalendarEvent
getOrganiser
in interface CalendarEvent
UnknownMetadataException
- if this property does not exists.AmetysRepositoryException
- if an error occurs.public void setTitle(String title)
ModifiableCalendarEvent
setTitle
in interface ModifiableCalendarEvent
title
- the titlepublic void setDescription(String desc)
ModifiableCalendarEvent
setDescription
in interface ModifiableCalendarEvent
desc
- the descriptionpublic void setLocation(String location)
ModifiableCalendarEvent
setLocation
in interface ModifiableCalendarEvent
location
- the locationpublic void setKeywords(String[] keywords)
ModifiableCalendarEvent
setKeywords
in interface ModifiableCalendarEvent
keywords
- the keywords.public void setStartDate(Date startDate)
ModifiableCalendarEvent
setStartDate
in interface ModifiableCalendarEvent
startDate
- the start datepublic void setEndDate(Date endDate)
ModifiableCalendarEvent
setEndDate
in interface ModifiableCalendarEvent
endDate
- the end datepublic void setFullDay(Boolean fullDay)
ModifiableCalendarEvent
setFullDay
in interface ModifiableCalendarEvent
fullDay
- is a fullday eventpublic void setCreator(UserIdentity user) throws UnknownMetadataException, AmetysRepositoryException
ModifiableCalendarEvent
setCreator
in interface ModifiableCalendarEvent
user
- The creatorUnknownMetadataException
AmetysRepositoryException
public void setCreationDate(Date date) throws UnknownMetadataException, AmetysRepositoryException
ModifiableCalendarEvent
setCreationDate
in interface ModifiableCalendarEvent
date
- The creation dateUnknownMetadataException
AmetysRepositoryException
public void setLastContributor(UserIdentity user) throws UnknownMetadataException, AmetysRepositoryException
ModifiableCalendarEvent
setLastContributor
in interface ModifiableCalendarEvent
user
- The last contributorUnknownMetadataException
AmetysRepositoryException
public void setLastModified(Date date) throws UnknownMetadataException, AmetysRepositoryException
ModifiableCalendarEvent
setLastModified
in interface ModifiableCalendarEvent
date
- The last modified dateUnknownMetadataException
AmetysRepositoryException
public void setLastValidator(UserIdentity user) throws UnknownMetadataException, AmetysRepositoryException
ModifiableCalendarEvent
setLastValidator
in interface ModifiableCalendarEvent
user
- the last validator of the eventUnknownMetadataException
AmetysRepositoryException
public void setLastValidated(Date date) throws UnknownMetadataException, AmetysRepositoryException
ModifiableCalendarEvent
setLastValidated
in interface ModifiableCalendarEvent
date
- the last validation date of the eventUnknownMetadataException
AmetysRepositoryException
public void setRecurrenceType(String recurrenceType)
ModifiableCalendarEvent
setRecurrenceType
in interface ModifiableCalendarEvent
recurrenceType
- the recurrence typepublic void setRepeatUntil(Date untilDate)
ModifiableCalendarEvent
setRepeatUntil
in interface ModifiableCalendarEvent
untilDate
- the end date of the recurrencepublic void setExcludedOccurrences(List<Date> excludedOccurrences)
ModifiableCalendarEvent
setExcludedOccurrences
in interface ModifiableCalendarEvent
excludedOccurrences
- excluded datepublic List<Date> getOccurrences(Date startDate, Date endDate)
CalendarEvent
getOccurrences
in interface CalendarEvent
startDate
- the start dateendDate
- the end datepublic Date getFirstOccurrence(Date date)
CalendarEvent
getFirstOccurrence
in interface CalendarEvent
date
- the datepublic Date getNextOccurrence(Date date)
CalendarEvent
getNextOccurrence
in interface CalendarEvent
date
- the datepublic long getWorkflowId() throws AmetysRepositoryException
WorkflowAwareAmetysObject
getWorkflowId
in interface WorkflowAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public void setWorkflowId(long workflowId) throws AmetysRepositoryException
WorkflowAwareAmetysObject
setWorkflowId
in interface WorkflowAwareAmetysObject
workflowId
- the workflow id of the object.AmetysRepositoryException
- if an error occurs.public long getCurrentStepId()
WorkflowAwareAmetysObject
getCurrentStepId
in interface WorkflowAwareAmetysObject
public void setCurrentStepId(long stepId)
WorkflowAwareAmetysObject
setCurrentStepId
in interface WorkflowAwareAmetysObject
stepId
- the step id to setpublic void setOrganiser(UserIdentity user)
ModifiableCalendarEvent
setOrganiser
in interface ModifiableCalendarEvent
user
- The oragniserpublic List<CalendarEventAttendee> getAttendees() throws RepositoryException
RepositoryException
- if an error occurredpublic void setAttendees(List<CalendarEventAttendee> attendees) throws RepositoryException
attendees
- the list of attendeesRepositoryException
- if an error occurred