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.meta.PluginCfgDefn.PluginType;
036    import org.opends.server.admin.std.server.ReferentialIntegrityPluginCfg;
037    import org.opends.server.types.AttributeType;
038    import org.opends.server.types.DN;
039    
040    
041    
042    /**
043     * A client-side interface for reading and modifying Referential
044     * Integrity Plugin settings.
045     * <p>
046     * The Referential Integrity Plugin maintains referential integrity
047     * for DN valued attributes.
048     */
049    public interface ReferentialIntegrityPluginCfgClient extends PluginCfgClient {
050    
051      /**
052       * Get the configuration definition associated with this Referential Integrity Plugin.
053       *
054       * @return Returns the configuration definition associated with this Referential Integrity Plugin.
055       */
056      ManagedObjectDefinition<? extends ReferentialIntegrityPluginCfgClient, ? extends ReferentialIntegrityPluginCfg> definition();
057    
058    
059    
060      /**
061       * Gets the "attribute-type" property.
062       * <p>
063       * Specifies the attribute types for which referential integrity is
064       * to be maintained.
065       * <p>
066       * At least one attribute type must be specified, and the syntax of
067       * any attributes must be either a distinguished name
068       * (1.3.6.1.4.1.1466.115.121.1.12) or name and optional UID
069       * (1.3.6.1.4.1.1466.115.121.1.34).
070       *
071       * @return Returns the values of the "attribute-type" property.
072       */
073      SortedSet<AttributeType> getAttributeType();
074    
075    
076    
077      /**
078       * Sets the "attribute-type" property.
079       * <p>
080       * Specifies the attribute types for which referential integrity is
081       * to be maintained.
082       * <p>
083       * At least one attribute type must be specified, and the syntax of
084       * any attributes must be either a distinguished name
085       * (1.3.6.1.4.1.1466.115.121.1.12) or name and optional UID
086       * (1.3.6.1.4.1.1466.115.121.1.34).
087       *
088       * @param values The values of the "attribute-type" property.
089       * @throws IllegalPropertyValueException
090       *           If one or more of the new values are invalid.
091       */
092      void setAttributeType(Collection<AttributeType> values) throws IllegalPropertyValueException;
093    
094    
095    
096      /**
097       * Gets the "base-dn" property.
098       * <p>
099       * Specifies the base DN that limits the scope within which
100       * referential integrity is maintained.
101       *
102       * @return Returns the values of the "base-dn" property.
103       */
104      SortedSet<DN> getBaseDN();
105    
106    
107    
108      /**
109       * Sets the "base-dn" property.
110       * <p>
111       * Specifies the base DN that limits the scope within which
112       * referential integrity is maintained.
113       *
114       * @param values The values of the "base-dn" property.
115       * @throws IllegalPropertyValueException
116       *           If one or more of the new values are invalid.
117       */
118      void setBaseDN(Collection<DN> values) throws IllegalPropertyValueException;
119    
120    
121    
122      /**
123       * Gets the "java-class" property.
124       * <p>
125       * Specifies the fully-qualified name of the Java class that
126       * provides the plug-in implementation.
127       *
128       * @return Returns the value of the "java-class" property.
129       */
130      String getJavaClass();
131    
132    
133    
134      /**
135       * Sets the "java-class" property.
136       * <p>
137       * Specifies the fully-qualified name of the Java class that
138       * provides the plug-in implementation.
139       *
140       * @param value The value of the "java-class" property.
141       * @throws IllegalPropertyValueException
142       *           If the new value is invalid.
143       */
144      void setJavaClass(String value) throws IllegalPropertyValueException;
145    
146    
147    
148      /**
149       * Gets the "log-file" property.
150       * <p>
151       * Specifies the log file location where the update records are
152       * written when the plug-in is in background-mode processing.
153       * <p>
154       * The default location is the logs directory of the server
155       * instance, using the file name "referint".
156       *
157       * @return Returns the value of the "log-file" property.
158       */
159      String getLogFile();
160    
161    
162    
163      /**
164       * Sets the "log-file" property.
165       * <p>
166       * Specifies the log file location where the update records are
167       * written when the plug-in is in background-mode processing.
168       * <p>
169       * The default location is the logs directory of the server
170       * instance, using the file name "referint".
171       *
172       * @param value The value of the "log-file" property.
173       * @throws IllegalPropertyValueException
174       *           If the new value is invalid.
175       */
176      void setLogFile(String value) throws IllegalPropertyValueException;
177    
178    
179    
180      /**
181       * Gets the "plugin-type" property.
182       * <p>
183       * Specifies the set of plug-in types for the plug-in, which
184       * specifies the times at which the plug-in is invoked.
185       *
186       * @return Returns the values of the "plugin-type" property.
187       */
188      SortedSet<PluginType> getPluginType();
189    
190    
191    
192      /**
193       * Sets the "plugin-type" property.
194       * <p>
195       * Specifies the set of plug-in types for the plug-in, which
196       * specifies the times at which the plug-in is invoked.
197       *
198       * @param values The values of the "plugin-type" property.
199       * @throws IllegalPropertyValueException
200       *           If one or more of the new values are invalid.
201       */
202      void setPluginType(Collection<PluginType> values) throws IllegalPropertyValueException;
203    
204    
205    
206      /**
207       * Gets the "update-interval" property.
208       * <p>
209       * Specifies the interval in seconds when referential integrity
210       * updates are made.
211       * <p>
212       * If this value is 0, then the updates are made synchronously in
213       * the foreground.
214       *
215       * @return Returns the value of the "update-interval" property.
216       */
217      long getUpdateInterval();
218    
219    
220    
221      /**
222       * Sets the "update-interval" property.
223       * <p>
224       * Specifies the interval in seconds when referential integrity
225       * updates are made.
226       * <p>
227       * If this value is 0, then the updates are made synchronously in
228       * the foreground.
229       *
230       * @param value The value of the "update-interval" property.
231       * @throws IllegalPropertyValueException
232       *           If the new value is invalid.
233       */
234      void setUpdateInterval(Long value) throws IllegalPropertyValueException;
235    
236    }