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.ManagedObjectDefinition;
021import org.forgerock.opendj.config.PropertyException;
022import org.forgerock.opendj.server.config.meta.VirtualAttributeCfgDefn.ConflictBehavior;
023import org.forgerock.opendj.server.config.server.MemberVirtualAttributeCfg;
024
025
026
027/**
028 * A client-side interface for reading and modifying Member Virtual
029 * Attribute settings.
030 * <p>
031 * The Member Virtual Attribute generates a member or uniqueMember
032 * attribute whose values are the DNs of the members of a specified
033 * virtual static group.
034 */
035public interface MemberVirtualAttributeCfgClient extends VirtualAttributeCfgClient {
036
037  /**
038   * Get the configuration definition associated with this Member Virtual Attribute.
039   *
040   * @return Returns the configuration definition associated with this Member Virtual Attribute.
041   */
042  ManagedObjectDefinition<? extends MemberVirtualAttributeCfgClient, ? extends MemberVirtualAttributeCfg> definition();
043
044
045
046  /**
047   * Gets the "allow-retrieving-membership" property.
048   * <p>
049   * Indicates whether to handle requests that request all values for
050   * the virtual attribute.
051   * <p>
052   * This operation can be very expensive in some cases and is not
053   * consistent with the primary function of virtual static groups,
054   * which is to make it possible to use static group idioms to
055   * determine whether a given user is a member. If this attribute is
056   * set to false, attempts to retrieve the entire set of values
057   * receive an empty set, and only attempts to determine whether the
058   * attribute has a specific value or set of values (which is the
059   * primary anticipated use for virtual static groups) are handled
060   * properly.
061   *
062   * @return Returns the value of the "allow-retrieving-membership" property.
063   */
064  boolean isAllowRetrievingMembership();
065
066
067
068  /**
069   * Sets the "allow-retrieving-membership" property.
070   * <p>
071   * Indicates whether to handle requests that request all values for
072   * the virtual attribute.
073   * <p>
074   * This operation can be very expensive in some cases and is not
075   * consistent with the primary function of virtual static groups,
076   * which is to make it possible to use static group idioms to
077   * determine whether a given user is a member. If this attribute is
078   * set to false, attempts to retrieve the entire set of values
079   * receive an empty set, and only attempts to determine whether the
080   * attribute has a specific value or set of values (which is the
081   * primary anticipated use for virtual static groups) are handled
082   * properly.
083   *
084   * @param value The value of the "allow-retrieving-membership" property.
085   * @throws PropertyException
086   *           If the new value is invalid.
087   */
088  void setAllowRetrievingMembership(boolean value) throws PropertyException;
089
090
091
092  /**
093   * Gets the "conflict-behavior" property.
094   * <p>
095   * Specifies the behavior that the server is to exhibit for entries
096   * that already contain one or more real values for the associated
097   * attribute.
098   *
099   * @return Returns the value of the "conflict-behavior" property.
100   */
101  ConflictBehavior getConflictBehavior();
102
103
104
105  /**
106   * Sets the "conflict-behavior" property.
107   * <p>
108   * Specifies the behavior that the server is to exhibit for entries
109   * that already contain one or more real values for the associated
110   * attribute.
111   *
112   * @param value The value of the "conflict-behavior" property.
113   * @throws PropertyException
114   *           If the new value is invalid.
115   */
116  void setConflictBehavior(ConflictBehavior value) throws PropertyException;
117
118
119
120  /**
121   * Gets the "java-class" property.
122   * <p>
123   * Specifies the fully-qualified name of the virtual attribute
124   * provider class that generates the attribute values.
125   *
126   * @return Returns the value of the "java-class" property.
127   */
128  String getJavaClass();
129
130
131
132  /**
133   * Sets the "java-class" property.
134   * <p>
135   * Specifies the fully-qualified name of the virtual attribute
136   * provider class that generates the attribute values.
137   *
138   * @param value The value of the "java-class" property.
139   * @throws PropertyException
140   *           If the new value is invalid.
141   */
142  void setJavaClass(String value) throws PropertyException;
143
144}