001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016package org.forgerock.opendj.server.config.client;
017
018
019
020import org.forgerock.opendj.config.ConfigurationClient;
021import org.forgerock.opendj.config.ManagedObjectDefinition;
022import org.forgerock.opendj.config.PropertyException;
023import org.forgerock.opendj.server.config.server.AccessControlHandlerCfg;
024
025
026
027/**
028 * A client-side interface for reading and modifying Access Control
029 * Handler settings.
030 * <p>
031 * Access Control Handlers manage the application-wide access control.
032 * The OpenDJ access control handler is defined through an extensible
033 * interface, so that alternate implementations can be created. Only
034 * one access control handler may be active in the server at any given
035 * time.
036 */
037public interface AccessControlHandlerCfgClient extends ConfigurationClient {
038
039  /**
040   * Get the configuration definition associated with this Access Control Handler.
041   *
042   * @return Returns the configuration definition associated with this Access Control Handler.
043   */
044  ManagedObjectDefinition<? extends AccessControlHandlerCfgClient, ? extends AccessControlHandlerCfg> definition();
045
046
047
048  /**
049   * Gets the "enabled" property.
050   * <p>
051   * Indicates whether the Access Control Handler is enabled. If set
052   * to FALSE, then no access control is enforced, and any client
053   * (including unauthenticated or anonymous clients) could be allowed
054   * to perform any operation if not subject to other restrictions,
055   * such as those enforced by the privilege subsystem.
056   *
057   * @return Returns the value of the "enabled" property.
058   */
059  Boolean isEnabled();
060
061
062
063  /**
064   * Sets the "enabled" property.
065   * <p>
066   * Indicates whether the Access Control Handler is enabled. If set
067   * to FALSE, then no access control is enforced, and any client
068   * (including unauthenticated or anonymous clients) could be allowed
069   * to perform any operation if not subject to other restrictions,
070   * such as those enforced by the privilege subsystem.
071   *
072   * @param value The value of the "enabled" property.
073   * @throws PropertyException
074   *           If the new value is invalid.
075   */
076  void setEnabled(boolean value) throws PropertyException;
077
078
079
080  /**
081   * Gets the "java-class" property.
082   * <p>
083   * Specifies the fully-qualified name of the Java class that
084   * provides the Access Control Handler implementation.
085   *
086   * @return Returns the value of the "java-class" property.
087   */
088  String getJavaClass();
089
090
091
092  /**
093   * Sets the "java-class" property.
094   * <p>
095   * Specifies the fully-qualified name of the Java class that
096   * provides the Access Control Handler implementation.
097   *
098   * @param value The value of the "java-class" property.
099   * @throws PropertyException
100   *           If the new value is invalid.
101   */
102  void setJavaClass(String value) throws PropertyException;
103
104}