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.server;
017
018
019
020import org.forgerock.opendj.config.Configuration;
021import org.forgerock.opendj.config.server.ConfigurationChangeListener;
022
023
024
025/**
026 * A server-side interface for querying Access Control Handler
027 * settings.
028 * <p>
029 * Access Control Handlers manage the application-wide access control.
030 * The OpenDJ access control handler is defined through an extensible
031 * interface, so that alternate implementations can be created. Only
032 * one access control handler may be active in the server at any given
033 * time.
034 */
035public interface AccessControlHandlerCfg extends Configuration {
036
037  /**
038   * Gets the configuration class associated with this Access Control Handler.
039   *
040   * @return Returns the configuration class associated with this Access Control Handler.
041   */
042  Class<? extends AccessControlHandlerCfg> configurationClass();
043
044
045
046  /**
047   * Register to be notified when this Access Control Handler is changed.
048   *
049   * @param listener
050   *          The Access Control Handler configuration change listener.
051   */
052  void addChangeListener(ConfigurationChangeListener<AccessControlHandlerCfg> listener);
053
054
055
056  /**
057   * Deregister an existing Access Control Handler configuration change listener.
058   *
059   * @param listener
060   *          The Access Control Handler configuration change listener.
061   */
062  void removeChangeListener(ConfigurationChangeListener<AccessControlHandlerCfg> listener);
063
064
065
066  /**
067   * Gets the "enabled" property.
068   * <p>
069   * Indicates whether the Access Control Handler is enabled. If set
070   * to FALSE, then no access control is enforced, and any client
071   * (including unauthenticated or anonymous clients) could be allowed
072   * to perform any operation if not subject to other restrictions,
073   * such as those enforced by the privilege subsystem.
074   *
075   * @return Returns the value of the "enabled" property.
076   */
077  boolean isEnabled();
078
079
080
081  /**
082   * Gets the "java-class" property.
083   * <p>
084   * Specifies the fully-qualified name of the Java class that
085   * provides the Access Control Handler implementation.
086   *
087   * @return Returns the value of the "java-class" property.
088   */
089  String getJavaClass();
090
091}