use of com.zimbra.common.soap.Element in project zm-mailbox by Zimbra.
the class ZSelectiveCallRejection method toElement.
void toElement(Element element) throws ServiceException {
super.toElement(element);
for (String name : mRejectFrom) {
Element fromEl = element.addElement(VoiceConstants.E_PHONE);
fromEl.addAttribute(VoiceConstants.A_PHONE_NUMBER, name);
fromEl.addAttribute(VoiceConstants.A_ACTIVE, "true");
}
}
use of com.zimbra.common.soap.Element in project zm-mailbox by Zimbra.
the class ZSelectiveCallRejection method fromElement.
synchronized void fromElement(Element element) throws ServiceException {
super.fromElement(element);
mRejectFrom = new ArrayList<String>();
for (Element fromEl : element.listElements(VoiceConstants.E_PHONE)) {
mRejectFrom.add(fromEl.getAttribute(VoiceConstants.A_PHONE_NUMBER));
}
}
use of com.zimbra.common.soap.Element in project zm-mailbox by Zimbra.
the class ZRssDataSource method toIdElement.
public Element toIdElement(Element parent) {
Element src = parent.addElement(MailConstants.E_DS_RSS);
src.addAttribute(MailConstants.A_ID, getId());
return src;
}
use of com.zimbra.common.soap.Element in project zm-mailbox by Zimbra.
the class ZAuthToken method fromSoap.
private void fromSoap(com.zimbra.common.soap.Element eAuthToken, boolean isAdmin) throws ServiceException {
mType = eAuthToken.getAttribute(isAdmin ? AdminConstants.A_TYPE : AccountConstants.A_TYPE, null);
mValue = eAuthToken.getText();
if (mValue.length() == 0)
mValue = null;
String eName = isAdmin ? AdminConstants.E_A : AccountConstants.E_A;
String aName = isAdmin ? AdminConstants.A_N : AccountConstants.A_N;
for (Element a : eAuthToken.listElements(eName)) {
String name = a.getAttribute(aName);
String value = a.getText();
if (mAttrs == null)
mAttrs = new HashMap<String, String>();
mAttrs.put(name, value);
}
}
use of com.zimbra.common.soap.Element in project zm-mailbox by Zimbra.
the class CalendarUtil method parseXParams.
public static List<ZParameter> parseXParams(Element element) throws ServiceException {
List<ZParameter> params = new ArrayList<ZParameter>();
for (Iterator<Element> paramIter = element.elementIterator(MailConstants.E_CAL_XPARAM); paramIter.hasNext(); ) {
Element paramElem = paramIter.next();
String paramName = paramElem.getAttribute(MailConstants.A_NAME);
String paramValue = paramElem.getAttribute(MailConstants.A_VALUE, null);
ZParameter xparam = new ZParameter(paramName, paramValue);
params.add(xparam);
}
return params;
}
Aggregations