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

matthew_swift
03.33.2007 a8eb24ede6506e89a7a8b9478aea003490d7eaba
opendj-sdk/opends/src/server/org/opends/server/admin/client/ldap/LDAPManagedObject.java
@@ -40,6 +40,7 @@
import javax.naming.ldap.LdapName;
import javax.naming.ldap.Rdn;
import org.opends.messages.Message;
import org.opends.server.admin.Configuration;
import org.opends.server.admin.ConfigurationClient;
import org.opends.server.admin.InstantiableRelationDefinition;
@@ -59,8 +60,6 @@
import org.opends.server.admin.client.spi.Driver;
import org.opends.server.admin.client.spi.Property;
import org.opends.server.admin.client.spi.PropertySet;
import org.opends.server.admin.std.client.RootCfgClient;
import org.opends.server.admin.std.meta.RootCfgDefn;
@@ -74,22 +73,6 @@
final class LDAPManagedObject<T extends ConfigurationClient> extends
    AbstractManagedObject<T> {
  /**
   * Constructs a root LDAP managed object associated with the
   * provided LDAP driver.
   *
   * @param driver
   *          The LDAP management driver.
   * @return Returns a root LDAP managed object associated with the
   *         provided LDAP driver.
   */
  static ManagedObject<RootCfgClient> getRootManagedObject(
      LDAPDriver driver) {
    return new LDAPManagedObject<RootCfgClient>(driver, RootCfgDefn
        .getInstance(), ManagedObjectPath.emptyPath(), new PropertySet(), true,
        null);
  }
  // The LDAP management driver associated with this managed object.
  private final LDAPDriver driver;
@@ -176,7 +159,12 @@
          driver.getLDAPConnection().createEntry(dn, attributes);
        } catch (OperationNotSupportedException e) {
          // Unwilling to perform.
          throw new OperationRejectedException(e);
          if (e.getMessage() != null) {
            throw new OperationRejectedException();
          } else {
            Message m = Message.raw("%s", e.getMessage());
            throw new OperationRejectedException(m);
          }
        } catch (NamingException e) {
          driver.adaptNamingException(e);
        }
@@ -220,7 +208,12 @@
      throw new ManagedObjectAlreadyExistsException();
    } catch (OperationNotSupportedException e) {
      // Unwilling to perform.
      throw new OperationRejectedException(e);
      if (e.getMessage() != null) {
        throw new OperationRejectedException();
      } else {
        Message m = Message.raw("%s", e.getMessage());
        throw new OperationRejectedException(m);
      }
    } catch (NamingException e) {
      driver.adaptNamingException(e);
    }
@@ -269,7 +262,12 @@
        throw new AuthorizationException(e);
      } catch (OperationNotSupportedException e) {
        // Unwilling to perform.
        throw new OperationRejectedException(e);
        if (e.getMessage() != null) {
          throw new OperationRejectedException();
        } else {
          Message m = Message.raw("%s", e.getMessage());
          throw new OperationRejectedException(m);
        }
      } catch (NamingException e) {
        // Just treat it as a communication problem.
        throw new CommunicationException(e);