Example usage for org.dom4j DocumentHelper createElement

List of usage examples for org.dom4j DocumentHelper createElement

Introduction

In this page you can find the example usage for org.dom4j DocumentHelper createElement.

Prototype

public static Element createElement(String name) 

Source Link

Usage

From source file:com.zimbra.cs.client.soap.LmcGetInfoRequest.java

License:Open Source License

protected Element getRequestXML() {
    Element request = DocumentHelper.createElement(AccountConstants.GET_INFO_REQUEST);
    return request;
}

From source file:com.zimbra.cs.client.soap.LmcGetMsgRequest.java

License:Open Source License

protected Element getRequestXML() {
    Element request = DocumentHelper.createElement(MailConstants.GET_MSG_REQUEST);
    Element m = DomUtil.add(request, MailConstants.E_MSG, "");
    DomUtil.addAttr(m, MailConstants.A_ID, mMsgID);
    addAttrNotNull(m, MailConstants.A_MARK_READ, mRead);
    return request;
}

From source file:com.zimbra.cs.client.soap.LmcGetNoteRequest.java

License:Open Source License

protected Element getRequestXML() {
    Element request = DocumentHelper.createElement(MailConstants.GET_NOTE_REQUEST);
    Element note = DomUtil.add(request, MailConstants.E_NOTE, "");
    DomUtil.addAttr(note, MailConstants.A_ID, mNoteToGet);
    return request;
}

From source file:com.zimbra.cs.client.soap.LmcGetPrefsRequest.java

License:Open Source License

protected Element getRequestXML() {
    Element request = DocumentHelper.createElement(AccountConstants.GET_PREFS_REQUEST);
    if (mPrefsToGet != null) {
        for (int i = 0; i < mPrefsToGet.length; i++) {
            Element pe = DomUtil.add(request, AccountConstants.E_PREF, "");
            DomUtil.addAttr(pe, AccountConstants.A_NAME, mPrefsToGet[i]);
        }//  w ww  .  ja v  a2 s.co m
    }
    return request;
}

From source file:com.zimbra.cs.client.soap.LmcGetTagRequest.java

License:Open Source License

protected Element getRequestXML() {
    Element request = DocumentHelper.createElement(MailConstants.GET_TAG_REQUEST);
    return request;
}

From source file:com.zimbra.cs.client.soap.LmcItemActionRequest.java

License:Open Source License

protected Element getRequestXML() {
    Element request = DocumentHelper.createElement(MailConstants.ITEM_ACTION_REQUEST);
    Element a = DomUtil.add(request, MailConstants.E_ACTION, "");
    DomUtil.addAttr(a, MailConstants.A_ID, mIDList);
    DomUtil.addAttr(a, MailConstants.A_OPERATION, mOp);
    DomUtil.addAttr(a, MailConstants.A_TAG, mTag);
    DomUtil.addAttr(a, MailConstants.A_FOLDER, mFolder);
    return request;
}

From source file:com.zimbra.cs.client.soap.LmcModifyPrefsRequest.java

License:Open Source License

protected Element getRequestXML() {
    Element request = DocumentHelper.createElement(AccountConstants.MODIFY_PREFS_REQUEST);

    Set s = mPrefMods.entrySet();
    Iterator i = s.iterator();//  www.  j  a va2 s. co  m
    while (i.hasNext()) {
        Map.Entry entry = (Map.Entry) i.next();
        Element pe = DomUtil.add(request, AccountConstants.E_PREF, (String) entry.getValue());
        DomUtil.addAttr(pe, AccountConstants.A_NAME, (String) entry.getKey());
    }

    return request;
}

From source file:com.zimbra.cs.client.soap.LmcMsgActionRequest.java

License:Open Source License

protected Element getRequestXML() {
    Element request = DocumentHelper.createElement(MailConstants.MSG_ACTION_REQUEST);
    Element a = DomUtil.add(request, MailConstants.E_ACTION, "");
    DomUtil.addAttr(a, MailConstants.A_ID, mIDList);
    DomUtil.addAttr(a, MailConstants.A_OPERATION, mOp);
    DomUtil.addAttr(a, MailConstants.A_TAG, mTag);
    DomUtil.addAttr(a, MailConstants.A_FOLDER, mFolder);
    return request;
}

From source file:com.zimbra.cs.client.soap.LmcNoOpRequest.java

License:Open Source License

protected Element getRequestXML() throws LmcSoapClientException {
    Element request = DocumentHelper.createElement(MailConstants.NO_OP_REQUEST);
    return request;
}

From source file:com.zimbra.cs.client.soap.LmcNoteActionRequest.java

License:Open Source License

protected Element getRequestXML() {
    Element request = DocumentHelper.createElement(MailConstants.NOTE_ACTION_REQUEST);
    Element a = DomUtil.add(request, MailConstants.E_ACTION, "");
    DomUtil.addAttr(a, MailConstants.A_ID, mIDList);
    DomUtil.addAttr(a, MailConstants.A_OPERATION, mOp);
    DomUtil.addAttr(a, MailConstants.A_TAG, mTag);
    DomUtil.addAttr(a, MailConstants.A_FOLDER, mTargetFolder);
    DomUtil.addAttr(a, MailConstants.A_COLOR, mColor);
    return request;
}