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.server; 027 028 029 030import java.util.SortedSet; 031import org.opends.server.admin.server.ConfigurationChangeListener; 032import org.opends.server.admin.std.meta.PluginCfgDefn.PluginType; 033import org.opends.server.admin.std.meta.ReferentialIntegrityPluginCfgDefn.CheckReferencesScopeCriteria; 034import org.opends.server.types.AttributeType; 035import org.opends.server.types.DN; 036 037 038 039/** 040 * A server-side interface for querying Referential Integrity Plugin 041 * settings. 042 * <p> 043 * The Referential Integrity Plugin maintains referential integrity 044 * for DN valued attributes. 045 */ 046public interface ReferentialIntegrityPluginCfg extends PluginCfg { 047 048 /** 049 * Gets the configuration class associated with this Referential Integrity Plugin. 050 * 051 * @return Returns the configuration class associated with this Referential Integrity Plugin. 052 */ 053 Class<? extends ReferentialIntegrityPluginCfg> configurationClass(); 054 055 056 057 /** 058 * Register to be notified when this Referential Integrity Plugin is changed. 059 * 060 * @param listener 061 * The Referential Integrity Plugin configuration change listener. 062 */ 063 void addReferentialIntegrityChangeListener(ConfigurationChangeListener<ReferentialIntegrityPluginCfg> listener); 064 065 066 067 /** 068 * Deregister an existing Referential Integrity Plugin configuration change listener. 069 * 070 * @param listener 071 * The Referential Integrity Plugin configuration change listener. 072 */ 073 void removeReferentialIntegrityChangeListener(ConfigurationChangeListener<ReferentialIntegrityPluginCfg> listener); 074 075 076 077 /** 078 * Gets 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 * @return Returns an unmodifiable set containing the values of the "attribute-type" property. 089 */ 090 SortedSet<AttributeType> getAttributeType(); 091 092 093 094 /** 095 * Gets the "base-dn" property. 096 * <p> 097 * Specifies the base DN that limits the scope within which 098 * referential integrity is maintained. 099 * 100 * @return Returns an unmodifiable set containing the values of the "base-dn" property. 101 */ 102 SortedSet<DN> getBaseDN(); 103 104 105 106 /** 107 * Gets the "check-references" property. 108 * <p> 109 * Specifies whether or not reference attributes must refer to 110 * existing entries. 111 * <p> 112 * When this property is set to true, this plugin will ensure that 113 * any new references added as part of an add or modify operation 114 * point to existing entries, and that the referenced entries match 115 * the filter criteria for the referencing attribute, if specified. 116 * 117 * @return Returns the value of the "check-references" property. 118 */ 119 boolean isCheckReferences(); 120 121 122 123 /** 124 * Gets the "check-references-filter-criteria" property. 125 * <p> 126 * Specifies additional filter criteria which will be enforced when 127 * checking references. 128 * <p> 129 * If a reference attribute has filter criteria defined then this 130 * plugin will ensure that any new references added as part of an add 131 * or modify operation refer to an existing entry which matches the 132 * specified filter. 133 * 134 * @return Returns an unmodifiable set containing the values of the "check-references-filter-criteria" property. 135 */ 136 SortedSet<String> getCheckReferencesFilterCriteria(); 137 138 139 140 /** 141 * Gets the "check-references-scope-criteria" property. 142 * <p> 143 * Specifies whether or not referenced entries must reside within 144 * the same naming context as the entry containing the reference. 145 * <p> 146 * The reference scope will only be enforced when reference checking 147 * is enabled. 148 * 149 * @return Returns the value of the "check-references-scope-criteria" property. 150 */ 151 CheckReferencesScopeCriteria getCheckReferencesScopeCriteria(); 152 153 154 155 /** 156 * Gets the "java-class" property. 157 * <p> 158 * Specifies the fully-qualified name of the Java class that 159 * provides the plug-in implementation. 160 * 161 * @return Returns the value of the "java-class" property. 162 */ 163 String getJavaClass(); 164 165 166 167 /** 168 * Gets the "log-file" property. 169 * <p> 170 * Specifies the log file location where the update records are 171 * written when the plug-in is in background-mode processing. 172 * <p> 173 * The default location is the logs directory of the server 174 * instance, using the file name "referint". 175 * 176 * @return Returns the value of the "log-file" property. 177 */ 178 String getLogFile(); 179 180 181 182 /** 183 * Gets the "plugin-type" property. 184 * <p> 185 * Specifies the set of plug-in types for the plug-in, which 186 * specifies the times at which the plug-in is invoked. 187 * 188 * @return Returns an unmodifiable set containing the values of the "plugin-type" property. 189 */ 190 SortedSet<PluginType> getPluginType(); 191 192 193 194 /** 195 * Gets the "update-interval" property. 196 * <p> 197 * Specifies the interval in seconds when referential integrity 198 * updates are made. 199 * <p> 200 * If this value is 0, then the updates are made synchronously in 201 * the foreground. 202 * 203 * @return Returns the value of the "update-interval" property. 204 */ 205 long getUpdateInterval(); 206 207}