|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JabberMessage
com.echomine.jabber.JabberJDOMMessage
com.echomine.jabber.AbstractJabberMessage
com.echomine.jabber.JabberIQMessage
com.echomine.jabber.msg.JabberVCardMessage
public class JabberVCardMessage
A type of IQ message which contains extended information about a user.
These information include the user's full name, home and work address, email address, and a lot of other more or less useful data. This class can be used both for requesting and for retrieving or sending a vCard message.Current Implementation: JEP-0054 Version 1.1 (vcard-temp)
Nested Class Summary | |
---|---|
class |
JabberVCardMessage.LocalStruct
Contains data about a location. |
Field Summary |
---|
Fields inherited from class com.echomine.jabber.JabberIQMessage |
---|
TYPE_GET, TYPE_RESULT, TYPE_SET |
Fields inherited from class com.echomine.jabber.AbstractJabberMessage |
---|
TYPE_ERROR |
Fields inherited from class com.echomine.jabber.JabberMessage |
---|
messageID |
Constructor Summary | |
---|---|
JabberVCardMessage()
Creates a JabberVCardMessage of type "set". |
|
JabberVCardMessage(java.lang.String type)
Normally used for creating a new outgoing message. |
Method Summary | |
---|---|
protected void |
add(Element e,
java.lang.String elname,
java.lang.String eltext)
A convenience method to add a pair of strings to a DOM element. |
java.lang.String |
encode()
Encodes the message into XML. |
java.lang.String |
getAge()
Gets the user's age. |
java.lang.String |
getBackground()
Gets the user's background. |
java.lang.String |
getBirthday()
Gets the user's birthday. |
java.lang.String |
getDesc()
Gets the user's advanced description. |
java.lang.String |
getFamily()
Gets the user's family name. |
java.lang.String |
getForeground()
Gets the user's foreground. |
java.lang.String |
getFullName()
Gets the user's full name. |
java.lang.String |
getGender()
Gets the user's gender. |
java.lang.String |
getGiven()
Gets the user's first name. |
JabberVCardMessage.LocalStruct |
getHome()
Gets the home struct. |
JID |
getJID()
Gets the user's Jabber ID. |
java.lang.String |
getMail()
Gets the user's email address. |
int |
getMessageType()
Gets the message type. |
java.lang.String |
getMiddle()
Gets the user's middle name. |
java.lang.String |
getNickname()
Gets the user's nickname. |
java.lang.String |
getOrgName()
Gets the organization name. |
java.lang.String |
getOrgUnit()
Gets the organization unit. |
java.lang.String |
getPhoto()
Gets the user's photo. |
java.lang.String |
getPhotoType()
Get the MIME type of the photo if the photo data is Base64. |
java.lang.String |
getRole()
Gets the user's role. |
java.lang.String |
getTitle()
Gets the user's title. |
java.lang.String |
getURL()
Gets the user's homepage URL. |
JabberVCardMessage.LocalStruct |
getWork()
Gets the work struct. |
JabberMessage |
parse(JabberMessageParser parser,
Element msgTree)
Parses element/incoming message into a message object. |
void |
setAge(java.lang.String pAge)
Sets the user's age. |
void |
setBackground(java.lang.String pBackground)
Sets the user's background. |
void |
setBirthday(java.lang.String pBirthday)
Sets the user's birthday. |
void |
setDesc(java.lang.String pDesc)
Sets the user's advanced description. |
void |
setFamily(java.lang.String pFamilyName)
Sets the user's family name. |
void |
setForeground(java.lang.String pForeground)
Sets the user's foreground. |
void |
setFullName(java.lang.String pFullName)
Sets the full name. |
void |
setGender(java.lang.String pGender)
Sets the user's gender. |
void |
setGiven(java.lang.String pGivenName)
Sets the user's first name. |
void |
setJID(JID pJID)
Sets the user's Jabber ID. |
void |
setMail(java.lang.String pMail)
Sets the user's email address. |
void |
setMiddle(java.lang.String pMiddleName)
Sets the user's middle name. |
void |
setNickname(java.lang.String pNickname)
Sets the user's nickname. |
void |
setOrgName(java.lang.String pOrgName)
Sets the organization name. |
void |
setOrgUnit(java.lang.String pOrgUnit)
Sets the organization unit. |
void |
setPhoto(java.lang.String pPhoto)
Sets the user's ephoto. |
void |
setPhotoType(java.lang.String photoType)
Set MIME type of a photo, if it's base64-encoded. |
void |
setRole(java.lang.String pRole)
Sets the user's role. |
void |
setTitle(java.lang.String pTitle)
Sets the user's title. |
void |
setURL(java.lang.String pURL)
Sets the user's homepage URL. |
Methods inherited from class com.echomine.jabber.AbstractJabberMessage |
---|
getErrorMessage, getFrom, getTo, getType, isError, setErrorMessage, setFrom, setTo, setType |
Methods inherited from class com.echomine.jabber.JabberJDOMMessage |
---|
getDOM, getXMLOutputter, setMessageID, toString |
Methods inherited from class com.echomine.jabber.JabberMessage |
---|
getMessageID, getReplyMessage, getTimeout, getXMessage, getXMessages, interrupt, isReplyRequired, isSendXMessages, isSynchronized, replyReceived, setReplyRequired, setSendXMessages, setSynchronized, setTimeout, setXMessage, setXMessages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JabberVCardMessage(java.lang.String type)
public JabberVCardMessage()
Method Detail |
---|
public java.lang.String getFullName()
public void setFullName(java.lang.String pFullName)
pFullName
- The full name of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getMail()
public java.lang.String getPhoto()
public void setPhoto(java.lang.String pPhoto)
pPhoto
- The photo of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getPhotoType()
public void setPhotoType(java.lang.String photoType)
photo
is a URL.
photoType
- The new Photo type value.public java.lang.String getForeground()
public void setForeground(java.lang.String pForeground)
pForeground
- The foreground of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getBackground()
public void setBackground(java.lang.String pBackground)
pBackground
- The background of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public void setMail(java.lang.String pMail)
pMail
- The email address of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getBirthday()
public void setBirthday(java.lang.String pBirthday)
pBirthday
- The birthday of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getGender()
public void setGender(java.lang.String pGender)
pGender
- The gender of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getAge()
public void setAge(java.lang.String pAge)
pAge
- The age of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getURL()
public void setURL(java.lang.String pURL)
pURL
- The URL of the user's homepage. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getOrgName()
public void setOrgName(java.lang.String pOrgName)
pOrgName
- The name of the user's organization. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getOrgUnit()
public void setOrgUnit(java.lang.String pOrgUnit)
pOrgUnit
- The user's unit in the organization (?). Set this to an empty string or
null
to have the field be skipped when creating the vCard.public java.lang.String getTitle()
public void setTitle(java.lang.String pTitle)
pTitle
- The title of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getRole()
public void setRole(java.lang.String pRole)
pRole
- The role of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getDesc()
public void setDesc(java.lang.String pDesc)
pDesc
- The description of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public JID getJID()
public void setJID(JID pJID)
pJID
- The Jabber ID of the user. Set this to null
to have the field be skipped when creating the vCard.public java.lang.String getMiddle()
public void setMiddle(java.lang.String pMiddleName)
pMiddleName
- The middle name of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getGiven()
public void setGiven(java.lang.String pGivenName)
pGivenName
- The first name of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getFamily()
public void setFamily(java.lang.String pFamilyName)
pFamilyName
- The family name of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public java.lang.String getNickname()
public void setNickname(java.lang.String pNickname)
pNickname
- The nickname of the user. Set this to an empty string or null
to have the field be skipped when creating the vCard.public JabberVCardMessage.LocalStruct getHome()
JabberVCardMessage.LocalStruct
that contains
information about the user's home.public JabberVCardMessage.LocalStruct getWork()
JabberVCardMessage.LocalStruct
that contains
information about the user's working place.public int getMessageType()
getMessageType
in class JabberIQMessage
JabberCode
public JabberMessage parse(JabberMessageParser parser, Element msgTree) throws ParseException
parse
in interface JabberMessageParsable
parse
in class AbstractJabberMessage
parser
- the messageg parsermsgTree
- The element which the message object will be constructed from.
Element msgTree
.
ParseException
- if parsing the message failed.public java.lang.String encode() throws ParseException
encode
in class JabberJDOMMessage
ParseException
- if something wicked happened while encoding the message.protected void add(Element e, java.lang.String elname, java.lang.String eltext)
Element e
a new element with the name given
by the elname
parameter and sets the new element's content to
the eltext
string. If eltext
is empty, nothing happens
(no Element will be added to e
in this case).
e
- The org.jdom.Element
to add the new element to.elname
- The name of the new element.eltext
- The content of the new element.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |