Search in sources :

Example 1 with AccountLoggerInfo

use of com.zimbra.soap.admin.type.AccountLoggerInfo in project zm-mailbox by Zimbra.

the class SoapProvisioning method getAllAccountLoggers.

/**
 * Returns all account loggers for the given server.  The <tt>Map</tt>'s key is
 * the account name, and values are all the <tt>AccountLogger</tt> objects for
 * that account.
 *
 * @server the server name, or <tt>null</tt> for the local server
 */
public Map<String, List<AccountLogger>> getAllAccountLoggers(String server) throws ServiceException {
    if (server == null) {
        server = getLocalServer().getName();
    }
    GetAllAccountLoggersResponse resp = invokeJaxb(new GetAllAccountLoggersRequest(), server);
    Map<String, List<AccountLogger>> result = new HashMap<String, List<AccountLogger>>();
    for (AccountLoggerInfo acctLogger : resp.getLoggers()) {
        String acctName = acctLogger.getName();
        result.put(acctName, accountLoggersFromLoggerInfos(acctLogger.getLoggers(), acctName));
    }
    return result;
}
Also used : GetAllAccountLoggersRequest(com.zimbra.soap.admin.message.GetAllAccountLoggersRequest) HashMap(java.util.HashMap) AccountLogger(com.zimbra.common.util.AccountLogger) AccountLoggerInfo(com.zimbra.soap.admin.type.AccountLoggerInfo) GetAllAccountLoggersResponse(com.zimbra.soap.admin.message.GetAllAccountLoggersResponse) ArrayList(java.util.ArrayList) List(java.util.List) DistributionList(com.zimbra.cs.account.DistributionList)

Aggregations

AccountLogger (com.zimbra.common.util.AccountLogger)1 DistributionList (com.zimbra.cs.account.DistributionList)1 GetAllAccountLoggersRequest (com.zimbra.soap.admin.message.GetAllAccountLoggersRequest)1 GetAllAccountLoggersResponse (com.zimbra.soap.admin.message.GetAllAccountLoggersResponse)1 AccountLoggerInfo (com.zimbra.soap.admin.type.AccountLoggerInfo)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1