Search in sources :

Example 1 with SubtreeDeleteRequestControl

use of com.unboundid.ldap.sdk.controls.SubtreeDeleteRequestControl in project oxCore by GluuFederation.

the class LdapOperationsServiceImpl method deleteWithSubtree.

/*
     * (non-Javadoc)
     *
     * @see org.gluu.site.ldap.PlatformOperationFacade#deleteWithSubtree(java.lang.
     * String)
     */
@Override
public void deleteWithSubtree(String dn) throws ConnectionException {
    try {
        final DeleteRequest deleteRequest = new DeleteRequest(dn);
        deleteRequest.addControl(new SubtreeDeleteRequestControl());
        getConnectionPool().delete(deleteRequest);
    } catch (Exception ex) {
        throw new ConnectionException("Failed to delete entry", ex);
    }
}
Also used : DeleteRequest(com.unboundid.ldap.sdk.DeleteRequest) SubtreeDeleteRequestControl(com.unboundid.ldap.sdk.controls.SubtreeDeleteRequestControl) InvalidSimplePageControlException(org.gluu.persist.ldap.exception.InvalidSimplePageControlException) ConnectionException(org.gluu.persist.exception.operation.ConnectionException) SearchException(org.gluu.persist.exception.operation.SearchException) LDAPSearchException(com.unboundid.ldap.sdk.LDAPSearchException) MappingException(org.gluu.persist.exception.mapping.MappingException) LDAPException(com.unboundid.ldap.sdk.LDAPException) DuplicateEntryException(org.gluu.persist.exception.operation.DuplicateEntryException) ConnectionException(org.gluu.persist.exception.operation.ConnectionException)

Aggregations

DeleteRequest (com.unboundid.ldap.sdk.DeleteRequest)1 LDAPException (com.unboundid.ldap.sdk.LDAPException)1 LDAPSearchException (com.unboundid.ldap.sdk.LDAPSearchException)1 SubtreeDeleteRequestControl (com.unboundid.ldap.sdk.controls.SubtreeDeleteRequestControl)1 MappingException (org.gluu.persist.exception.mapping.MappingException)1 ConnectionException (org.gluu.persist.exception.operation.ConnectionException)1 DuplicateEntryException (org.gluu.persist.exception.operation.DuplicateEntryException)1 SearchException (org.gluu.persist.exception.operation.SearchException)1 InvalidSimplePageControlException (org.gluu.persist.ldap.exception.InvalidSimplePageControlException)1