Search in sources :

Example 1 with DistributionListMembershipInfo

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

the class SoapProvisioning method getDistributionLists.

@Override
public List<DistributionList> getDistributionLists(DistributionList list, boolean directOnly, Map<String, String> via) throws ServiceException {
    ArrayList<DistributionList> result = new ArrayList<DistributionList>();
    GetDistributionListMembershipRequest req = new GetDistributionListMembershipRequest(getSelector(list), null, null);
    GetDistributionListMembershipResponse resp = invokeJaxb(req);
    for (DistributionListMembershipInfo dlMemInfo : resp.getDls()) {
        String viaList = dlMemInfo.getVia();
        if (directOnly && viaList != null)
            continue;
        DistributionList dl = new SoapDistributionList(dlMemInfo, this);
        if (via != null && viaList != null) {
            via.put(dl.getName(), viaList);
        }
        result.add(dl);
    }
    return result;
}
Also used : DistributionListMembershipInfo(com.zimbra.soap.admin.type.DistributionListMembershipInfo) ArrayList(java.util.ArrayList) DistributionList(com.zimbra.cs.account.DistributionList)

Aggregations

DistributionList (com.zimbra.cs.account.DistributionList)1 DistributionListMembershipInfo (com.zimbra.soap.admin.type.DistributionListMembershipInfo)1 ArrayList (java.util.ArrayList)1