public class Attendee extends ICalProperty
Defines an attendee (such as a person attending an event). This property has different meanings depending on the component that it belongs to:
VAlarm
(with "EMAIL" action) - An email address that is to
receive the alarm.Code sample:
VEvent event = new VEvent(); Attendee attendee = Attendee.email("johndoe@example.com") attendee.setCommonName("John Doe"); attendee.setRsvp(true); attendee.setRole(Role.CHAIR); attendee.setParticipationStatus(ParticipationStatus.ACCEPTED); event.addAttendee(attendee);
parameters
Constructor and Description |
---|
Attendee(String uri)
Creates an attendee property.
|
Attendee(String name,
String email)
Creates an attendee property.
|
Modifier and Type | Method and Description |
---|---|
void |
addDelegatedFrom(String uri)
Adds a person who has delegated his or her responsibility to the
attendee.
|
void |
addDelegatedTo(String uri)
Adds a person to which the attendee has delegated his or her
responsibility.
|
void |
addMember(String uri)
Adds a group that the attendee is a member of.
|
CalendarUserType |
getCalendarUserType()
Gets the type of user the attendee is (for example, an "individual" or a
"room").
|
String |
getCommonName()
Gets the display name of the person.
|
List<String> |
getDelegatedFrom()
Gets the people who have delegated their responsibility to the attendee.
|
List<String> |
getDelegatedTo()
Gets the people to which the attendee has delegated his or her
responsibility.
|
String |
getDirectoryEntry()
Gets a URI that contains additional information about the person.
|
String |
getEmail()
Gets the attendee's email
|
String |
getLanguage()
Gets the language that the common name is written in.
|
List<String> |
getMembers()
Gets the groups that the attendee is a member of.
|
ParticipationLevel |
getParticipationLevel()
Gets an attendee's level of participation.
|
ParticipationStatus |
getParticipationStatus()
Gets an attendee's participation status
|
Role |
getRole()
Gets an attendee's role (for example, "chair" or "attendee").
|
Boolean |
getRsvp()
Gets whether the organizer requests a response from the attendee.
|
String |
getSentBy()
Gets a person that is acting on behalf of the person defined in the
property.
|
String |
getUri()
Gets a URI representing the attendee.
|
void |
setCalendarUserType(CalendarUserType cutype)
Sets the type of user the attendee is (for example, an "individual" or a
"room").
|
void |
setCommonName(String commonName)
Sets the display name of the person.
|
void |
setDirectoryEntry(String uri)
Sets a URI that contains additional information about the person.
|
void |
setEmail(String email)
Sets the attendee's email
|
void |
setLanguage(String language)
Sets the language that the common name is written in.
|
void |
setParticipationLevel(ParticipationLevel level)
Sets an attendee's level of participation.
|
void |
setParticipationStatus(ParticipationStatus status)
Sets an attendee's participation status.
|
void |
setRole(Role role)
Sets an attendee's role (for example, "chair" or "attendee").
|
void |
setRsvp(Boolean rsvp)
Sets whether the organizer requests a response from the attendee.
|
void |
setSentBy(String uri)
Sets a person that is acting on behalf of the person defined in the
property.
|
void |
setUri(String uri)
Sets a URI representing the attendee.
|
protected void |
validate(List<ICalComponent> components,
ICalVersion version,
List<Warning> warnings)
Checks the property for data consistency problems or deviations from the
spec.
|
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
public Attendee(String name, String email)
name
- the attendee's name (e.g. "John Doe")email
- the attendee's email (e.g. "jdoe@example.com")public String getEmail()
public void setEmail(String email)
email
- the email (e.g. "jdoe@company.com")public String getUri()
public void setUri(String uri)
uri
- the URI (e.g. "mailto:jdoe@company.com")public CalendarUserType getCalendarUserType()
Gets the type of user the attendee is (for example, an "individual" or a "room").
Supported versions: 2.0
public void setCalendarUserType(CalendarUserType cutype)
Sets the type of user the attendee is (for example, an "individual" or a "room").
Supported versions: 2.0
cutype
- the calendar user type or null to removepublic List<String> getMembers()
Gets the groups that the attendee is a member of.
Supported versions: 2.0
public void addMember(String uri)
Adds a group that the attendee is a member of.
Supported versions: 2.0
uri
- the group URI (typically, an email address URI, e.g.
"mailto:mailinglist@example.com")public Role getRole()
public void setRole(Role role)
role
- the role or null to removepublic ParticipationLevel getParticipationLevel()
public void setParticipationLevel(ParticipationLevel level)
level
- the participation level or null to removepublic ParticipationStatus getParticipationStatus()
public void setParticipationStatus(ParticipationStatus status)
status
- the participation status or null to removepublic Boolean getRsvp()
public void setRsvp(Boolean rsvp)
rsvp
- true if an RSVP has been requested, false if not, null to
removepublic List<String> getDelegatedFrom()
Gets the people who have delegated their responsibility to the attendee.
Supported versions: 2.0
public void addDelegatedFrom(String uri)
Adds a person who has delegated his or her responsibility to the attendee.
Supported versions: 2.0
uri
- the delegator (typically an email URI, e.g.
"mailto:janedoe@example.com")public List<String> getDelegatedTo()
Gets the people to which the attendee has delegated his or her responsibility.
Supported versions: 2.0
public void addDelegatedTo(String uri)
Adds a person to which the attendee has delegated his or her responsibility.
Supported versions: 2.0
uri
- the delegatee (typically an email URI, e.g.
"mailto:janedoe@example.com")public String getSentBy()
ICalProperty
Gets a person that is acting on behalf of the person defined in the property.
Supported versions: 2.0
public void setSentBy(String uri)
ICalProperty
Sets a person that is acting on behalf of the person defined in the property.
Supported versions: 2.0
uri
- a URI representing the person (typically, an email URI, e.g.
"mailto:janedoe@example.com") or null to removepublic String getCommonName()
ICalProperty
Gets the display name of the person.
Supported versions: 2.0
public void setCommonName(String commonName)
ICalProperty
Sets the display name of the person.
Supported versions: 2.0
commonName
- the display name (e.g. "John Doe") or null to removepublic String getDirectoryEntry()
ICalProperty
Gets a URI that contains additional information about the person.
Supported versions: 2.0
public void setDirectoryEntry(String uri)
ICalProperty
Sets a URI that contains additional information about the person.
Supported versions: 2.0
uri
- the URI (e.g. an LDAP URI) or null to removepublic String getLanguage()
public void setLanguage(String language)
language
- the language (e.g. "en" for English) or null to removeprotected void validate(List<ICalComponent> components, ICalVersion version, List<Warning> warnings)
ICalProperty
Checks the property 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 ICalProperty
components
- the hierarchy of components that the property belongs
toversion
- the version to validate againstwarnings
- the list to add the warnings toCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.