class AttributesServiceImpl implements AttributesService {

    public void deleteAttributes(RecipientIdentity holder, Set<String> names) throws ErrorDescriptorException {
        Object attributeHolder = recipientIdentityResolver.resolveRecipientObject(holder);

        @SuppressWarnings("unchecked")
        AttributesSearchCriteria searchCriteria = new AttributesSearchCriteria.Builder().
                setNames(names).
                setSkipServerSettings(true).build();

        AttributesSearchResult<ProfileAttribute> searchResult = profileAttributeService.
                getProfileAttributesForPrincipal(null, attributeHolder, searchCriteria);

        for (ProfileAttribute attr : searchResult.getList()) {
            try {
                profileAttributeService.deleteProfileAttribute(null, attr);
            } catch (AccessDeniedException ex) {
                throw new com.jaspersoft.jasperserver.remote.exception.AccessDeniedException("Access denied for attribute ",
                        attr.getAttrName());
            }
        }
    }

}