Search in sources :

Example 6 with DeleteDistributionListRequest

use of com.zimbra.soap.admin.message.DeleteDistributionListRequest in project zm-mailbox by Zimbra.

the class DeleteDistributionList method handle.

@Override
public Element handle(Element request, Map<String, Object> context) throws ServiceException {
    ZimbraSoapContext zsc = getZimbraSoapContext(context);
    Provisioning prov = Provisioning.getInstance();
    DeleteDistributionListRequest req = JaxbUtil.elementToJaxb(request);
    Group group = getGroupFromContext(context);
    String id = req.getId();
    defendAgainstGroupHarvesting(group, DistributionListBy.id, id, zsc, Admin.R_deleteGroup, Admin.R_deleteDistributionList);
    prov.deleteGroup(group.getId());
    ZimbraLog.security.info(ZimbraLog.encodeAttrs(new String[] { "cmd", "DeleteDistributionList", "name", group.getName(), "id", group.getId() }));
    return zsc.jaxbToElement(new DeleteDistributionListResponse());
}
Also used : Group(com.zimbra.cs.account.Group) ZimbraSoapContext(com.zimbra.soap.ZimbraSoapContext) DeleteDistributionListRequest(com.zimbra.soap.admin.message.DeleteDistributionListRequest) DeleteDistributionListResponse(com.zimbra.soap.admin.message.DeleteDistributionListResponse) Provisioning(com.zimbra.cs.account.Provisioning)

Aggregations

DeleteDistributionListRequest (com.zimbra.soap.admin.message.DeleteDistributionListRequest)6 DeleteDistributionListResponse (com.zimbra.soap.admin.message.DeleteDistributionListResponse)5 Test (org.junit.Test)5 SoapFaultException (com.zimbra.common.soap.SoapFaultException)4 SoapProvisioning (com.zimbra.cs.account.soap.SoapProvisioning)4 CreateDistributionListRequest (com.zimbra.soap.admin.message.CreateDistributionListRequest)4 CreateDistributionListResponse (com.zimbra.soap.admin.message.CreateDistributionListResponse)4 AddDistributionListAliasRequest (com.zimbra.soap.admin.message.AddDistributionListAliasRequest)3 AddDistributionListAliasResponse (com.zimbra.soap.admin.message.AddDistributionListAliasResponse)3 ModifyDistributionListRequest (com.zimbra.soap.admin.message.ModifyDistributionListRequest)3 RemoveDistributionListAliasRequest (com.zimbra.soap.admin.message.RemoveDistributionListAliasRequest)3 Group (com.zimbra.cs.account.Group)2 GetDistributionListRequest (com.zimbra.soap.admin.message.GetDistributionListRequest)2 ModifyDistributionListResponse (com.zimbra.soap.admin.message.ModifyDistributionListResponse)2 RemoveDistributionListAliasResponse (com.zimbra.soap.admin.message.RemoveDistributionListAliasResponse)2 RenameDistributionListRequest (com.zimbra.soap.admin.message.RenameDistributionListRequest)2 Attr (com.zimbra.soap.admin.type.Attr)2 SoapTransport (com.zimbra.common.soap.SoapTransport)1 Provisioning (com.zimbra.cs.account.Provisioning)1 Bug (com.zimbra.qa.QA.Bug)1