001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.opends.server.admin.std.client;
027
028
029
030import java.util.Collection;
031import java.util.SortedSet;
032import org.opends.server.admin.ManagedObjectDefinition;
033import org.opends.server.admin.PropertyException;
034import org.opends.server.admin.std.meta.PluginCfgDefn.PluginType;
035import org.opends.server.admin.std.server.UniqueAttributePluginCfg;
036import org.opends.server.types.AttributeType;
037import org.opends.server.types.DN;
038
039
040
041/**
042 * A client-side interface for reading and modifying Unique Attribute
043 * Plugin settings.
044 * <p>
045 * The Unique Attribute Plugin enforces constraints on the value of an
046 * attribute within a portion of the directory.
047 */
048public interface UniqueAttributePluginCfgClient extends PluginCfgClient {
049
050  /**
051   * Get the configuration definition associated with this Unique Attribute Plugin.
052   *
053   * @return Returns the configuration definition associated with this Unique Attribute Plugin.
054   */
055  ManagedObjectDefinition<? extends UniqueAttributePluginCfgClient, ? extends UniqueAttributePluginCfg> definition();
056
057
058
059  /**
060   * Gets the "base-dn" property.
061   * <p>
062   * Specifies a base DN within which the attribute must be unique.
063   *
064   * @return Returns the values of the "base-dn" property.
065   */
066  SortedSet<DN> getBaseDN();
067
068
069
070  /**
071   * Sets the "base-dn" property.
072   * <p>
073   * Specifies a base DN within which the attribute must be unique.
074   *
075   * @param values The values of the "base-dn" property.
076   * @throws PropertyException
077   *           If one or more of the new values are invalid.
078   */
079  void setBaseDN(Collection<DN> values) throws PropertyException;
080
081
082
083  /**
084   * Gets the "java-class" property.
085   * <p>
086   * Specifies the fully-qualified name of the Java class that
087   * provides the plug-in implementation.
088   *
089   * @return Returns the value of the "java-class" property.
090   */
091  String getJavaClass();
092
093
094
095  /**
096   * Sets the "java-class" property.
097   * <p>
098   * Specifies the fully-qualified name of the Java class that
099   * provides the plug-in implementation.
100   *
101   * @param value The value of the "java-class" property.
102   * @throws PropertyException
103   *           If the new value is invalid.
104   */
105  void setJavaClass(String value) throws PropertyException;
106
107
108
109  /**
110   * Gets the "plugin-type" property.
111   * <p>
112   * Specifies the set of plug-in types for the plug-in, which
113   * specifies the times at which the plug-in is invoked.
114   *
115   * @return Returns the values of the "plugin-type" property.
116   */
117  SortedSet<PluginType> getPluginType();
118
119
120
121  /**
122   * Sets the "plugin-type" property.
123   * <p>
124   * Specifies the set of plug-in types for the plug-in, which
125   * specifies the times at which the plug-in is invoked.
126   *
127   * @param values The values of the "plugin-type" property.
128   * @throws PropertyException
129   *           If one or more of the new values are invalid.
130   */
131  void setPluginType(Collection<PluginType> values) throws PropertyException;
132
133
134
135  /**
136   * Gets the "type" property.
137   * <p>
138   * Specifies the type of attributes to check for value uniqueness.
139   *
140   * @return Returns the values of the "type" property.
141   */
142  SortedSet<AttributeType> getType();
143
144
145
146  /**
147   * Sets the "type" property.
148   * <p>
149   * Specifies the type of attributes to check for value uniqueness.
150   *
151   * @param values The values of the "type" property.
152   * @throws PropertyException
153   *           If one or more of the new values are invalid.
154   */
155  void setType(Collection<AttributeType> values) throws PropertyException;
156
157}