com.objectxp.msg.smart
Class VCalendar

java.lang.Object
  extended by com.objectxp.msg.Message
      extended by com.objectxp.msg.SmsMessage
          extended by com.objectxp.msg.smart.SmartMessage
              extended by com.objectxp.msg.smart.VCalendar
All Implemented Interfaces:
MultiPartMessage, java.io.Serializable, java.lang.Cloneable

public class VCalendar
extends SmartMessage

This class represents a VCalendar entry. vCalendar is an ex-change format for personal scheduling information. It can be used to submit personal calendaring information to mobile devices supporting the vCalendar format.

Example:

 ...
 SmsService service = new GsmSmsService();
 ...
 VCalendar vc = new VCalendar();

 vc.setRecipient("+41987654321");
 vc.setSummary("Business Lunch");
 vc.setStart("20010815","123000");
 vc.setEnd("20010815","140000");

 service.sendMessage(vc);
 ...
 

See Also:
Serialized Form

Field Summary
static int CAT_APPOINTMENT
          Category: Appointment
static int CAT_BUSINESS
          Category: Business
static int CAT_EDUCATION
          Category: Education
static int CAT_HOLIDAY
          Category: Holiday
static int CAT_MEETING
          Category: Meeting
static int CAT_MISCELLANEOUS
          Category: Miscellaneous
static int CAT_PERSONAL
          Category: Personal
static int CAT_PHONE_CALL
          Category: Phone call
static int CAT_SICK_DAY
          Category: Sick Day
static int CAT_SPECIAL_OCC
          Category: Special Occasion
static int CAT_TRAVEL
          Category: Travel
static int CAT_VACATION
          Category: Vacation
static int CLASS_CONFIDENTIAL
          Classification: Confidential
static int CLASS_PRIVATE
          Classification: Private
static int CLASS_PUBLIC
          Classification: Public
static int PROP_ATTACH
          Attachment: The property defines an attached object to the vCalendar entity.
static int PROP_ATTENDEE
          Attendee: The property defines an attendee to a group event or todo.
static int PROP_COMPLETED
          Date/Time Completed: This property defines the date and time that the todo was actually completed.
static int PROP_DCREATED
          Date/Time Created: This property specifies the date and time that the vCalendar entity was created within the originating calendar system.
static int PROP_DESCRIPTION
          Description: This property provides a more complete description of the vCalendar entity, than that provided by the SUMMARY property.
static int PROP_DTEND
          End Date/Time: This property defines the date and time that the event will end.
static int PROP_DTSTART
          Start Date/Time: This property defines the date and time that the event will start.
static int PROP_DUE
          Due Date/Time: This property defines the date and time that the todo is due to be completed.
static int PROP_LOCATION
          Location: The property defines the intended location for a vCalendar entity.
static int PROP_PRIORITY
          Priority: The property defines the priority for the vCalendar entity.
static int PROP_RELATED_TO
          Related to: The property is used to represent relationships or references between this vCalendar entity and another.
static int PROP_RNUM
          Number Recurrences: The property defines the number of times the calendar entry will reoccur.
static int PROP_RRULE
          Recurrence Rule: This property defines a rule or repeating pattern for a recurring vCalendar entity, based on the Basic Recurrence Rule Grammar of XAPIAs CSA.
static int PROP_SEQUENCE
          Sequence number: This property defines the instance of the vCalendar entity in a sequence of revisions.
static int PROP_SUMMARY
          Summary: This property defines a short summary or subject of the vCalendar entity.
static int PROP_TRANSP
          Time Transparency: This property defines whether the event is transparent to free time searches.
static int PROP_UID
          Unique Identifier: This property defines a persistent, globally unique identifier associated with the vCalendar entity.
static int PROP_URL
          Uniform Resource Locator: This property defines a Uniform Resource Locator for an Internet location that can be used to obtain real-time information associated with the vCalendar entity.
static int RC_CATERING
          Resource: Catering
static int RC_CHAIRS
          Resource: Chairs
static int RC_EASEL
          Resource: Easel
static int RC_PROJECTOR
          Resource: Projector
static int RC_VCR
          Resource: VCR
static int RC_VEHICLE
          Resource: Vehicle
static int STATUS_ACCEPTED
          Status: Accepted
static int STATUS_COMPLETE
          Status: Complete
static int STATUS_CONFIRMED
          Status: Confirmed
static int STATUS_DECLINED
          Status: Declined
static int STATUS_DELEGATED
          Status: Delegated
static int STATUS_NEEDS_ACTION
          Status: Needs action
static int STATUS_SENT
          Status: Confirmed
static int STATUS_TENTATIVE
          Status: Tentative
static int TYPE_EVENT
          Type of Entry: Event
static int TYPE_TODO
          Type of Entry: ToDo
 
Fields inherited from class com.objectxp.msg.SmsMessage
CLASS_0, CLASS_1, CLASS_2, CLASS_3, DC_8BIT, DC_DEFAULT, DC_GROUP_DATA, DC_GROUP_GENERAL, DC_GROUP_MSG_WAITING_DISCARD, DC_GROUP_MSG_WAITING_STORE, DC_UCS2, INDICATION_ACTIVE, INDICATION_INACTIVE, INDICATION_TYPE_EMAIL, INDICATION_TYPE_FAX, INDICATION_TYPE_OTHER, INDICATION_TYPE_VOICEMAIL, NO_CLASS
 
Fields inherited from class com.objectxp.msg.Message
ACK_TIME, MT_BINARY, MT_STATUS, MT_TEXT, SENDER_TYPE_ALPHA, SENDER_TYPE_GUESS, SENDER_TYPE_NUMBER
 
Constructor Summary
VCalendar()
          Constructs an new VCalendar object.
VCalendar(int type)
          Create a new VCalendar object with the given type.
VCalendar(SmsService service)
          Deprecated. since jSMS 1.7, use VCalendar()
VCalendar(SmsService service, int type)
          Deprecated. since jSMS 1.7, use VCalendar(int)
 
Method Summary
 void addProperty(int property, java.lang.String value)
          Set a specific property of this calendar entry
 java.lang.String getAttachement()
          returns the Atachement property of this calendar entry
 java.lang.String getAttendee()
          returns the Attendee: property of this calendar entry
 java.lang.String getCategory()
          returns the category of this calendar entry
 java.lang.String getClassification()
          returns the classification of this calendar entry
 java.lang.String getCompleted()
          returns the Completed property of this calendar entry
 java.lang.String getCreateDate()
          returns the Date/Time created property of this calendar entry
 java.lang.String getDescription()
          returns the Description property of this calendar entry
 java.lang.String getDueDate()
          returns the Due Date/Time property of this calendar entry
 java.lang.String getEndDate()
          returns the End Date/Time property of this calendar entry
 java.lang.String getLocation()
          returns the Location property of this calendar entry
 java.lang.String getMessage()
          Get the Message (User Data) as String.
 java.lang.String getPriority()
          returns the Priority property of this calendar entry
 java.lang.String getReleatedTo()
          returns the Releated to property of this calendar entry
 java.lang.String getReocurences()
          returns the number of reoccurences property of this calendar entry
 java.lang.String getResources()
          returns the resources of this calendar entry
 java.lang.String getSequence()
          returns the Sequence property of this calendar entry
 java.lang.String getStartDate()
          returns the Start Date/Time property of this calendar entry
 java.lang.String getStatus()
          returns the status of this calendar entry
 java.lang.String getSummary()
          returns the Summary property of this calendar entry
 java.lang.String getTimeTransparency()
          returns the Time Transparency property of this calendar entry
 java.lang.String getUniqueIdentifier()
          returns the Unique Identifier property of this calendar entry
 java.lang.String getURL()
          returns the URL property of this calendar entry
 byte[] getUserData()
          Get the User Data of this message.
 void setCategory(int cat)
          Set the category of the calendar entry
 void setClassification(int cl)
          Set the classification of the calendar entry
 void setDescription(java.lang.String desc)
          Set the description for this calendar entry
 void setEnd(java.util.Date date)
          Set the ending date and time of the calendar entry
 void setEnd(java.lang.String date, java.lang.String time)
          Set the ending date and time of the calendar entry
 void setResource(int res)
          Set the resources needed for this calendar entry
 void setStart(java.util.Date date)
          Set the starting date and time of the calendar entry
 void setStart(java.lang.String date, java.lang.String time)
          Set the starting date and time of the calendar entry
 void setStatus(int stat)
          Set the status of the calendar entry
 void setSummary(java.lang.String sum)
          Set the summary text of the calendar entry
 java.lang.String toString()
          Constructs a string representation of this Message
 
Methods inherited from class com.objectxp.msg.smart.SmartMessage
buildParts, buildParts, getParts
 
Methods inherited from class com.objectxp.msg.SmsMessage
containsUserDataHeader, copyFields, getAlphabet, getBytes, getCodingGroup, getDeferredDeliveryAsDate, getDeferredDeliveryInMinutes, getID, getIndicationState, getIndicationType, getMessageClass, getParent, getPID, getRecipient, getRecipientAddress, getSender, getSenderAddress, getType, getUserDataHeader, getValidityPeriodAsDate, getValidityPeriodInMinutes, hasDeferredDelivery, hasMessageClass, hasValidityPeriod, isCompressed, isMMS, isRejectDuplicates, isRelativeDeferredDelivery, isRelativeValidityPeriod, isReplyPath, requestStatusReport, requestStatusReport, setAlphabet, setCodingGroup, setCompression, setDeferredDelivery, setDeferredDelivery, setIndicationState, setIndicationType, setMessage, setMessage, setMessageClass, setMMS, setParent, setPID, setRecipient, setRecipientAddress, setRejectDuplicates, setReplyPath, setSender, setSenderAddress, setType, setUserData, setUserDataHeader, setUserDataHeader, setValidityPeriod, setValidityPeriod
 
Methods inherited from class com.objectxp.msg.Message
clone, getProperty, getSenderType, getTimestamp, setID, setProperty, setSenderType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_EVENT

public static final int TYPE_EVENT
Type of Entry: Event

See Also:
Constant Field Values

TYPE_TODO

public static final int TYPE_TODO
Type of Entry: ToDo

See Also:
Constant Field Values

CAT_APPOINTMENT

public static final int CAT_APPOINTMENT
Category: Appointment

See Also:
Constant Field Values

CAT_BUSINESS

public static final int CAT_BUSINESS
Category: Business

See Also:
Constant Field Values

CAT_EDUCATION

public static final int CAT_EDUCATION
Category: Education

See Also:
Constant Field Values

CAT_HOLIDAY

public static final int CAT_HOLIDAY
Category: Holiday

See Also:
Constant Field Values

CAT_MEETING

public static final int CAT_MEETING
Category: Meeting

See Also:
Constant Field Values

CAT_MISCELLANEOUS

public static final int CAT_MISCELLANEOUS
Category: Miscellaneous

See Also:
Constant Field Values

CAT_PERSONAL

public static final int CAT_PERSONAL
Category: Personal

See Also:
Constant Field Values

CAT_PHONE_CALL

public static final int CAT_PHONE_CALL
Category: Phone call

See Also:
Constant Field Values

CAT_SICK_DAY

public static final int CAT_SICK_DAY
Category: Sick Day

See Also:
Constant Field Values

CAT_SPECIAL_OCC

public static final int CAT_SPECIAL_OCC
Category: Special Occasion

See Also:
Constant Field Values

CAT_TRAVEL

public static final int CAT_TRAVEL
Category: Travel

See Also:
Constant Field Values

CAT_VACATION

public static final int CAT_VACATION
Category: Vacation

See Also:
Constant Field Values

CLASS_PUBLIC

public static final int CLASS_PUBLIC
Classification: Public

See Also:
Constant Field Values

CLASS_PRIVATE

public static final int CLASS_PRIVATE
Classification: Private

See Also:
Constant Field Values

CLASS_CONFIDENTIAL

public static final int CLASS_CONFIDENTIAL
Classification: Confidential

See Also:
Constant Field Values

RC_CATERING

public static final int RC_CATERING
Resource: Catering

See Also:
Constant Field Values

RC_CHAIRS

public static final int RC_CHAIRS
Resource: Chairs

See Also:
Constant Field Values

RC_EASEL

public static final int RC_EASEL
Resource: Easel

See Also:
Constant Field Values

RC_PROJECTOR

public static final int RC_PROJECTOR
Resource: Projector

See Also:
Constant Field Values

RC_VCR

public static final int RC_VCR
Resource: VCR

See Also:
Constant Field Values

RC_VEHICLE

public static final int RC_VEHICLE
Resource: Vehicle

See Also:
Constant Field Values

STATUS_ACCEPTED

public static final int STATUS_ACCEPTED
Status: Accepted

See Also:
Constant Field Values

STATUS_NEEDS_ACTION

public static final int STATUS_NEEDS_ACTION
Status: Needs action

See Also:
Constant Field Values

STATUS_SENT

public static final int STATUS_SENT
Status: Confirmed

See Also:
Constant Field Values

STATUS_TENTATIVE

public static final int STATUS_TENTATIVE
Status: Tentative

See Also:
Constant Field Values

STATUS_CONFIRMED

public static final int STATUS_CONFIRMED
Status: Confirmed

See Also:
Constant Field Values

STATUS_DECLINED

public static final int STATUS_DECLINED
Status: Declined

See Also:
Constant Field Values

STATUS_COMPLETE

public static final int STATUS_COMPLETE
Status: Complete

See Also:
Constant Field Values

STATUS_DELEGATED

public static final int STATUS_DELEGATED
Status: Delegated

See Also:
Constant Field Values

PROP_ATTACH

public static final int PROP_ATTACH
Attachment: The property defines an attached object to the vCalendar entity. For example, a document to be reviewed at a scheduled event or the process steps for a todo. The property value can be a text string, a reference to another message body part or a reference to a URL based document.

See Also:
Constant Field Values

PROP_ATTENDEE

public static final int PROP_ATTENDEE
Attendee: The property defines an attendee to a group event or todo. The default property value is an (RFC 822) address

See Also:
Constant Field Values

PROP_DCREATED

public static final int PROP_DCREATED
Date/Time Created: This property specifies the date and time that the vCalendar entity was created within the originating calendar system.

See Also:
Constant Field Values

PROP_COMPLETED

public static final int PROP_COMPLETED
Date/Time Completed: This property defines the date and time that the todo was actually completed.

See Also:
Constant Field Values

PROP_DESCRIPTION

public static final int PROP_DESCRIPTION
Description: This property provides a more complete description of the vCalendar entity, than that provided by the SUMMARY property.

See Also:
Constant Field Values

PROP_DUE

public static final int PROP_DUE
Due Date/Time: This property defines the date and time that the todo is due to be completed.

See Also:
Constant Field Values

PROP_DTEND

public static final int PROP_DTEND
End Date/Time: This property defines the date and time that the event will end.

See Also:
Constant Field Values

PROP_LOCATION

public static final int PROP_LOCATION
Location: The property defines the intended location for a vCalendar entity.

See Also:
Constant Field Values

PROP_RNUM

public static final int PROP_RNUM
Number Recurrences: The property defines the number of times the calendar entry will reoccur. The value is equal to the number of recurrences that are specified by the union of the Recurrence Dates, Recurrence Rule, Exception Dates, and Exception Rule property values.

See Also:
Constant Field Values

PROP_PRIORITY

public static final int PROP_PRIORITY
Priority: The property defines the priority for the vCalendar entity. A value of one is the highest priority. A value of two is the second highest priority. Subsequent numbers specify a decreasing ordinal priority

See Also:
Constant Field Values

PROP_RELATED_TO

public static final int PROP_RELATED_TO
Related to: The property is used to represent relationships or references between this vCalendar entity and another. The property value consists of the persistent, globally unique identifier of another vCalendar entity

See Also:
Constant Field Values

PROP_RRULE

public static final int PROP_RRULE
Recurrence Rule: This property defines a rule or repeating pattern for a recurring vCalendar entity, based on the Basic Recurrence Rule Grammar of XAPIAs CSA.

See Also:
Constant Field Values

PROP_SEQUENCE

public static final int PROP_SEQUENCE
Sequence number: This property defines the instance of the vCalendar entity in a sequence of revisions.

See Also:
Constant Field Values

PROP_DTSTART

public static final int PROP_DTSTART
Start Date/Time: This property defines the date and time that the event will start.

See Also:
Constant Field Values

PROP_SUMMARY

public static final int PROP_SUMMARY
Summary: This property defines a short summary or subject of the vCalendar entity.

See Also:
Constant Field Values

PROP_TRANSP

public static final int PROP_TRANSP
Time Transparency: This property defines whether the event is transparent to free time searches. The value of this property is a number. A value of zero (ASCII decimal 48) guaranttes that the entry will blocks time and will be factored into a free time search. A value of one (ASCII decimal 49) specifies that the entry will not block time and will not be factored into a free time search.

See Also:
Constant Field Values

PROP_URL

public static final int PROP_URL
Uniform Resource Locator: This property defines a Uniform Resource Locator for an Internet location that can be used to obtain real-time information associated with the vCalendar entity.

See Also:
Constant Field Values

PROP_UID

public static final int PROP_UID
Unique Identifier: This property defines a persistent, globally unique identifier associated with the vCalendar entity.

See Also:
Constant Field Values
Constructor Detail

VCalendar

public VCalendar()
          throws java.lang.IllegalArgumentException
Constructs an new VCalendar object. The calendar type will be set to vCalendar.TYPE_EVENT.

Throws:
java.lang.IllegalArgumentException

VCalendar

public VCalendar(SmsService service)
          throws java.lang.IllegalArgumentException
Deprecated. since jSMS 1.7, use VCalendar()

Constructs an new VCalendar object. The calendar type will be set to vCalendar.TYPE_EVENT.

Parameters:
service - the initialized SmsService used for sending the message
Throws:
java.lang.IllegalArgumentException - if the SmsService is null or has not yet been initialized

VCalendar

public VCalendar(int type)
          throws java.lang.IllegalArgumentException
Create a new VCalendar object with the given type.

Parameters:
type - the calendar type (TYPE_EVENT, TYPE_TOD0)
Throws:
java.lang.IllegalArgumentException

VCalendar

public VCalendar(SmsService service,
                 int type)
          throws java.lang.IllegalArgumentException
Deprecated. since jSMS 1.7, use VCalendar(int)

Create a new VCalendar object with the given type.

Parameters:
service - the initialized SmsService used for sending the message
type - the calendar type (TYPE_EVENT, TYPE_TOD0)
Throws:
java.lang.IllegalArgumentException - if the SmsService is null or has not yet been initialized
Method Detail

setStart

public void setStart(java.lang.String date,
                     java.lang.String time)
Set the starting date and time of the calendar entry

Parameters:
date - the date (format: yyyyMMdd)
time - the time (format: HHmmss)

setStart

public void setStart(java.util.Date date)
Set the starting date and time of the calendar entry

Parameters:
date - the date

setEnd

public void setEnd(java.lang.String date,
                   java.lang.String time)
Set the ending date and time of the calendar entry

Parameters:
date - the date (format: yyyyMMdd)
time - the time (format: HHmmss)

setEnd

public void setEnd(java.util.Date date)
Set the ending date and time of the calendar entry

Parameters:
date - the date

setCategory

public void setCategory(int cat)
Set the category of the calendar entry

Parameters:
cat - a category type (e.g. VCalendar.CAT_VACATION)

setClassification

public void setClassification(int cl)
Set the classification of the calendar entry

Parameters:
cl - a classification (e.g. VCalendar.CLASS_PUBLIC)

setStatus

public void setStatus(int stat)
Set the status of the calendar entry

Parameters:
stat - e.g. VCalendar.STATUS_COMPLETE

setSummary

public void setSummary(java.lang.String sum)
Set the summary text of the calendar entry


setResource

public void setResource(int res)
Set the resources needed for this calendar entry

Parameters:
res - e.g. VCalendar.RC_PROJECTOR

setDescription

public void setDescription(java.lang.String desc)
Set the description for this calendar entry


getAttachement

public java.lang.String getAttachement()
returns the Atachement property of this calendar entry


getAttendee

public java.lang.String getAttendee()
returns the Attendee: property of this calendar entry


getCompleted

public java.lang.String getCompleted()
returns the Completed property of this calendar entry


getCreateDate

public java.lang.String getCreateDate()
returns the Date/Time created property of this calendar entry


getDescription

public java.lang.String getDescription()
returns the Description property of this calendar entry


getEndDate

public java.lang.String getEndDate()
returns the End Date/Time property of this calendar entry


getStartDate

public java.lang.String getStartDate()
returns the Start Date/Time property of this calendar entry


getDueDate

public java.lang.String getDueDate()
returns the Due Date/Time property of this calendar entry


getLocation

public java.lang.String getLocation()
returns the Location property of this calendar entry


getPriority

public java.lang.String getPriority()
returns the Priority property of this calendar entry


getReleatedTo

public java.lang.String getReleatedTo()
returns the Releated to property of this calendar entry


getReocurences

public java.lang.String getReocurences()
returns the number of reoccurences property of this calendar entry


getSequence

public java.lang.String getSequence()
returns the Sequence property of this calendar entry


getSummary

public java.lang.String getSummary()
returns the Summary property of this calendar entry


getTimeTransparency

public java.lang.String getTimeTransparency()
returns the Time Transparency property of this calendar entry


getUniqueIdentifier

public java.lang.String getUniqueIdentifier()
returns the Unique Identifier property of this calendar entry


getURL

public java.lang.String getURL()
returns the URL property of this calendar entry


getCategory

public java.lang.String getCategory()
returns the category of this calendar entry


getClassification

public java.lang.String getClassification()
returns the classification of this calendar entry


getResources

public java.lang.String getResources()
returns the resources of this calendar entry


getStatus

public java.lang.String getStatus()
returns the status of this calendar entry


addProperty

public void addProperty(int property,
                        java.lang.String value)
Set a specific property of this calendar entry

Parameters:
property - the constant representing the property to set (e.g. VCalendar.PROP_SUMMARY).
value - the value of the property.

getMessage

public java.lang.String getMessage()
Description copied from class: SmsMessage
Get the Message (User Data) as String.

Overrides:
getMessage in class SmsMessage
Returns:
the User Data converted to a String object.
See Also:
SmsMessage.getUserData()

getUserData

public byte[] getUserData()
Description copied from class: SmsMessage
Get the User Data of this message.

Overrides:
getUserData in class SmsMessage
Returns:
the user data or null if the message contains no user data

toString

public java.lang.String toString()
Description copied from class: Message
Constructs a string representation of this Message

Overrides:
toString in class SmsMessage


object XP, Inc. © 2000-2008. All rights reserved object XP