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.meta.PluginCfgDefn.PluginType; 027import org.forgerock.opendj.server.config.meta.ReferentialIntegrityPluginCfgDefn.CheckReferencesScopeCriteria; 028import org.forgerock.opendj.server.config.server.ReferentialIntegrityPluginCfg; 029 030 031 032/** 033 * A client-side interface for reading and modifying Referential 034 * Integrity Plugin settings. 035 * <p> 036 * The Referential Integrity Plugin maintains referential integrity 037 * for DN valued attributes. 038 */ 039public interface ReferentialIntegrityPluginCfgClient extends PluginCfgClient { 040 041 /** 042 * Get the configuration definition associated with this Referential Integrity Plugin. 043 * 044 * @return Returns the configuration definition associated with this Referential Integrity Plugin. 045 */ 046 ManagedObjectDefinition<? extends ReferentialIntegrityPluginCfgClient, ? extends ReferentialIntegrityPluginCfg> definition(); 047 048 049 050 /** 051 * Gets the "attribute-type" property. 052 * <p> 053 * Specifies the attribute types for which referential integrity is 054 * to be maintained. 055 * <p> 056 * At least one attribute type must be specified, and the syntax of 057 * any attributes must be either a distinguished name 058 * (1.3.6.1.4.1.1466.115.121.1.12) or name and optional UID 059 * (1.3.6.1.4.1.1466.115.121.1.34). 060 * 061 * @return Returns the values of the "attribute-type" property. 062 */ 063 SortedSet<AttributeType> getAttributeType(); 064 065 066 067 /** 068 * Sets the "attribute-type" property. 069 * <p> 070 * Specifies the attribute types for which referential integrity is 071 * to be maintained. 072 * <p> 073 * At least one attribute type must be specified, and the syntax of 074 * any attributes must be either a distinguished name 075 * (1.3.6.1.4.1.1466.115.121.1.12) or name and optional UID 076 * (1.3.6.1.4.1.1466.115.121.1.34). 077 * 078 * @param values The values of the "attribute-type" property. 079 * @throws PropertyException 080 * If one or more of the new values are invalid. 081 */ 082 void setAttributeType(Collection<AttributeType> values) throws PropertyException; 083 084 085 086 /** 087 * Gets the "base-dn" property. 088 * <p> 089 * Specifies the base DN that limits the scope within which 090 * referential integrity is maintained. 091 * 092 * @return Returns the values of the "base-dn" property. 093 */ 094 SortedSet<DN> getBaseDN(); 095 096 097 098 /** 099 * Sets the "base-dn" property. 100 * <p> 101 * Specifies the base DN that limits the scope within which 102 * referential integrity is maintained. 103 * 104 * @param values The values of the "base-dn" property. 105 * @throws PropertyException 106 * If one or more of the new values are invalid. 107 */ 108 void setBaseDN(Collection<DN> values) throws PropertyException; 109 110 111 112 /** 113 * Gets the "check-references" property. 114 * <p> 115 * Specifies whether reference attributes must refer to existing 116 * entries. 117 * <p> 118 * When this property is set to true, this plugin will ensure that 119 * any new references added as part of an add or modify operation 120 * point to existing entries, and that the referenced entries match 121 * the filter criteria for the referencing attribute, if specified. 122 * 123 * @return Returns the value of the "check-references" property. 124 */ 125 boolean isCheckReferences(); 126 127 128 129 /** 130 * Sets the "check-references" property. 131 * <p> 132 * Specifies whether reference attributes must refer to existing 133 * entries. 134 * <p> 135 * When this property is set to true, this plugin will ensure that 136 * any new references added as part of an add or modify operation 137 * point to existing entries, and that the referenced entries match 138 * the filter criteria for the referencing attribute, if specified. 139 * 140 * @param value The value of the "check-references" property. 141 * @throws PropertyException 142 * If the new value is invalid. 143 */ 144 void setCheckReferences(Boolean value) throws PropertyException; 145 146 147 148 /** 149 * Gets the "check-references-filter-criteria" property. 150 * <p> 151 * Specifies additional filter criteria which will be enforced when 152 * checking references. 153 * <p> 154 * If a reference attribute has filter criteria defined then this 155 * plugin will ensure that any new references added as part of an add 156 * or modify operation refer to an existing entry which matches the 157 * specified filter. 158 * 159 * @return Returns the values of the "check-references-filter-criteria" property. 160 */ 161 SortedSet<String> getCheckReferencesFilterCriteria(); 162 163 164 165 /** 166 * Sets the "check-references-filter-criteria" property. 167 * <p> 168 * Specifies additional filter criteria which will be enforced when 169 * checking references. 170 * <p> 171 * If a reference attribute has filter criteria defined then this 172 * plugin will ensure that any new references added as part of an add 173 * or modify operation refer to an existing entry which matches the 174 * specified filter. 175 * 176 * @param values The values of the "check-references-filter-criteria" property. 177 * @throws PropertyException 178 * If one or more of the new values are invalid. 179 */ 180 void setCheckReferencesFilterCriteria(Collection<String> values) throws PropertyException; 181 182 183 184 /** 185 * Gets the "check-references-scope-criteria" property. 186 * <p> 187 * Specifies whether referenced entries must reside within the same 188 * naming context as the entry containing the reference. 189 * <p> 190 * The reference scope will only be enforced when reference checking 191 * is enabled. 192 * 193 * @return Returns the value of the "check-references-scope-criteria" property. 194 */ 195 CheckReferencesScopeCriteria getCheckReferencesScopeCriteria(); 196 197 198 199 /** 200 * Sets the "check-references-scope-criteria" property. 201 * <p> 202 * Specifies whether referenced entries must reside within the same 203 * naming context as the entry containing the reference. 204 * <p> 205 * The reference scope will only be enforced when reference checking 206 * is enabled. 207 * 208 * @param value The value of the "check-references-scope-criteria" property. 209 * @throws PropertyException 210 * If the new value is invalid. 211 */ 212 void setCheckReferencesScopeCriteria(CheckReferencesScopeCriteria value) throws PropertyException; 213 214 215 216 /** 217 * Gets the "java-class" property. 218 * <p> 219 * Specifies the fully-qualified name of the Java class that 220 * provides the plug-in implementation. 221 * 222 * @return Returns the value of the "java-class" property. 223 */ 224 String getJavaClass(); 225 226 227 228 /** 229 * Sets the "java-class" property. 230 * <p> 231 * Specifies the fully-qualified name of the Java class that 232 * provides the plug-in implementation. 233 * 234 * @param value The value of the "java-class" property. 235 * @throws PropertyException 236 * If the new value is invalid. 237 */ 238 void setJavaClass(String value) throws PropertyException; 239 240 241 242 /** 243 * Gets the "log-file" property. 244 * <p> 245 * Specifies the log file location where the update records are 246 * written when the plug-in is in background-mode processing. 247 * <p> 248 * The default location is the logs directory of the server 249 * instance, using the file name "referint". 250 * 251 * @return Returns the value of the "log-file" property. 252 */ 253 String getLogFile(); 254 255 256 257 /** 258 * Sets the "log-file" property. 259 * <p> 260 * Specifies the log file location where the update records are 261 * written when the plug-in is in background-mode processing. 262 * <p> 263 * The default location is the logs directory of the server 264 * instance, using the file name "referint". 265 * 266 * @param value The value of the "log-file" property. 267 * @throws PropertyException 268 * If the new value is invalid. 269 */ 270 void setLogFile(String value) throws PropertyException; 271 272 273 274 /** 275 * Gets the "plugin-type" property. 276 * <p> 277 * Specifies the set of plug-in types for the plug-in, which 278 * specifies the times at which the plug-in is invoked. 279 * 280 * @return Returns the values of the "plugin-type" property. 281 */ 282 SortedSet<PluginType> getPluginType(); 283 284 285 286 /** 287 * Sets the "plugin-type" property. 288 * <p> 289 * Specifies the set of plug-in types for the plug-in, which 290 * specifies the times at which the plug-in is invoked. 291 * 292 * @param values The values of the "plugin-type" property. 293 * @throws PropertyException 294 * If one or more of the new values are invalid. 295 */ 296 void setPluginType(Collection<PluginType> values) throws PropertyException; 297 298 299 300 /** 301 * Gets the "update-interval" property. 302 * <p> 303 * Specifies the interval in seconds when referential integrity 304 * updates are made. 305 * <p> 306 * If this value is 0, then the updates are made synchronously in 307 * the foreground. 308 * 309 * @return Returns the value of the "update-interval" property. 310 */ 311 long getUpdateInterval(); 312 313 314 315 /** 316 * Sets the "update-interval" property. 317 * <p> 318 * Specifies the interval in seconds when referential integrity 319 * updates are made. 320 * <p> 321 * If this value is 0, then the updates are made synchronously in 322 * the foreground. 323 * 324 * @param value The value of the "update-interval" property. 325 * @throws PropertyException 326 * If the new value is invalid. 327 */ 328 void setUpdateInterval(Long value) throws PropertyException; 329 330}