use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class SoapProvisioning method getMemcachedClientConfig.
public MemcachedClientConfig getMemcachedClientConfig() throws ServiceException {
XMLElement req = new XMLElement(AdminConstants.GET_MEMCACHED_CLIENT_CONFIG_REQUEST);
Element resp = invoke(req);
MemcachedClientConfig config = new MemcachedClientConfig();
config.serverList = resp.getAttribute(AdminConstants.A_MEMCACHED_CLIENT_CONFIG_SERVER_LIST, null);
config.hashAlgorithm = resp.getAttribute(AdminConstants.A_MEMCACHED_CLIENT_CONFIG_HASH_ALGORITHM, null);
config.binaryProtocol = resp.getAttributeBool(AdminConstants.A_MEMCACHED_CLIENT_CONFIG_BINARY_PROTOCOL, false);
config.defaultExpirySeconds = (int) resp.getAttributeLong(AdminConstants.A_MEMCACHED_CLIENT_CONFIG_DEFAULT_EXPIRY_SECONDS, 0);
config.defaultTimeoutMillis = resp.getAttributeLong(AdminConstants.A_MEMCACHED_CLIENT_CONFIG_DEFAULT_TIMEOUT_MILLIS, 0);
return config;
}
use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class SoapProvisioning method modifyDataSource.
@Override
public void modifyDataSource(Account account, String dataSourceId, Map<String, Object> attrs) throws ServiceException {
XMLElement req = new XMLElement(AdminConstants.MODIFY_DATA_SOURCE_REQUEST);
req.addElement(AdminConstants.E_ID).setText(account.getId());
Element ds = req.addElement(AccountConstants.E_DATA_SOURCE);
ds.addAttribute(AccountConstants.A_ID, dataSourceId);
addAttrElements(ds, attrs);
invoke(req);
}
use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class SoapProvisioning method getHab.
/**
* @param rootHabGroupId the group for which HAB is required
* @return GetHabResponse object
* @throws ServiceException if an error occurs while fetching hierarchy from ldap
*/
public Element getHab(String rootHabGroupId) throws ServiceException {
XMLElement req = new XMLElement(AccountConstants.GET_HAB_REQUEST);
req.addAttribute(AccountConstants.A_HAB_ROOT_GROUP_ID, rootHabGroupId);
Element resp = invoke(req);
return resp;
}
use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class SoapProvisioning method deleteDataSource.
@Override
public void deleteDataSource(Account account, String dataSourceId) throws ServiceException {
XMLElement req = new XMLElement(AdminConstants.DELETE_DATA_SOURCE_REQUEST);
req.addElement(AdminConstants.E_ID).setText(account.getId());
Element ds = req.addElement(AccountConstants.E_DATA_SOURCE);
ds.addAttribute(AccountConstants.A_ID, dataSourceId);
invoke(req);
}
use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.
the class TestAccess method ModifyDataSource.
public void ModifyDataSource(Role role, Perm perm) throws Exception {
String dateSourceName = "datasource-modify-" + random();
DataSource ds = mProvAdmin.setup_createDataSource(this, role, perm, ACCT_1_EMAIL, dateSourceName);
XMLElement req = new XMLElement(MailConstants.MODIFY_DATA_SOURCE_REQUEST);
Element dataSource = req.addElement(MailConstants.E_DS_POP3);
dataSource.addAttribute(MailConstants.A_ID, ds.getId());
dataSource.addAttribute(MailConstants.A_DS_IS_ENABLED, "false");
accessTest(role, perm, req);
}
Aggregations