biweekly.component
Class VJournal

java.lang.Object
  extended by biweekly.component.ICalComponent
      extended by biweekly.component.VJournal

public class VJournal
extends ICalComponent

Defines descriptive text associated with the calendar data.

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));
 

Author:
Michael Angstadt
Specification Reference:
RFC 5545 p.57-9

Field Summary
 
Fields inherited from class biweekly.component.ICalComponent
components, properties
 
Constructor Summary
VJournal()
           Creates a new journal entry.
 
Method Summary
 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, List<String> warnings)
          Checks the component for data consistency problems or deviations from the spec.
 
Methods inherited from class biweekly.component.ICalComponent
addComponent, addExperimentalComponent, addExperimentalProperty, addExperimentalProperty, addProperty, checkOptionalCardinality, checkRequiredCardinality, getComponent, getComponents, getComponents, getExperimentalComponent, getExperimentalComponents, getExperimentalComponents, getExperimentalProperties, getExperimentalProperties, getExperimentalProperty, getProperties, getProperties, getProperty, removeExperimentalComponents, removeExperimentalProperty, removeProperties, setComponent, setComponent, setExperimentalComponents, setExperimentalProperty, setExperimentalProperty, setProperty, setProperty, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VJournal

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:

Method Detail

getUid

public Uid getUid()
Gets the unique identifier for this journal entry. This component object comes populated with a UID on creation. This is a required property.

Returns:
the UID or null if not set
Specification Reference:
RFC 5545 p.117-8

setUid

public void setUid(Uid uid)
Sets the unique identifier for this journal entry. This component object comes populated with a UID on creation. This is a required property.

Parameters:
uid - the UID or null to remove
Specification Reference:
RFC 5545 p.117-8

setUid

public Uid setUid(String uid)
Sets the unique identifier for this journal entry. This component object comes populated with a UID on creation. This is a required property.

Parameters:
uid - the UID or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.117-8

getDateTimeStamp

public 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). This journal entry object comes populated with a DateTimeStamp property that is set to the current time. This is a required property.

Returns:
the date time stamp or null if not set
Specification Reference:
RFC 5545 p.137-8

setDateTimeStamp

public 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). This journal entry object comes populated with a DateTimeStamp property that is set to the current time. This is a required property.

Parameters:
dateTimeStamp - the date time stamp or null to remove
Specification Reference:
RFC 5545 p.137-8

setDateTimeStamp

public 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). This journal entry object comes populated with a DateTimeStamp property that is set to the current time. This is a required property.

Parameters:
dateTimeStamp - the date time stamp or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.137-8

getClassification

public Classification getClassification()
Gets the level of sensitivity of the journal entry. If not specified, the data within the journal entry should be considered "public".

Returns:
the classification level or null if not set
Specification Reference:
RFC 5545 p.82-3

setClassification

public void setClassification(Classification classification)
Sets the level of sensitivity of the journal entry. If not specified, the data within the journal entry should be considered "public".

Parameters:
classification - the classification level or null to remove
Specification Reference:
RFC 5545 p.82-3

setClassification

public Classification setClassification(String classification)
Sets the level of sensitivity of the journal entry. If not specified, the data within the journal entry should be considered "public".

Parameters:
classification - the classification level (e.g. "CONFIDENTIAL") or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.82-3

getCreated

public Created getCreated()
Gets the date-time that the journal entry was initially created.

Returns:
the creation date-time or null if not set
Specification Reference:
RFC 5545 p.136

setCreated

public void setCreated(Created created)
Sets the date-time that the journal entry was initially created.

Parameters:
created - the creation date-time or null to remove
Specification Reference:
RFC 5545 p.136

setCreated

public Created setCreated(Date created)
Sets the date-time that the journal entry was initially created.

Parameters:
created - the creation date-time or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.136

getDateStart

public DateStart getDateStart()
Gets the date that the journal entry starts.

Returns:
the start date or null if not set
Specification Reference:
RFC 5545 p.97-8

setDateStart

public void setDateStart(DateStart dateStart)
Sets the date that the journal entry starts.

Parameters:
dateStart - the start date or null to remove
Specification Reference:
RFC 5545 p.97-8

setDateStart

public DateStart setDateStart(Date dateStart)
Sets the date that the journal entry starts.

Parameters:
dateStart - the start date or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.97-8

getLastModified

public LastModified getLastModified()
Gets the date-time that the journal entry was last changed.

Returns:
the last modified date or null if not set
Specification Reference:
RFC 5545 p.138

setLastModified

public void setLastModified(LastModified lastModified)
Sets the date-time that the journal entry was last changed.

Parameters:
lastModified - the last modified date or null to remove
Specification Reference:
RFC 5545 p.138

setLastModified

public LastModified setLastModified(Date lastModified)
Sets the date-time that the journal entry was last changed.

Parameters:
lastModified - the last modified date or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.138

getOrganizer

public Organizer getOrganizer()
Gets the organizer of the journal entry.

Returns:
the organizer or null if not set
Specification Reference:
RFC 5545 p.111-2

setOrganizer

public void setOrganizer(Organizer organizer)
Sets the organizer of the journal entry.

Parameters:
organizer - the organizer or null to remove
Specification Reference:
RFC 5545 p.111-2

setOrganizer

public Organizer setOrganizer(String email)
Sets the organizer of the journal entry.

Parameters:
email - the organizer's email address (e.g. "johndoe@example.com") or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.111-2

getRecurrenceId

public RecurrenceId getRecurrenceId()
Gets the original value of the 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.

Returns:
the recurrence ID or null if not set
Specification Reference:
RFC 5545 p.112-4

setRecurrenceId

public void setRecurrenceId(RecurrenceId recurrenceId)
Sets the original value of the 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.

Parameters:
recurrenceId - the recurrence ID or null to remove
Specification Reference:
RFC 5545 p.112-4

setRecurrenceId

public RecurrenceId setRecurrenceId(Date originalStartDate)
Sets the original value of the 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.

Parameters:
originalStartDate - the original start date or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.112-4

getSequence

public Sequence getSequence()
Gets the revision number of the journal entry. The organizer can increment this number every time he or she makes a significant change.

Returns:
the sequence number
Specification Reference:
RFC 5545 p.138-9

setSequence

public void setSequence(Sequence sequence)
Sets the revision number of the journal entry. The organizer can increment this number every time he or she makes a significant change.

Parameters:
sequence - the sequence number
Specification Reference:
RFC 5545 p.138-9

setSequence

public Sequence setSequence(Integer sequence)
Sets the revision number of the journal entry. The organizer can increment this number every time he or she makes a significant change.

Parameters:
sequence - the sequence number
Returns:
the property that was created
Specification Reference:
RFC 5545 p.138-9

incrementSequence

public void incrementSequence()
Increments the revision number of the journal entry. The organizer can increment this number every time he or she makes a significant change.

Specification Reference:
RFC 5545 p.138-9

getStatus

public Status getStatus()
Gets the status of the journal entry.

Returns:
the status or null if not set
Specification Reference:
RFC 5545 p.92-3

setStatus

public void setStatus(Status status)
Sets the status of the journal entry.

Valid journal status codes are:

Parameters:
status - the status or null to remove
Specification Reference:
RFC 5545 p.92-3

getSummary

public Summary getSummary()
Gets the summary of the journal entry.

Returns:
the summary or null if not set
Specification Reference:
RFC 5545 p.93-4

setSummary

public void setSummary(Summary summary)
Sets the summary of the journal entry.

Parameters:
summary - the summary or null to remove
Specification Reference:
RFC 5545 p.93-4

setSummary

public Summary setSummary(String summary)
Sets the summary of the journal entry.

Parameters:
summary - the summary or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.93-4

getUrl

public Url getUrl()
Gets a URL to a resource that contains additional information about the journal entry.

Returns:
the URL or null if not set
Specification Reference:
RFC 5545 p.116-7

setUrl

public void setUrl(Url url)
Sets a URL to a resource that contains additional information about the journal entry.

Parameters:
url - the URL or null to remove
Specification Reference:
RFC 5545 p.116-7

setUrl

public Url setUrl(String url)
Sets a URL to a resource that contains additional information about the journal entry.

Parameters:
url - the URL (e.g. "http://example.com/resource.ics") or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.116-7

getRecurrenceRule

public RecurrenceRule getRecurrenceRule()
Gets how often the journal entry repeats.

Returns:
the recurrence rule or null if not set
Specification Reference:
RFC 5545 p.122-32

setRecurrenceRule

public RecurrenceRule setRecurrenceRule(Recurrence recur)
Sets how often the journal entry repeats.

Parameters:
recur - the recurrence rule or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.122-32

setRecurrenceRule

public void setRecurrenceRule(RecurrenceRule recurrenceRule)
Sets how often the journal entry repeats.

Parameters:
recurrenceRule - the recurrence rule or null to remove
Specification Reference:
RFC 5545 p.122-32

getAttachments

public List<Attachment> getAttachments()
Gets any attachments that are associated with the journal entry.

Returns:
the attachments
Specification Reference:
RFC 5545 p.80-1

addAttachment

public void addAttachment(Attachment attachment)
Adds an attachment to the journal entry.

Parameters:
attachment - the attachment to add
Specification Reference:
RFC 5545 p.80-1

getAttendees

public List<Attendee> getAttendees()
Gets the people who are involved in the journal entry.

Returns:
the attendees
Specification Reference:
RFC 5545 p.107-9

addAttendee

public void addAttendee(Attendee attendee)
Adds a person who is involved in the journal entry.

Parameters:
attendee - the attendee
Specification Reference:
RFC 5545 p.107-9

addAttendee

public Attendee addAttendee(String email)
Adds a person who is involved in the journal entry.

Parameters:
email - the attendee's email address
Returns:
the property that was created
Specification Reference:
RFC 5545 p.107-9

getCategories

public List<Categories> getCategories()
Gets a list of "tags" or "keywords" that describe the journal entry.

Returns:
the categories
Specification Reference:
RFC 5545 p.81-2

addCategories

public void addCategories(Categories categories)
Adds a list of "tags" or "keywords" that describe the journal entry. Note that a single property can hold multiple keywords.

Parameters:
categories - the categories to add
Specification Reference:
RFC 5545 p.81-2

addCategories

public Categories addCategories(String... categories)
Adds a list of "tags" or "keywords" that describe the journal entry.

Parameters:
categories - the categories to add
Returns:
the property that was created
Specification Reference:
RFC 5545 p.81-2

addCategories

public Categories addCategories(List<String> categories)
Adds a list of "tags" or "keywords" that describe the journal entry.

Parameters:
categories - the categories to add
Returns:
the property that was created
Specification Reference:
RFC 5545 p.81-2

getComments

public List<Comment> getComments()
Gets the comments attached to the journal entry.

Returns:
the comments
Specification Reference:
RFC 5545 p.83-4

addComment

public void addComment(Comment comment)
Adds a comment to the journal entry.

Parameters:
comment - the comment to add
Specification Reference:
RFC 5545 p.83-4

addComment

public Comment addComment(String comment)
Adds a comment to the journal entry.

Parameters:
comment - the comment to add
Returns:
the property that was created
Specification Reference:
RFC 5545 p.83-4

getContacts

public List<Contact> getContacts()
Gets the contacts associated with the journal entry.

Returns:
the contacts
Specification Reference:
RFC 5545 p.109-11

addContact

public void addContact(Contact contact)
Adds a contact to the journal entry.

Parameters:
contact - the contact
Specification Reference:
RFC 5545 p.109-11

addContact

public Contact addContact(String contact)
Adds a contact to the journal entry.

Parameters:
contact - the contact (e.g. "ACME Co - (123) 555-1234")
Returns:
the property that was created
Specification Reference:
RFC 5545 p.109-11

getDescriptions

public List<Description> getDescriptions()
Gets the detailed descriptions to the journal entry. The descriptions should be a more detailed version of the one provided by the Summary property.

Returns:
the descriptions
Specification Reference:
RFC 5545 p.84-5

addDescription

public void addDescription(Description description)
Adds a detailed description to the journal entry. The description should be a more detailed version of the one provided by the Summary property.

Parameters:
description - the description
Specification Reference:
RFC 5545 p.84-5

addDescription

public Description addDescription(String description)
Adds a detailed description to the journal entry. The description should be a more detailed version of the one provided by the Summary property.

Parameters:
description - the description
Returns:
the property that was created
Specification Reference:
RFC 5545 p.84-5

getExceptionDates

public List<ExceptionDates> getExceptionDates()
Gets the list of exceptions to the recurrence rule defined in the journal entry (if one is defined).

Returns:
the list of exceptions
Specification Reference:
RFC 5545 p.118-20

addExceptionDates

public void addExceptionDates(ExceptionDates exceptionDates)
Adds a list of exceptions to the recurrence rule defined in the journal entry (if one is defined). Note that this property can contain multiple dates.

Parameters:
exceptionDates - the list of exceptions
Specification Reference:
RFC 5545 p.118-20

getRelatedTo

public List<RelatedTo> getRelatedTo()
Gets the components that the journal entry is related to.

Returns:
the relationships
Specification Reference:
RFC 5545 p.115-6

addRelatedTo

public void addRelatedTo(RelatedTo relatedTo)
Adds a component that the journal entry is related to.

Parameters:
relatedTo - the relationship
Specification Reference:
RFC 5545 p.115-6

addRelatedTo

public RelatedTo addRelatedTo(String uid)
Adds a component that the journal entry is related to.

Parameters:
uid - the UID of the other component
Returns:
the property that was created
Specification Reference:
RFC 5545 p.115-6

getRecurrenceDates

public List<RecurrenceDates> getRecurrenceDates()
Gets the list of dates/periods that help define the recurrence rule of this journal entry (if one is defined).

Returns:
the recurrence dates
Specification Reference:
RFC 5545 p.120-2

addRecurrenceDates

public void addRecurrenceDates(RecurrenceDates recurrenceDates)
Adds a list of dates/periods that help define the recurrence rule of this journal entry (if one is defined).

Parameters:
recurrenceDates - the recurrence dates
Specification Reference:
RFC 5545 p.120-2

getRequestStatus

public RequestStatus getRequestStatus()
Gets the response to a scheduling request.

Returns:
the response
Specification Reference:
RFC 5545 p.141-3

setRequestStatus

public void setRequestStatus(RequestStatus requestStatus)
Sets the response to a scheduling request.

Parameters:
requestStatus - the response
Specification Reference:
RFC 5545 p.141-3

getExceptionRules

public 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.

Returns:
the exception rules
Specification Reference:
RFC 2445 p.114-15

addExceptionRule

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.

Parameters:
recur - the exception rule to add
Returns:
the property that was created
Specification Reference:
RFC 2445 p.114-15

addExceptionRule

public 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.

Parameters:
exceptionRule - the exception rule to add
Specification Reference:
RFC 2445 p.114-15

validate

protected void validate(List<ICalComponent> components,
                        List<String> warnings)
Description copied from class: ICalComponent
Checks the component for data consistency problems or deviations from the spec. Meant to be overridden by child classes.

Overrides:
validate in class ICalComponent
Parameters:
components - the hierarchy of components that the component belongs to
warnings - the list to add the warnings to


Copyright © 2013 Michael Angstadt. All Rights Reserved.