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 java.util.Collection;
021import java.util.SortedSet;
022import org.forgerock.opendj.config.ManagedObjectDefinition;
023import org.forgerock.opendj.config.PropertyException;
024import org.forgerock.opendj.ldap.DN;
025import org.forgerock.opendj.ldap.schema.AttributeType;
026import org.forgerock.opendj.server.config.server.ExactMatchIdentityMapperCfg;
027
028
029
030/**
031 * A client-side interface for reading and modifying Exact Match
032 * Identity Mapper settings.
033 * <p>
034 * The Exact Match Identity Mapper maps an identifier string to user
035 * entries by searching for the entry containing a specified attribute
036 * whose value is the provided identifier. For example, the username
037 * provided by the client for DIGEST-MD5 authentication must match the
038 * value of the uid attribute
039 */
040public interface ExactMatchIdentityMapperCfgClient extends IdentityMapperCfgClient {
041
042  /**
043   * Get the configuration definition associated with this Exact Match Identity Mapper.
044   *
045   * @return Returns the configuration definition associated with this Exact Match Identity Mapper.
046   */
047  ManagedObjectDefinition<? extends ExactMatchIdentityMapperCfgClient, ? extends ExactMatchIdentityMapperCfg> definition();
048
049
050
051  /**
052   * Gets the "java-class" property.
053   * <p>
054   * Specifies the fully-qualified name of the Java class that
055   * provides the Exact Match Identity Mapper implementation.
056   *
057   * @return Returns the value of the "java-class" property.
058   */
059  String getJavaClass();
060
061
062
063  /**
064   * Sets the "java-class" property.
065   * <p>
066   * Specifies the fully-qualified name of the Java class that
067   * provides the Exact Match Identity Mapper implementation.
068   *
069   * @param value The value of the "java-class" property.
070   * @throws PropertyException
071   *           If the new value is invalid.
072   */
073  void setJavaClass(String value) throws PropertyException;
074
075
076
077  /**
078   * Gets the "match-attribute" property.
079   * <p>
080   * Specifies the attribute whose value should exactly match the ID
081   * string provided to this identity mapper.
082   * <p>
083   * At least one value must be provided. All values must refer to the
084   * name or OID of an attribute type defined in the directory server
085   * schema. If multiple attributes or OIDs are provided, at least one
086   * of those attributes must contain the provided ID string value in
087   * exactly one entry. The internal search performed includes a
088   * logical OR across all of these values.
089   *
090   * @return Returns the values of the "match-attribute" property.
091   */
092  SortedSet<AttributeType> getMatchAttribute();
093
094
095
096  /**
097   * Sets the "match-attribute" property.
098   * <p>
099   * Specifies the attribute whose value should exactly match the ID
100   * string provided to this identity mapper.
101   * <p>
102   * At least one value must be provided. All values must refer to the
103   * name or OID of an attribute type defined in the directory server
104   * schema. If multiple attributes or OIDs are provided, at least one
105   * of those attributes must contain the provided ID string value in
106   * exactly one entry. The internal search performed includes a
107   * logical OR across all of these values.
108   *
109   * @param values The values of the "match-attribute" property.
110   * @throws PropertyException
111   *           If one or more of the new values are invalid.
112   */
113  void setMatchAttribute(Collection<AttributeType> values) throws PropertyException;
114
115
116
117  /**
118   * Gets the "match-base-dn" property.
119   * <p>
120   * Specifies the set of base DNs below which to search for users.
121   * <p>
122   * The base DNs will be used when performing searches to map the
123   * provided ID string to a user entry. If multiple values are given,
124   * searches are performed below all specified base DNs.
125   *
126   * @return Returns the values of the "match-base-dn" property.
127   */
128  SortedSet<DN> getMatchBaseDN();
129
130
131
132  /**
133   * Sets the "match-base-dn" property.
134   * <p>
135   * Specifies the set of base DNs below which to search for users.
136   * <p>
137   * The base DNs will be used when performing searches to map the
138   * provided ID string to a user entry. If multiple values are given,
139   * searches are performed below all specified base DNs.
140   *
141   * @param values The values of the "match-base-dn" property.
142   * @throws PropertyException
143   *           If one or more of the new values are invalid.
144   */
145  void setMatchBaseDN(Collection<DN> values) throws PropertyException;
146
147}