Search in sources :

Example 1 with ChangePasswordResponse

use of com.zimbra.soap.account.message.ChangePasswordResponse in project zm-mailbox by Zimbra.

the class ZMailbox method changePassword.

private ZChangePasswordResult changePassword(String key, AccountBy by, String oldPassword, String newPassword, String virtualHost) throws ServiceException {
    if (mTransport == null) {
        throw ZClientException.CLIENT_ERROR("must call setURI before calling changePassword", null);
    }
    AccountSelector account = new AccountSelector(SoapConverter.TO_SOAP_ACCOUNT_BY.apply(by), key);
    ChangePasswordRequest req = new ChangePasswordRequest(account, oldPassword, newPassword);
    req.setVirtualHost(virtualHost);
    ChangePasswordResponse res = invokeJaxb(req);
    return new ZChangePasswordResult(res);
}
Also used : AccountSelector(com.zimbra.soap.type.AccountSelector) ChangePasswordResponse(com.zimbra.soap.account.message.ChangePasswordResponse) ChangePasswordRequest(com.zimbra.soap.account.message.ChangePasswordRequest)

Aggregations

ChangePasswordRequest (com.zimbra.soap.account.message.ChangePasswordRequest)1 ChangePasswordResponse (com.zimbra.soap.account.message.ChangePasswordResponse)1 AccountSelector (com.zimbra.soap.type.AccountSelector)1