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());
}
Aggregations