Class CalendarEventEntity
- java.lang.Object
-
- org.silverpeas.core.webapi.calendar.CalendarEventEntity
-
- All Implemented Interfaces:
Serializable
,WebEntity
- Direct Known Subclasses:
CalendarEventOccurrenceEntity
public class CalendarEventEntity extends Object implements WebEntity
It represents the state of a calendar event in a calendar as transmitted within the body of an HTTP response or an HTTP request.- Author:
- Yohann Chastagnier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CalendarEventEntity()
-
Method Summary
-
-
-
Method Detail
-
fromEvent
public static CalendarEventEntity fromEvent(CalendarEvent event, String componentInstanceId, ZoneId zoneId, boolean isEditionMode)
-
withEventURI
public CalendarEventEntity withEventURI(URI eventUri)
Sets a URI to this entity. With this URI, it can then be accessed through the Web.- Parameters:
eventUri
- the web entity URI.- Returns:
- itself.
-
withCalendarURI
public CalendarEventEntity withCalendarURI(URI calendarUri)
Sets a URI to linked calendar entity. With this URI, it can then be accessed through the Web.- Parameters:
calendarUri
- the linked calendar web entity URI.- Returns:
- itself.
-
withEventPermalinkURL
public CalendarEventEntity withEventPermalinkURL(URI permalinkUrl)
Sets a URI to this entity. With this URI, it can then be accessed through the Web.- Parameters:
permalinkUrl
- the web entity URI.- Returns:
- itself.
-
withAttendees
public CalendarEventEntity withAttendees(List<CalendarEventAttendeeEntity> attendees)
Sets attendees to linked calendar event entity.- Parameters:
attendees
- the linked calendar event attendees web entity.- Returns:
- itself.
-
withAttributes
public CalendarEventEntity withAttributes(List<CalendarEventAttributeEntity> attributes)
Sets attributes to linked calendar event entity.- Parameters:
attributes
- the linked calendar event attributes web entity.- Returns:
- itself.
-
getURI
public URI getURI()
Description copied from interface:WebEntity
Gets the URI at which this web entity is published and can be accessed.
-
setURI
protected void setURI(URI uri)
-
getEventUri
public URI getEventUri()
-
setEventUri
protected void setEventUri(URI eventUri)
-
getCalendarUri
public URI getCalendarUri()
-
setCalendarUri
protected void setCalendarUri(URI calendarUri)
-
getEventPermalinkUrl
public URI getEventPermalinkUrl()
-
setEventPermalinkUrl
public void setEventPermalinkUrl(URI eventPermalinkUrl)
-
getId
public String getId()
-
setId
protected void setId(String id)
-
getContributionType
public String getContributionType()
-
setContributionType
protected void setContributionType(String type)
-
getEventId
public String getEventId()
-
setEventId
protected void setEventId(String eventId)
-
getCalendarId
public String getCalendarId()
-
setCalendarId
protected void setCalendarId(String calendarId)
-
getCalendarZoneId
public String getCalendarZoneId()
-
setCalendarZoneId
protected void setCalendarZoneId(String calendarZoneId)
-
getTitle
public String getTitle()
-
setTitle
protected void setTitle(String title)
-
getDescription
public String getDescription()
-
setDescription
protected void setDescription(String description)
-
getContent
public String getContent()
-
setContent
protected void setContent(String content)
-
getLocation
public String getLocation()
-
setLocation
protected void setLocation(String location)
-
isOnAllDay
public boolean isOnAllDay()
-
setOnAllDay
protected void setOnAllDay(boolean onAllDay)
-
getStartDate
public String getStartDate()
-
setStartDate
protected void setStartDate(String startDate)
-
getEndDate
public String getEndDate()
-
setEndDate
protected void setEndDate(String endDate)
-
getVisibility
public VisibilityLevel getVisibility()
-
setVisibility
protected void setVisibility(VisibilityLevel visibility)
-
getPriority
public Priority getPriority()
-
setPriority
protected void setPriority(Priority priority)
-
getRecurrence
public CalendarEventRecurrenceEntity getRecurrence()
-
setRecurrence
public void setRecurrence(CalendarEventRecurrenceEntity recurrence)
-
getAttendees
public List<CalendarEventAttendeeEntity> getAttendees()
-
setAttendees
public void setAttendees(List<CalendarEventAttendeeEntity> attendees)
-
getAttributes
public List<CalendarEventAttributeEntity> getAttributes()
-
setAttributes
public void setAttributes(List<CalendarEventAttributeEntity> attributes)
-
getOwnerName
public String getOwnerName()
-
getCreateDate
public Date getCreateDate()
-
getCreatedById
public String getCreatedById()
-
getLastUpdateDate
public Date getLastUpdateDate()
-
setLastUpdateDate
protected void setLastUpdateDate(Date lastUpdateDate)
-
getLastUpdatedById
public String getLastUpdatedById()
-
setLastUpdatedById
public void setLastUpdatedById(String lastUpdatedById)
-
calendarSync
public boolean calendarSync()
-
canBeAccessed
public boolean canBeAccessed()
-
canBeModified
public boolean canBeModified()
-
canBeDeleted
public boolean canBeDeleted()
-
getAttachmentParameters
public Map<String,String[]> getAttachmentParameters()
Gets the parameters of the attachments of this event.At creation time, files can be attached to the event but attachment can only be done to existing contributions and not to contributions not yet effectively created. So, to do such an attachment the files are first transparently uploaded in the background and for each uploaded file a set of parameters is returned to the UI in order to retrieve them later in Silverpeas. Once the creation of the event is validated by the user and the event is eventually created, the attachment parameters sent with this Web representation are used to get the previously uploaded files to be attached to the created event.
- Returns:
- all the parameters about any previously uploaded files to attach to this event.
-
getPdcClassification
public PdcClassificationEntity getPdcClassification()
Gets the pdc classification of this event.PDC classification can be set on the save of an event.
Once the creation of the event is validated by the user and the event is eventually created, the PDC classification sent with this Web representation is used with PDC services.- Returns:
- all the parameters about any previously uploaded files to attach to this event.
-
getReminder
public ReminderEntity getReminder()
Gets reminder data about the entity if any.- Returns:
- reminder data, null otherwise.
-
decorate
protected CalendarEventEntity decorate(CalendarEvent calendarEvent, String componentInstanceId, ZoneId zoneId, boolean isEditionMode)
-
toStringBuilder
protected org.apache.commons.lang3.builder.ToStringBuilder toStringBuilder()
-
-