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