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.server.ConfigurationChangeListener;
021import org.forgerock.opendj.server.config.meta.VirtualAttributeCfgDefn.ConflictBehavior;
022
023
024
025/**
026 * A server-side interface for querying Member Virtual Attribute
027 * settings.
028 * <p>
029 * The Member Virtual Attribute generates a member or uniqueMember
030 * attribute whose values are the DNs of the members of a specified
031 * virtual static group.
032 */
033public interface MemberVirtualAttributeCfg extends VirtualAttributeCfg {
034
035  /**
036   * Gets the configuration class associated with this Member Virtual Attribute.
037   *
038   * @return Returns the configuration class associated with this Member Virtual Attribute.
039   */
040  Class<? extends MemberVirtualAttributeCfg> configurationClass();
041
042
043
044  /**
045   * Register to be notified when this Member Virtual Attribute is changed.
046   *
047   * @param listener
048   *          The Member Virtual Attribute configuration change listener.
049   */
050  void addMemberChangeListener(ConfigurationChangeListener<MemberVirtualAttributeCfg> listener);
051
052
053
054  /**
055   * Deregister an existing Member Virtual Attribute configuration change listener.
056   *
057   * @param listener
058   *          The Member Virtual Attribute configuration change listener.
059   */
060  void removeMemberChangeListener(ConfigurationChangeListener<MemberVirtualAttributeCfg> listener);
061
062
063
064  /**
065   * Gets the "allow-retrieving-membership" property.
066   * <p>
067   * Indicates whether to handle requests that request all values for
068   * the virtual attribute.
069   * <p>
070   * This operation can be very expensive in some cases and is not
071   * consistent with the primary function of virtual static groups,
072   * which is to make it possible to use static group idioms to
073   * determine whether a given user is a member. If this attribute is
074   * set to false, attempts to retrieve the entire set of values
075   * receive an empty set, and only attempts to determine whether the
076   * attribute has a specific value or set of values (which is the
077   * primary anticipated use for virtual static groups) are handled
078   * properly.
079   *
080   * @return Returns the value of the "allow-retrieving-membership" property.
081   */
082  boolean isAllowRetrievingMembership();
083
084
085
086  /**
087   * Gets the "conflict-behavior" property.
088   * <p>
089   * Specifies the behavior that the server is to exhibit for entries
090   * that already contain one or more real values for the associated
091   * attribute.
092   *
093   * @return Returns the value of the "conflict-behavior" property.
094   */
095  ConflictBehavior getConflictBehavior();
096
097
098
099  /**
100   * Gets the "java-class" property.
101   * <p>
102   * Specifies the fully-qualified name of the virtual attribute
103   * provider class that generates the attribute values.
104   *
105   * @return Returns the value of the "java-class" property.
106   */
107  String getJavaClass();
108
109}