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.meta.ReferentialIntegrityPluginCfgDefn.CheckReferencesScopeCriteria; 036import org.opends.server.admin.std.server.ReferentialIntegrityPluginCfg; 037import org.opends.server.types.AttributeType; 038import 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 */ 049public 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 PropertyException 090 * If one or more of the new values are invalid. 091 */ 092 void setAttributeType(Collection<AttributeType> values) throws PropertyException; 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 PropertyException 116 * If one or more of the new values are invalid. 117 */ 118 void setBaseDN(Collection<DN> values) throws PropertyException; 119 120 121 122 /** 123 * Gets the "check-references" property. 124 * <p> 125 * Specifies whether or not reference attributes must refer to 126 * existing entries. 127 * <p> 128 * When this property is set to true, this plugin will ensure that 129 * any new references added as part of an add or modify operation 130 * point to existing entries, and that the referenced entries match 131 * the filter criteria for the referencing attribute, if specified. 132 * 133 * @return Returns the value of the "check-references" property. 134 */ 135 boolean isCheckReferences(); 136 137 138 139 /** 140 * Sets the "check-references" property. 141 * <p> 142 * Specifies whether or not reference attributes must refer to 143 * existing entries. 144 * <p> 145 * When this property is set to true, this plugin will ensure that 146 * any new references added as part of an add or modify operation 147 * point to existing entries, and that the referenced entries match 148 * the filter criteria for the referencing attribute, if specified. 149 * 150 * @param value The value of the "check-references" property. 151 * @throws PropertyException 152 * If the new value is invalid. 153 */ 154 void setCheckReferences(Boolean value) throws PropertyException; 155 156 157 158 /** 159 * Gets the "check-references-filter-criteria" property. 160 * <p> 161 * Specifies additional filter criteria which will be enforced when 162 * checking references. 163 * <p> 164 * If a reference attribute has filter criteria defined then this 165 * plugin will ensure that any new references added as part of an add 166 * or modify operation refer to an existing entry which matches the 167 * specified filter. 168 * 169 * @return Returns the values of the "check-references-filter-criteria" property. 170 */ 171 SortedSet<String> getCheckReferencesFilterCriteria(); 172 173 174 175 /** 176 * Sets the "check-references-filter-criteria" property. 177 * <p> 178 * Specifies additional filter criteria which will be enforced when 179 * checking references. 180 * <p> 181 * If a reference attribute has filter criteria defined then this 182 * plugin will ensure that any new references added as part of an add 183 * or modify operation refer to an existing entry which matches the 184 * specified filter. 185 * 186 * @param values The values of the "check-references-filter-criteria" property. 187 * @throws PropertyException 188 * If one or more of the new values are invalid. 189 */ 190 void setCheckReferencesFilterCriteria(Collection<String> values) throws PropertyException; 191 192 193 194 /** 195 * Gets the "check-references-scope-criteria" property. 196 * <p> 197 * Specifies whether or not referenced entries must reside within 198 * the same naming context as the entry containing the reference. 199 * <p> 200 * The reference scope will only be enforced when reference checking 201 * is enabled. 202 * 203 * @return Returns the value of the "check-references-scope-criteria" property. 204 */ 205 CheckReferencesScopeCriteria getCheckReferencesScopeCriteria(); 206 207 208 209 /** 210 * Sets the "check-references-scope-criteria" property. 211 * <p> 212 * Specifies whether or not referenced entries must reside within 213 * the same naming context as the entry containing the reference. 214 * <p> 215 * The reference scope will only be enforced when reference checking 216 * is enabled. 217 * 218 * @param value The value of the "check-references-scope-criteria" property. 219 * @throws PropertyException 220 * If the new value is invalid. 221 */ 222 void setCheckReferencesScopeCriteria(CheckReferencesScopeCriteria value) throws PropertyException; 223 224 225 226 /** 227 * Gets the "java-class" property. 228 * <p> 229 * Specifies the fully-qualified name of the Java class that 230 * provides the plug-in implementation. 231 * 232 * @return Returns the value of the "java-class" property. 233 */ 234 String getJavaClass(); 235 236 237 238 /** 239 * Sets the "java-class" property. 240 * <p> 241 * Specifies the fully-qualified name of the Java class that 242 * provides the plug-in implementation. 243 * 244 * @param value The value of the "java-class" property. 245 * @throws PropertyException 246 * If the new value is invalid. 247 */ 248 void setJavaClass(String value) throws PropertyException; 249 250 251 252 /** 253 * Gets the "log-file" property. 254 * <p> 255 * Specifies the log file location where the update records are 256 * written when the plug-in is in background-mode processing. 257 * <p> 258 * The default location is the logs directory of the server 259 * instance, using the file name "referint". 260 * 261 * @return Returns the value of the "log-file" property. 262 */ 263 String getLogFile(); 264 265 266 267 /** 268 * Sets the "log-file" property. 269 * <p> 270 * Specifies the log file location where the update records are 271 * written when the plug-in is in background-mode processing. 272 * <p> 273 * The default location is the logs directory of the server 274 * instance, using the file name "referint". 275 * 276 * @param value The value of the "log-file" property. 277 * @throws PropertyException 278 * If the new value is invalid. 279 */ 280 void setLogFile(String value) throws PropertyException; 281 282 283 284 /** 285 * Gets the "plugin-type" property. 286 * <p> 287 * Specifies the set of plug-in types for the plug-in, which 288 * specifies the times at which the plug-in is invoked. 289 * 290 * @return Returns the values of the "plugin-type" property. 291 */ 292 SortedSet<PluginType> getPluginType(); 293 294 295 296 /** 297 * Sets the "plugin-type" property. 298 * <p> 299 * Specifies the set of plug-in types for the plug-in, which 300 * specifies the times at which the plug-in is invoked. 301 * 302 * @param values The values of the "plugin-type" property. 303 * @throws PropertyException 304 * If one or more of the new values are invalid. 305 */ 306 void setPluginType(Collection<PluginType> values) throws PropertyException; 307 308 309 310 /** 311 * Gets the "update-interval" property. 312 * <p> 313 * Specifies the interval in seconds when referential integrity 314 * updates are made. 315 * <p> 316 * If this value is 0, then the updates are made synchronously in 317 * the foreground. 318 * 319 * @return Returns the value of the "update-interval" property. 320 */ 321 long getUpdateInterval(); 322 323 324 325 /** 326 * Sets the "update-interval" property. 327 * <p> 328 * Specifies the interval in seconds when referential integrity 329 * updates are made. 330 * <p> 331 * If this value is 0, then the updates are made synchronously in 332 * the foreground. 333 * 334 * @param value The value of the "update-interval" property. 335 * @throws PropertyException 336 * If the new value is invalid. 337 */ 338 void setUpdateInterval(Long value) throws PropertyException; 339 340}