|
||||||||||
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.msg.DataXMessage
public class DataXMessage
This extension adds the new form-based data submission and retrieval mechanism using the jabber:x:data namespace. The Data Gathering and Reporting interface may not be supported by all message types. As of the current implementation, the X message may be present in a chat message, a presence message, and an iq message. Certain rules are present for each type of message and requires that it conforms to the JEP standards (take a look at the JEP to know the limitations and restrictions). It is suggested that you read up on the JEP and know the details of working with this namespace before using it. Alot of the support requires developer support. The API is unable to make things easier for you in that way because of the data used in this message is for displaying results to the user.
Current implementation has a known issue. Under JEP specification, the search results/items can be sent back to the requester in multiple message chunks with the same message ID. However, in Muse's current implementation, if you set this message to listen for a reply and you send this message in a synchronized manner, the call will return upon receiving the first message result and ignore the rest of the result messages. In order to workaround this issue, you should not send this message synchronously if you are submitting a search request that will return results. Rather, you should specifically create a listener that will listen for the incoming messages and combine all the incoming result messages of the same Message ID to form your total results.
Current Implementation: JEP-0004 Version 2.1
DataXField
,
DataXOption
Field Summary | |
---|---|
static java.lang.String |
EMPTY_STRING
|
static java.lang.String |
TYPE_CANCEL
|
static java.lang.String |
TYPE_FORM
|
static java.lang.String |
TYPE_RESULT
|
static java.lang.String |
TYPE_SUBMIT
|
Fields inherited from class com.echomine.jabber.JabberMessage |
---|
messageID |
Constructor Summary | |
---|---|
DataXMessage()
constructs a default message of type submit |
|
DataXMessage(java.lang.String formType)
constructs a default message of the type specified |
Method Summary | |
---|---|
void |
addField(DataXField field)
adds a field to the field list |
void |
addItemField(DataXField field)
adds a field to the item field list |
void |
addReportedField(DataXField field)
adds a field to the reported field list |
java.lang.String |
encode()
The default encoding will serialize the DOM Tree. |
java.util.List |
getFields()
retrieves the list of fields from the message. |
java.lang.String |
getFormType()
Retrieves the form type for the data. |
java.lang.String |
getInstructions()
|
java.util.List |
getItemFields()
retrieves the list of result items from the message. |
int |
getMessageType()
the default message type is unknown. |
java.util.List |
getReportedFields()
retrieves the list of reported fields from the message. |
java.lang.String |
getTitle()
retrieves the optional title that goes along with the form |
JabberMessage |
parse(JabberMessageParser parser,
Element msgTree)
parses the incoming data |
void |
setFormType(java.lang.String formType)
sets the form type to one of the types as presented by the constants in this class. |
void |
setInstructions(java.lang.String instructions)
sets the instructions to fill out the form, null to set it as non-existent. |
void |
setTitle(java.lang.String title)
sets the form title to the title specified. |
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 |
Field Detail |
---|
public static final java.lang.String TYPE_SUBMIT
public static final java.lang.String TYPE_CANCEL
public static final java.lang.String TYPE_RESULT
public static final java.lang.String TYPE_FORM
public static final java.lang.String EMPTY_STRING
Constructor Detail |
---|
public DataXMessage()
public DataXMessage(java.lang.String formType)
Method Detail |
---|
public java.lang.String getFormType()
public void setFormType(java.lang.String formType)
formType
- the form typepublic java.lang.String getInstructions()
public void setInstructions(java.lang.String instructions)
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- the form titlepublic java.util.List getFields()
public java.util.List getReportedFields()
public java.util.List getItemFields()
public void addField(DataXField field)
public void addReportedField(DataXField field)
public void addItemField(DataXField field)
public int getMessageType()
JabberJDOMMessage
getMessageType
in class JabberJDOMMessage
JabberCode
public JabberMessage parse(JabberMessageParser parser, Element msgTree) throws ParseException
parse
in interface JabberMessageParsable
parse
in class JabberJDOMMessage
ParseException
public java.lang.String encode() throws ParseException
JabberJDOMMessage
encode
in class JabberJDOMMessage
ParseException
- if something went wrong during encoding
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |