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
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.admin.std.client;
028
029
030
031 import java.util.Collection;
032 import java.util.SortedSet;
033 import org.opends.server.admin.IllegalPropertyValueException;
034 import org.opends.server.admin.ManagedObjectDefinition;
035 import org.opends.server.admin.std.server.RegularExpressionIdentityMapperCfg;
036 import org.opends.server.types.AttributeType;
037 import org.opends.server.types.DN;
038
039
040
041 /**
042 * A client-side interface for reading and modifying Regular
043 * Expression Identity Mapper settings.
044 * <p>
045 * The Regular Expression Identity Mapper provides a way to use a
046 * regular expression to translate the provided identifier when
047 * searching for the appropriate user entry.
048 */
049 public interface RegularExpressionIdentityMapperCfgClient extends IdentityMapperCfgClient {
050
051 /**
052 * Get the configuration definition associated with this Regular Expression Identity Mapper.
053 *
054 * @return Returns the configuration definition associated with this Regular Expression Identity Mapper.
055 */
056 ManagedObjectDefinition<? extends RegularExpressionIdentityMapperCfgClient, ? extends RegularExpressionIdentityMapperCfg> definition();
057
058
059
060 /**
061 * Gets the "java-class" property.
062 * <p>
063 * Specifies the fully-qualified name of the Java class that
064 * provides the Regular Expression Identity Mapper implementation.
065 *
066 * @return Returns the value of the "java-class" property.
067 */
068 String getJavaClass();
069
070
071
072 /**
073 * Sets the "java-class" property.
074 * <p>
075 * Specifies the fully-qualified name of the Java class that
076 * provides the Regular Expression Identity Mapper implementation.
077 *
078 * @param value The value of the "java-class" property.
079 * @throws IllegalPropertyValueException
080 * If the new value is invalid.
081 */
082 void setJavaClass(String value) throws IllegalPropertyValueException;
083
084
085
086 /**
087 * Gets the "match-attribute" property.
088 * <p>
089 * Specifies the name or OID of the attribute whose value should
090 * match the provided identifier string after it has been processed
091 * by the associated regular expression.
092 * <p>
093 * All values must refer to the name or OID of an attribute type
094 * defined in the Directory Server schema. If multiple attributes or
095 * OIDs are provided, at least one of those attributes must contain
096 * the provided ID string value in exactly one entry.
097 *
098 * @return Returns the values of the "match-attribute" property.
099 */
100 SortedSet<AttributeType> getMatchAttribute();
101
102
103
104 /**
105 * Sets the "match-attribute" property.
106 * <p>
107 * Specifies the name or OID of the attribute whose value should
108 * match the provided identifier string after it has been processed
109 * by the associated regular expression.
110 * <p>
111 * All values must refer to the name or OID of an attribute type
112 * defined in the Directory Server schema. If multiple attributes or
113 * OIDs are provided, at least one of those attributes must contain
114 * the provided ID string value in exactly one entry.
115 *
116 * @param values The values of the "match-attribute" property.
117 * @throws IllegalPropertyValueException
118 * If one or more of the new values are invalid.
119 */
120 void setMatchAttribute(Collection<AttributeType> values) throws IllegalPropertyValueException;
121
122
123
124 /**
125 * Gets the "match-base-dn" property.
126 * <p>
127 * Specifies the base DN(s) that should be used when performing
128 * searches to map the provided ID string to a user entry. If
129 * multiple values are given, searches are performed below all the
130 * specified base DNs.
131 *
132 * @return Returns the values of the "match-base-dn" property.
133 */
134 SortedSet<DN> getMatchBaseDN();
135
136
137
138 /**
139 * Sets the "match-base-dn" property.
140 * <p>
141 * Specifies the base DN(s) that should be used when performing
142 * searches to map the provided ID string to a user entry. If
143 * multiple values are given, searches are performed below all the
144 * specified base DNs.
145 *
146 * @param values The values of the "match-base-dn" property.
147 * @throws IllegalPropertyValueException
148 * If one or more of the new values are invalid.
149 */
150 void setMatchBaseDN(Collection<DN> values) throws IllegalPropertyValueException;
151
152
153
154 /**
155 * Gets the "match-pattern" property.
156 * <p>
157 * Specifies the regular expression pattern that is used to identify
158 * portions of the ID string that will be replaced.
159 * <p>
160 * Any portion of the ID string that matches this pattern is
161 * replaced in accordance with the provided replace pattern (or is
162 * removed if no replace pattern is specified). If multiple
163 * substrings within the given ID string match this pattern, all
164 * occurrences are replaced. If no part of the given ID string
165 * matches this pattern, the ID string is not altered. Exactly one
166 * match pattern value must be provided, and it must be a valid
167 * regular expression as described in the API documentation for the
168 * java.util.regex.Pattern class, including support for capturing
169 * groups.
170 *
171 * @return Returns the value of the "match-pattern" property.
172 */
173 String getMatchPattern();
174
175
176
177 /**
178 * Sets the "match-pattern" property.
179 * <p>
180 * Specifies the regular expression pattern that is used to identify
181 * portions of the ID string that will be replaced.
182 * <p>
183 * Any portion of the ID string that matches this pattern is
184 * replaced in accordance with the provided replace pattern (or is
185 * removed if no replace pattern is specified). If multiple
186 * substrings within the given ID string match this pattern, all
187 * occurrences are replaced. If no part of the given ID string
188 * matches this pattern, the ID string is not altered. Exactly one
189 * match pattern value must be provided, and it must be a valid
190 * regular expression as described in the API documentation for the
191 * java.util.regex.Pattern class, including support for capturing
192 * groups.
193 *
194 * @param value The value of the "match-pattern" property.
195 * @throws IllegalPropertyValueException
196 * If the new value is invalid.
197 */
198 void setMatchPattern(String value) throws IllegalPropertyValueException;
199
200
201
202 /**
203 * Gets the "replace-pattern" property.
204 * <p>
205 * Specifies the replacement pattern that should be used for
206 * substrings in the ID string that match the provided regular
207 * expression pattern.
208 * <p>
209 * If no replacement pattern is provided, then any matching portions
210 * of the ID string will be removed (i.e., replaced with an empty
211 * string). The replacement pattern may include a string from a
212 * capturing group by using a dollar sign ($) followed by an integer
213 * value that indicates which capturing group should be used.
214 *
215 * @return Returns the value of the "replace-pattern" property.
216 */
217 String getReplacePattern();
218
219
220
221 /**
222 * Sets the "replace-pattern" property.
223 * <p>
224 * Specifies the replacement pattern that should be used for
225 * substrings in the ID string that match the provided regular
226 * expression pattern.
227 * <p>
228 * If no replacement pattern is provided, then any matching portions
229 * of the ID string will be removed (i.e., replaced with an empty
230 * string). The replacement pattern may include a string from a
231 * capturing group by using a dollar sign ($) followed by an integer
232 * value that indicates which capturing group should be used.
233 *
234 * @param value The value of the "replace-pattern" property.
235 * @throws IllegalPropertyValueException
236 * If the new value is invalid.
237 */
238 void setReplacePattern(String value) throws IllegalPropertyValueException;
239
240 }