|
||||||||||
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.VacationIQMessage
public class VacationIQMessage
Works with vacation messages. This allow the user to specify and even schedule a time when the vacation message will be displayed. Normally, you must first check to see if the server supports vacation messages (it is a disco service, thus it cannot be retrieved through jabber:iq:agent or jabber:iq:browse). For now, vacation message have a defined disco namespace. Thus, it will be used for now until otherwise specified in the JEP.
Current Implementation: JEP-0109 Version 0.2
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 | |
---|---|
VacationIQMessage()
sets the default to be of iq type "get" |
|
VacationIQMessage(java.lang.String type)
this constructor is for creating outgoing messages. |
Method Summary | |
---|---|
static VacationIQMessage |
createRemoveVacationMessage()
Convenience method to create a vacation message that allows you to remove your vacation message. |
static VacationIQMessage |
createRequestVacationMessage()
Convenience method to instantiate a vacation message that allows you to request for your own vacation settings. |
static VacationIQMessage |
createSetVacationMessage(java.util.Calendar startDate,
java.util.Calendar endDate,
java.lang.String vacationMessage)
Convenience method to create a vacation message that allows you to set your vacation message. |
java.lang.String |
encode()
encodes the data in this object into XML string |
java.util.Calendar |
getEndDate()
the ending date for the vacation message. |
int |
getMessageType()
the default message type is unknown. |
java.util.Calendar |
getStartDate()
the ending date for the vacation message. |
java.lang.String |
getVacationMessage()
|
JabberMessage |
parse(JabberMessageParser parser,
Element msgTree)
parses the incoming XML DOM object for the data that we need |
void |
setEndDate(java.util.Calendar endDate)
sets the end date for the vacation message |
void |
setStartDate(java.util.Calendar startDate)
sets the start date for the vacation message |
void |
setVacationMessage(java.lang.String vacationMessage)
sets the vacation message. |
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 VacationIQMessage(java.lang.String type)
public VacationIQMessage()
Method Detail |
---|
public static VacationIQMessage createRequestVacationMessage()
public static VacationIQMessage createSetVacationMessage(java.util.Calendar startDate, java.util.Calendar endDate, java.lang.String vacationMessage)
startDate
- the starting date, can be nullendDate
- the ending date, can be nullvacationMessage
- the vacation message, or null or empty if nonepublic static VacationIQMessage createRemoveVacationMessage()
public java.util.Calendar getStartDate()
public java.util.Calendar getEndDate()
public java.lang.String getVacationMessage()
public void setVacationMessage(java.lang.String vacationMessage)
public void setStartDate(java.util.Calendar startDate)
public void setEndDate(java.util.Calendar endDate)
public JabberMessage parse(JabberMessageParser parser, Element msgTree) throws ParseException
parse
in interface JabberMessageParsable
parse
in class AbstractJabberMessage
ParseException
public java.lang.String encode() throws ParseException
encode
in class JabberJDOMMessage
ParseException
- if something went wrong during encodingpublic int getMessageType()
JabberJDOMMessage
getMessageType
in class JabberIQMessage
JabberCode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |