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

Jean-Noel Rouvignac
24.41.2015 e7cac727a9231ff3602e61a4ea678e0463eb0e39
opendj-server-legacy/src/main/java/org/opends/server/admin/GenericConstraint.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.server.admin;
@@ -57,16 +57,14 @@
   */
  private class ClientHandler extends ClientConstraintHandler {
    // Private constructor.
    /** Private constructor. */
    private ClientHandler() {
      // No implementation required.
    }
    /**
     * {@inheritDoc}
     */
    /** {@inheritDoc} */
    @Override
    public boolean isAddAcceptable(ManagementContext context,
        ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons)
@@ -81,9 +79,7 @@
    /**
     * {@inheritDoc}
     */
    /** {@inheritDoc} */
    @Override
    public boolean isModifyAcceptable(ManagementContext context,
        ManagedObject<?> managedObject, Collection<LocalizableMessage> unacceptableReasons)
@@ -105,16 +101,14 @@
   */
  private class ServerHandler extends ServerConstraintHandler {
    // Private constructor.
    /** Private constructor. */
    private ServerHandler() {
      // No implementation required.
    }
    /**
     * {@inheritDoc}
     */
    /** {@inheritDoc} */
    @Override
    public boolean isUsable(ServerManagedObject<?> managedObject,
        Collection<LocalizableMessage> unacceptableReasons) throws ConfigException {
@@ -128,19 +122,19 @@
  };
  // The client-side constraint handler.
  /** The client-side constraint handler. */
  private final ClientConstraintHandler clientHandler = new ClientHandler();
  // The condition associated with this constraint.
  /** The condition associated with this constraint. */
  private final Condition condition;
  // The managed object definition associated with this constraint.
  /** The managed object definition associated with this constraint. */
  private final AbstractManagedObjectDefinition<?, ?> definition;
  // The constraint ID.
  /** The constraint ID. */
  private final int id;
  // The server-side constraint handler.
  /** The server-side constraint handler. */
  private final ServerConstraintHandler serverHandler = new ServerHandler();
@@ -165,18 +159,14 @@
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public Collection<ClientConstraintHandler> getClientConstraintHandlers() {
    return Collections.singleton(clientHandler);
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public Collection<ServerConstraintHandler> getServerConstraintHandlers() {
    return Collections.singleton(serverHandler);
  }
@@ -212,9 +202,7 @@
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  protected void initialize() throws Exception {
    condition.initialize(definition);