Methods Summary |
---|
public PrimitiveElement | addElement(java.lang.String tag)
return mContentElement.addChild(tag);
|
public void | addElement(java.lang.String tag, java.lang.String value)
mContentElement.addChild(tag, value);
|
public void | addElement(java.lang.String tag, boolean value)
mContentElement.addChild(tag, value);
|
public void | addElement(PrimitiveElement elem)
mContentElement.addChild(elem);
|
PrimitiveElement | createMessage(java.lang.String versionUri, java.lang.String transactUri)
PrimitiveElement root = new PrimitiveElement(ImpsTags.WV_CSP_Message);
root.setAttribute(ImpsTags.XMLNS, versionUri);
PrimitiveElement sessionElem = root.addChild(ImpsTags.Session);
PrimitiveElement sessionDescElem = sessionElem.addChild(
ImpsTags.SessionDescriptor);
sessionDescElem.addChild(ImpsTags.SessionType,
getSessionType().toString());
if (getSessionId() != null) {
sessionDescElem.addChild(ImpsTags.SessionID, getSessionId());
}
PrimitiveElement transElem = sessionElem.addChild(ImpsTags.Transaction);
PrimitiveElement transDescElem = transElem.addChild(
ImpsTags.TransactionDescriptor);
transDescElem.addChild(ImpsTags.TransactionMode,
getTransactionMode().toString());
if (getTransactionID() != null) {
transDescElem.addChild(ImpsTags.TransactionID, getTransactionID());
}
PrimitiveElement transContentElem = transElem.addChild(
ImpsTags.TransactionContent);
transContentElem.setAttribute(ImpsTags.XMLNS, transactUri);
transContentElem.addChild(getContentElement());
return root;
|
public java.lang.String | getCir()
return mCir;
|
public PrimitiveElement | getContentElement()
return mContentElement;
|
public PrimitiveElement | getElement(java.lang.String tag)
return mContentElement.getChild(tag);
|
public java.lang.String | getElementContents(java.lang.String tag)
PrimitiveElement elem = getElement(tag);
return elem == null ? null : elem.getContents();
|
public java.lang.String | getPoll()
return mPoll;
|
public java.lang.String | getSessionId()Gets the session ID of this primitive.
return mSessionId;
|
public com.android.im.imps.Primitive$SessionType | getSessionType()Gets the session type of this primitive.
return mSessionId == null ? SessionType.Outband : SessionType.Inband;
|
public java.lang.String | getTransactionID()Gets the transaction ID of this primitive.
return mTransactionId;
|
public com.android.im.imps.Primitive$TransactionMode | getTransactionMode()Gets the transaction mode of this primitive.
return mTransactionMode;
|
public java.lang.String | getType()
return (mContentElement == null) ? null : mContentElement.getTagName();
|
public void | setCir(java.lang.String cir)
this.mCir = cir;
|
public void | setContentElement(java.lang.String type)
mContentElement = new PrimitiveElement(type);
|
public void | setPoll(java.lang.String poll)
this.mPoll = poll;
|
public void | setSession(java.lang.String sessionId)Sets the session ID of this primitive.
this.mSessionId = sessionId;
|
public void | setTransaction(ImpsTransaction transaction)
this.mTransactionId = transaction.getId();
|
public void | setTransactionId(java.lang.String transId)Sets the transaction ID of this primitive.
this.mTransactionId = transId;
|
public void | setTransactionMode(com.android.im.imps.Primitive$TransactionMode mode)Sets the transaction mode of this primitive.
this.mTransactionMode = mode;
|