com.funambol.common.pim.model.calendar
Class Attendee

java.lang.Object
  extended by com.funambol.common.pim.model.common.Property
      extended by com.funambol.common.pim.model.calendar.Attendee

public class Attendee
extends Property

Each instance of this class represents an attendee (in a broad sense as of the ATTENDEE property of iCalendar: it may be a delegate, the organizer, a resource etc.) of an event or task.

Version:
$Id: Attendee.java,v 1.6 2007-11-28 11:14:04 nichele Exp $

Field Summary
static short ACCEPTED
           
static short ATTENDEE
          Possible values for property role:
static short CHAIRMAN
           
static short COMPLETED
           
static short DECLINED
          Possible values for property status:
static short DELEGATE
           
static short DELEGATED
           
static short GROUP
           
static short IN_PROCESS
           
static short INDIVIDUAL
          Possible values for property kind:
static java.lang.String MAILTO
          Protocol prefix to use an e-mail address as a URI:
static short NEEDS_ACTION
           
static short NON_PARTICIPANT
          Possible values for property expected:
static short OPTIONAL
           
static short ORGANIZER
           
static short OWNER
           
static short REQUIRED
           
static short REQUIRED_IMMEDIATE
           
static short RESOURCE
           
static short ROOM
           
static short SENT
           
static short TENTATIVE
           
static short UNKNOWN
          Possible value for all short properties (role, expect, status and kind):
 
Fields inherited from class com.funambol.common.pim.model.common.Property
altrep, chrset, cn, cutype, delegatedFrom, delegatedTo, dir, encoding, group, language, member, partstat, propertyValue, related, sentby, tag, type, value, xParams
 
Constructor Summary
Attendee()
          Creates a new "empty" instance of Attendee (no name, no URI, all other properties set to UNKNOWN).
Attendee(java.lang.String name, java.lang.String uri, short role, short expected, short kind, short status)
          Creates a new instance of Attendee.
 
Method Summary
 boolean equals(java.lang.Object object)
          Checks whether this Attendee is equal to another Attendee.
 java.lang.String getEmail()
          Retrieves the e-mail address of the attendee from the URI property, provided the URI represents an e-mail address.
 short getExpected()
          Gets the expected participation status of the attendee.
 short getKind()
          Gets the kind of the attendee.
 java.lang.String getName()
          Gets the display name of the attendee.
 short getRole()
          Gets the role of the attendee.
 short getStatus()
          Gets the status of the attendee.
 java.lang.String getUri()
          Gets the URI of the attendee.
 int hashCode()
          Gets a reasonably reliable hash code for the Attendee object.
 void setEmail(java.lang.String email)
          Sets the URI of the attendee using a MAILTO content.
 void setExpected(short expected)
          Sets the expected participation status of the attendee.
 void setKind(short kind)
          Sets the kind of the attendee.
 void setName(java.lang.String name)
          Sets the display name of the attendee.
 void setRole(short role)
          Sets the role of the attendee.
 void setStatus(short status)
          Sets the status of the attendee.
 void setUri(java.lang.String uri)
          Sets the URI of the attendee.
 
Methods inherited from class com.funambol.common.pim.model.common.Property
compare, getAltrep, getCharset, getCn, getCutype, getDelegatedFrom, getDelegatedTo, getDir, getEncoding, getGroup, getLanguage, getMember, getPartstat, getPropertyValue, getPropertyValueAsString, getRelated, getSentby, getTag, getType, getValue, getXParams, isEmptyProperty, setAltrep, setCharset, setCn, setCutype, setDelegatedFrom, setDelegatedTo, setDir, setEncoding, setGroup, setLanguage, setMember, setPartstat, setPropertyValue, setRelated, setSentby, setTag, setType, setValue, setXParams, stringFrom, stringFrom
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

public static final short UNKNOWN
Possible value for all short properties (role, expect, status and kind):

See Also:
Constant Field Values

ATTENDEE

public static final short ATTENDEE
Possible values for property role:

See Also:
Constant Field Values

DELEGATE

public static final short DELEGATE
See Also:
Constant Field Values

ORGANIZER

public static final short ORGANIZER
See Also:
Constant Field Values

OWNER

public static final short OWNER
See Also:
Constant Field Values

NON_PARTICIPANT

public static final short NON_PARTICIPANT
Possible values for property expected:

See Also:
Constant Field Values

OPTIONAL

public static final short OPTIONAL
See Also:
Constant Field Values

REQUIRED

public static final short REQUIRED
See Also:
Constant Field Values

REQUIRED_IMMEDIATE

public static final short REQUIRED_IMMEDIATE
See Also:
Constant Field Values

CHAIRMAN

public static final short CHAIRMAN
See Also:
Constant Field Values

INDIVIDUAL

public static final short INDIVIDUAL
Possible values for property kind:

See Also:
Constant Field Values

GROUP

public static final short GROUP
See Also:
Constant Field Values

RESOURCE

public static final short RESOURCE
See Also:
Constant Field Values

ROOM

public static final short ROOM
See Also:
Constant Field Values

DECLINED

public static final short DECLINED
Possible values for property status:

See Also:
Constant Field Values

NEEDS_ACTION

public static final short NEEDS_ACTION
See Also:
Constant Field Values

SENT

public static final short SENT
See Also:
Constant Field Values

DELEGATED

public static final short DELEGATED
See Also:
Constant Field Values

TENTATIVE

public static final short TENTATIVE
See Also:
Constant Field Values

ACCEPTED

public static final short ACCEPTED
See Also:
Constant Field Values

IN_PROCESS

public static final short IN_PROCESS
See Also:
Constant Field Values

COMPLETED

public static final short COMPLETED
See Also:
Constant Field Values

MAILTO

public static final java.lang.String MAILTO
Protocol prefix to use an e-mail address as a URI:

See Also:
Constant Field Values
Constructor Detail

Attendee

public Attendee()
Creates a new "empty" instance of Attendee (no name, no URI, all other properties set to UNKNOWN).


Attendee

public Attendee(java.lang.String name,
                java.lang.String uri,
                short role,
                short expected,
                short kind,
                short status)
Creates a new instance of Attendee.

Parameters:
name - the attendee's name
uri - the attendee's URI
role - the attendee's role
expected - the attendee's expected participation
kind - the attendee's kind
status - the attendee's participation status
Method Detail

getName

public java.lang.String getName()
Gets the display name of the attendee.

Returns:
the display name of the attendee

setName

public void setName(java.lang.String name)
Sets the display name of the attendee.

Parameters:
name - the display name of the attendee

getUri

public java.lang.String getUri()
Gets the URI of the attendee.

Returns:
the URI of the attendee

setUri

public void setUri(java.lang.String uri)
Sets the URI of the attendee.

Parameters:
uri - the URI of the attendee

getEmail

public java.lang.String getEmail()
Retrieves the e-mail address of the attendee from the URI property, provided the URI represents an e-mail address.

Returns:
the email address of the attendee (without the "MAILTO:" prefix) or null if the URI does not represent an e-mail address

setEmail

public void setEmail(java.lang.String email)
Sets the URI of the attendee using a MAILTO content.

Parameters:
email - the e-mail address of the attendee (if it's null, the URI property will be set to null)

getRole

public short getRole()
Gets the role of the attendee.

Returns:
the role of the attendee.

setRole

public void setRole(short role)
Sets the role of the attendee.

Parameters:
role - the role of the attendee.

getExpected

public short getExpected()
Gets the expected participation status of the attendee.

Returns:
the expected participation status of the attendee

setExpected

public void setExpected(short expected)
Sets the expected participation status of the attendee.

Parameters:
expected - the expected participation status of the attendee

getKind

public short getKind()
Gets the kind of the attendee.

Returns:
the kind of the attendee

setKind

public void setKind(short kind)
Sets the kind of the attendee.

Parameters:
kind - the kind of the attendee

getStatus

public short getStatus()
Gets the status of the attendee.

Returns:
the status of the attendee

setStatus

public void setStatus(short status)
Sets the status of the attendee.

Parameters:
status - the status of the attendee

hashCode

public int hashCode()
Gets a reasonably reliable hash code for the Attendee object.

Overrides:
hashCode in class Property
Returns:
a hash code that follows the Object.hashCode() requirements

equals

public boolean equals(java.lang.Object object)
Checks whether this Attendee is equal to another Attendee.

Overrides:
equals in class Property
Parameters:
object - any other object
Returns:
true only if object is an Attendee instance and it has the same content as this one


Copyright © 2001-2009 Funambol.