public class VJournal extends ICalComponent
Defines a journal entry.
Examples:
VJournal journal = new VJournal(); journal.setSummary("Team Meeting"); journal.setDescription("The following items were discussed: ..."); byte[] slides = ... journal.addAttachment(new Attachment("application/vnd.ms-powerpoint", slides));
components, properties
Constructor and Description |
---|
VJournal()
Creates a new journal entry.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(Attachment attachment)
Adds an attachment to the journal entry.
|
void |
addAttendee(Attendee attendee)
Adds a person who is involved in the journal entry.
|
Attendee |
addAttendee(String email)
Adds a person who is involved in the journal entry.
|
void |
addCategories(Categories categories)
Adds a list of "tags" or "keywords" that describe the journal entry.
|
Categories |
addCategories(List<String> categories)
Adds a list of "tags" or "keywords" that describe the journal entry.
|
Categories |
addCategories(String... categories)
Adds a list of "tags" or "keywords" that describe the journal entry.
|
void |
addComment(Comment comment)
Adds a comment to the journal entry.
|
Comment |
addComment(String comment)
Adds a comment to the journal entry.
|
void |
addContact(Contact contact)
Adds a contact to the journal entry.
|
Contact |
addContact(String contact)
Adds a contact to the journal entry.
|
void |
addDescription(Description description)
Adds a detailed description to the journal entry.
|
Description |
addDescription(String description)
Adds a detailed description to the journal entry.
|
void |
addExceptionDates(ExceptionDates exceptionDates)
Adds a list of exceptions to the recurrence rule defined in the journal
entry (if one is defined).
|
void |
addExceptionRule(ExceptionRule exceptionRule)
Adds an exception for the
RecurrenceRule property. |
ExceptionRule |
addExceptionRule(Recurrence recur)
Adds an exception for the
RecurrenceRule property. |
void |
addRecurrenceDates(RecurrenceDates recurrenceDates)
Adds a list of dates/periods that help define the recurrence rule of this
journal entry (if one is defined).
|
void |
addRelatedTo(RelatedTo relatedTo)
Adds a component that the journal entry is related to.
|
RelatedTo |
addRelatedTo(String uid)
Adds a component that the journal entry is related to.
|
List<Attachment> |
getAttachments()
Gets any attachments that are associated with the journal entry.
|
List<Attendee> |
getAttendees()
Gets the people who are involved in the journal entry.
|
List<Categories> |
getCategories()
Gets a list of "tags" or "keywords" that describe the journal entry.
|
Classification |
getClassification()
Gets the level of sensitivity of the journal entry.
|
List<Comment> |
getComments()
Gets the comments attached to the journal entry.
|
List<Contact> |
getContacts()
Gets the contacts associated with the journal entry.
|
Created |
getCreated()
Gets the date-time that the journal entry was initially created.
|
DateStart |
getDateStart()
Gets the date that the journal entry starts.
|
DateTimeStamp |
getDateTimeStamp()
Gets either (a) the creation date of the iCalendar object (if the
Method property is defined) or (b) the date that the journal
entry was last modified (the LastModified property also holds
this information). |
List<Description> |
getDescriptions()
Gets the detailed descriptions to the journal entry.
|
List<ExceptionDates> |
getExceptionDates()
Gets the list of exceptions to the recurrence rule defined in the journal
entry (if one is defined).
|
List<ExceptionRule> |
getExceptionRules()
Gets the exceptions for the
RecurrenceRule property. |
LastModified |
getLastModified()
Gets the date-time that the journal entry was last changed.
|
Organizer |
getOrganizer()
Gets the organizer of the journal entry.
|
List<RecurrenceDates> |
getRecurrenceDates()
Gets the list of dates/periods that help define the recurrence rule of
this journal entry (if one is defined).
|
RecurrenceId |
getRecurrenceId()
Gets the original value of the
DateStart property if the event is
recurring and has been modified. |
RecurrenceRule |
getRecurrenceRule()
Gets how often the journal entry repeats.
|
List<RelatedTo> |
getRelatedTo()
Gets the components that the journal entry is related to.
|
RequestStatus |
getRequestStatus()
Gets the response to a scheduling request.
|
Sequence |
getSequence()
Gets the revision number of the journal entry.
|
Status |
getStatus()
Gets the status of the journal entry.
|
Summary |
getSummary()
Gets the summary of the journal entry.
|
Uid |
getUid()
Gets the unique identifier for this journal entry.
|
Url |
getUrl()
Gets a URL to a resource that contains additional information about the
journal entry.
|
void |
incrementSequence()
Increments the revision number of the journal entry.
|
void |
setClassification(Classification classification)
Sets the level of sensitivity of the journal entry.
|
Classification |
setClassification(String classification)
Sets the level of sensitivity of the journal entry.
|
void |
setCreated(Created created)
Sets the date-time that the journal entry was initially created.
|
Created |
setCreated(Date created)
Sets the date-time that the journal entry was initially created.
|
DateStart |
setDateStart(Date dateStart)
Sets the date that the journal entry starts.
|
void |
setDateStart(DateStart dateStart)
Sets the date that the journal entry starts.
|
DateTimeStamp |
setDateTimeStamp(Date dateTimeStamp)
Sets either (a) the creation date of the iCalendar object (if the
Method property is defined) or (b) the date that the journal
entry was last modified (the LastModified property also holds
this information). |
void |
setDateTimeStamp(DateTimeStamp dateTimeStamp)
Sets either (a) the creation date of the iCalendar object (if the
Method property is defined) or (b) the date that the journal
entry was last modified (the LastModified property also holds
this information). |
LastModified |
setLastModified(Date lastModified)
Sets the date-time that the journal entry was last changed.
|
void |
setLastModified(LastModified lastModified)
Sets the date-time that the journal entry was last changed.
|
void |
setOrganizer(Organizer organizer)
Sets the organizer of the journal entry.
|
Organizer |
setOrganizer(String email)
Sets the organizer of the journal entry.
|
RecurrenceId |
setRecurrenceId(Date originalStartDate)
Sets the original value of the
DateStart property if the journal
entry is recurring and has been modified. |
void |
setRecurrenceId(RecurrenceId recurrenceId)
Sets the original value of the
DateStart property if the event is
recurring and has been modified. |
RecurrenceRule |
setRecurrenceRule(Recurrence recur)
Sets how often the journal entry repeats.
|
void |
setRecurrenceRule(RecurrenceRule recurrenceRule)
Sets how often the journal entry repeats.
|
void |
setRequestStatus(RequestStatus requestStatus)
Sets the response to a scheduling request.
|
Sequence |
setSequence(Integer sequence)
Sets the revision number of the journal entry.
|
void |
setSequence(Sequence sequence)
Sets the revision number of the journal entry.
|
void |
setStatus(Status status)
Sets the status of the journal entry.
|
Summary |
setSummary(String summary)
Sets the summary of the journal entry.
|
void |
setSummary(Summary summary)
Sets the summary of the journal entry.
|
Uid |
setUid(String uid)
Sets the unique identifier for this journal entry.
|
void |
setUid(Uid uid)
Sets the unique identifier for this journal entry.
|
Url |
setUrl(String url)
Sets a URL to a resource that contains additional information about the
journal entry.
|
void |
setUrl(Url url)
Sets a URL to a resource that contains additional information about the
journal entry.
|
protected void |
validate(List<ICalComponent> components,
ICalVersion version,
List<Warning> warnings)
Checks the component for data consistency problems or deviations from the
spec.
|
addComponent, addExperimentalComponent, addExperimentalProperty, addExperimentalProperty, addProperty, checkOptionalCardinality, checkRequiredCardinality, checkStatus, getComponent, getComponents, getComponents, getExperimentalComponent, getExperimentalComponents, getExperimentalComponents, getExperimentalProperties, getExperimentalProperties, getExperimentalProperty, getProperties, getProperties, getProperty, removeComponents, removeExperimentalComponents, removeExperimentalProperty, removeProperties, setComponent, setComponent, setExperimentalComponents, setExperimentalProperty, setExperimentalProperty, setProperty, setProperty, validate
public VJournal()
Creates a new journal entry.
The following properties are auto-generated on object creation. These properties must be present in order for the journal entry to be valid:
Uid
- Set to a UUID.DateTimeStamp
- Set to the current date-time.public Uid getUid()
public void setUid(Uid uid)
uid
- the UID or null to removepublic Uid setUid(String uid)
uid
- the UID or null to removepublic DateTimeStamp getDateTimeStamp()
Method
property is defined) or (b) the date that the journal
entry was last modified (the LastModified
property also holds
this information). This journal entry object comes populated with a
DateTimeStamp
property that is set to the current time. This is a
required property.public void setDateTimeStamp(DateTimeStamp dateTimeStamp)
Method
property is defined) or (b) the date that the journal
entry was last modified (the LastModified
property also holds
this information). This journal entry object comes populated with a
DateTimeStamp
property that is set to the current time. This is a
required property.dateTimeStamp
- the date time stamp or null to removepublic DateTimeStamp setDateTimeStamp(Date dateTimeStamp)
Method
property is defined) or (b) the date that the journal
entry was last modified (the LastModified
property also holds
this information). This journal entry object comes populated with a
DateTimeStamp
property that is set to the current time. This is a
required property.dateTimeStamp
- the date time stamp or null to removepublic Classification getClassification()
public void setClassification(Classification classification)
classification
- the classification level or null to removepublic Classification setClassification(String classification)
classification
- the classification level (e.g. "CONFIDENTIAL") or
null to removepublic Created getCreated()
public void setCreated(Created created)
created
- the creation date-time or null to removepublic Created setCreated(Date created)
created
- the creation date-time or null to removepublic DateStart getDateStart()
public void setDateStart(DateStart dateStart)
dateStart
- the start date or null to removepublic DateStart setDateStart(Date dateStart)
dateStart
- the start date or null to removepublic LastModified getLastModified()
public void setLastModified(LastModified lastModified)
lastModified
- the last modified date or null to removepublic LastModified setLastModified(Date lastModified)
lastModified
- the last modified date or null to removepublic Organizer getOrganizer()
public void setOrganizer(Organizer organizer)
organizer
- the organizer or null to removepublic Organizer setOrganizer(String email)
email
- the organizer's email address (e.g. "johndoe@example.com")
or null to removepublic RecurrenceId getRecurrenceId()
DateStart
property if the event is
recurring and has been modified. Used in conjunction with the Uid
and Sequence
properties to uniquely identify a recurrence
instance.public void setRecurrenceId(RecurrenceId recurrenceId)
DateStart
property if the event is
recurring and has been modified. Used in conjunction with the Uid
and Sequence
properties to uniquely identify a recurrence
instance.recurrenceId
- the recurrence ID or null to removepublic RecurrenceId setRecurrenceId(Date originalStartDate)
DateStart
property if the journal
entry is recurring and has been modified. Used in conjunction with the
Uid
and Sequence
properties to uniquely identify a
recurrence instance.originalStartDate
- the original start date or null to removepublic Sequence getSequence()
public void setSequence(Sequence sequence)
sequence
- the sequence numberpublic Sequence setSequence(Integer sequence)
sequence
- the sequence numberpublic void incrementSequence()
public Status getStatus()
public void setStatus(Status status)
Valid journal status codes are:
status
- the status or null to removepublic Summary getSummary()
public void setSummary(Summary summary)
summary
- the summary or null to removepublic Summary setSummary(String summary)
summary
- the summary or null to removepublic Url getUrl()
public void setUrl(Url url)
url
- the URL or null to removepublic Url setUrl(String url)
url
- the URL (e.g. "http://example.com/resource.ics") or null to
removepublic RecurrenceRule getRecurrenceRule()
public RecurrenceRule setRecurrenceRule(Recurrence recur)
recur
- the recurrence rule or null to removepublic void setRecurrenceRule(RecurrenceRule recurrenceRule)
recurrenceRule
- the recurrence rule or null to removepublic List<Attachment> getAttachments()
public void addAttachment(Attachment attachment)
attachment
- the attachment to addpublic List<Attendee> getAttendees()
public void addAttendee(Attendee attendee)
attendee
- the attendeepublic Attendee addAttendee(String email)
email
- the attendee's email addresspublic List<Categories> getCategories()
public void addCategories(Categories categories)
categories
- the categories to addpublic Categories addCategories(String... categories)
categories
- the categories to addpublic Categories addCategories(List<String> categories)
categories
- the categories to addpublic List<Comment> getComments()
public void addComment(Comment comment)
comment
- the comment to addpublic Comment addComment(String comment)
comment
- the comment to addpublic List<Contact> getContacts()
public void addContact(Contact contact)
contact
- the contactpublic Contact addContact(String contact)
contact
- the contact (e.g. "ACME Co - (123) 555-1234")public List<Description> getDescriptions()
Summary
property.public void addDescription(Description description)
Summary
property.description
- the descriptionpublic Description addDescription(String description)
Summary
property.description
- the descriptionpublic List<ExceptionDates> getExceptionDates()
public void addExceptionDates(ExceptionDates exceptionDates)
exceptionDates
- the list of exceptionspublic List<RelatedTo> getRelatedTo()
public void addRelatedTo(RelatedTo relatedTo)
relatedTo
- the relationshippublic RelatedTo addRelatedTo(String uid)
uid
- the UID of the other componentpublic List<RecurrenceDates> getRecurrenceDates()
public void addRecurrenceDates(RecurrenceDates recurrenceDates)
recurrenceDates
- the recurrence datespublic RequestStatus getRequestStatus()
public void setRequestStatus(RequestStatus requestStatus)
requestStatus
- the responsepublic List<ExceptionRule> getExceptionRules()
Gets the exceptions for the RecurrenceRule
property.
Note that this property has been removed from the latest version of the iCal specification. Its use should be avoided.
public ExceptionRule addExceptionRule(Recurrence recur)
Adds an exception for the RecurrenceRule
property.
Note that this property has been removed from the latest version of the iCal specification. Its use should be avoided.
recur
- the exception rule to addpublic void addExceptionRule(ExceptionRule exceptionRule)
Adds an exception for the RecurrenceRule
property.
Note that this property has been removed from the latest version of the iCal specification. Its use should be avoided.
exceptionRule
- the exception rule to addprotected void validate(List<ICalComponent> components, ICalVersion version, List<Warning> warnings)
ICalComponent
Checks the component for data consistency problems or deviations from the spec.
This method should be overridden by child classes that wish to provide validation logic. The default implementation of this method does nothing.
validate
in class ICalComponent
components
- the hierarchy of components that the component belongs
toversion
- the version to validate againstwarnings
- the list to add the warnings toCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.