use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class SoapProvisioning method modifyDomainSMIMEConfig.
@Override
public void modifyDomainSMIMEConfig(Domain domain, String configName, Map<String, Object> attrs) throws ServiceException {
XMLElement req = new XMLElement(AdminConstants.MODIFY_SMIME_CONFIG_REQUEST);
Element eDomain = req.addElement(AdminConstants.E_DOMAIN);
eDomain.addAttribute(AdminConstants.A_BY, AdminConstants.BY_ID).setText(domain.getId());
Element eConfig = req.addElement(AdminConstants.E_CONFIG);
eConfig.addAttribute(AdminConstants.A_NAME, configName);
eConfig.addAttribute(AdminConstants.A_OP, AdminConstants.OP_MODIFY);
addAttrElements(eConfig, attrs);
invoke(req);
}
use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class SoapProvisioning method grantRight.
@Override
public void grantRight(String targetType, TargetBy targetBy, String target, String granteeType, GranteeBy granteeBy, String grantee, String secret, String right, RightModifier rightModifier) throws ServiceException {
XMLElement req = new XMLElement(AdminConstants.GRANT_RIGHT_REQUEST);
toXML(req, targetType, targetBy, target);
toXML(req, granteeType, granteeBy, grantee, secret);
toXML(req, right, rightModifier);
invoke(req);
}
use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class SoapProvisioning method deleteSignature.
@Override
public void deleteSignature(Account account, String signatureId) throws ServiceException {
XMLElement req = new XMLElement(AccountConstants.DELETE_SIGNATURE_REQUEST);
Element signature = req.addElement(AccountConstants.E_SIGNATURE);
signature.addAttribute(AccountConstants.A_ID, signatureId);
invokeOnTargetAccount(req, account.getId());
}
use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class SoapDistributionList method reload.
public void reload(SoapProvisioning prov) throws ServiceException {
XMLElement req = new XMLElement(AdminConstants.GET_DISTRIBUTION_LIST_REQUEST);
Element a = req.addElement(AdminConstants.E_DL);
a.setText(getId());
a.addAttribute(AdminConstants.A_BY, Key.DistributionListBy.id.name());
Element dl = prov.invoke(req).getElement(AdminConstants.E_DL);
Map<String, Object> attrs = SoapProvisioning.getAttrs(dl);
addDlm(dl, attrs);
setAttrs(attrs);
}
use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class SoapDistributionList method modifyAttrs.
public void modifyAttrs(SoapProvisioning prov, Map<String, ? extends Object> attrs, boolean checkImmutable) throws ServiceException {
XMLElement req = new XMLElement(AdminConstants.MODIFY_DISTRIBUTION_LIST_REQUEST);
req.addElement(AdminConstants.E_ID).setText(getId());
SoapProvisioning.addAttrElements(req, attrs);
Element dl = prov.invoke(req).getElement(AdminConstants.E_DL);
Map<String, Object> newAttrs = SoapProvisioning.getAttrs(dl);
addDlm(dl, newAttrs);
setAttrs(newAttrs);
}
Aggregations