mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Gaetan Boismal
19.56.2014 d94f6d23898f7515e969517f85b8e626667a1e02
opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagedObject.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2007-2009 Sun Microsystems, Inc.
 *      Portions copyright 2014 ForgeRock AS.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.forgerock.opendj.config.client.ldap;
@@ -56,7 +56,7 @@
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.Entry;
import org.forgerock.opendj.ldap.ErrorResultException;
import org.forgerock.opendj.ldap.LdapException;
import org.forgerock.opendj.ldap.LinkedAttribute;
import org.forgerock.opendj.ldap.LinkedHashMapEntry;
import org.forgerock.opendj.ldap.ModificationType;
@@ -135,7 +135,7 @@
     * {@inheritDoc}
     */
    @Override
    protected void addNewManagedObject() throws ErrorResultException, OperationRejectedException,
    protected void addNewManagedObject() throws LdapException, OperationRejectedException,
            ConcurrentModificationException, ManagedObjectAlreadyExistsException {
        // First make sure that the parent managed object still exists.
        ManagedObjectDefinition<?, ?> d = getManagedObjectDefinition();
@@ -180,7 +180,7 @@
                // Create the entry.
                try {
                    driver.getLDAPConnection().add(entry);
                } catch (ErrorResultException e) {
                } catch (LdapException e) {
                    if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
                        LocalizableMessage m = LocalizableMessage.raw("%s", e.getLocalizedMessage());
                        throw new OperationRejectedException(OperationType.CREATE, d.getUserFriendlyName(), m);
@@ -219,7 +219,7 @@
        try {
            // Create the entry.
            driver.getLDAPConnection().add(entry);
        } catch (ErrorResultException e) {
        } catch (LdapException e) {
            if (e.getResult().getResultCode() == ResultCode.ENTRY_ALREADY_EXISTS) {
                throw new ManagedObjectAlreadyExistsException();
            } else if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
@@ -252,7 +252,7 @@
     */
    @Override
    protected void modifyExistingManagedObject() throws ConcurrentModificationException, OperationRejectedException,
            ErrorResultException {
            LdapException {
        // Build the modify request
        ManagedObjectPath<?, ?> path = getManagedObjectPath();
        DN dn = DNBuilder.create(path, driver.getLDAPProfile());
@@ -273,7 +273,7 @@
        if (!request.getModifications().isEmpty()) {
            try {
                driver.getLDAPConnection().modify(request);
            } catch (ErrorResultException e) {
            } catch (LdapException e) {
                if (e.getResult().getResultCode() == ResultCode.UNWILLING_TO_PERFORM) {
                    LocalizableMessage m = LocalizableMessage.raw("%s", e.getLocalizedMessage());
                    throw new OperationRejectedException(OperationType.MODIFY, d.getUserFriendlyName(), m);