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.server.config.server.CoreSchemaCfg; 025 026 027 028/** 029 * A client-side interface for reading and modifying Core Schema 030 * settings. 031 * <p> 032 * Core Schema define the core schema elements to load. 033 */ 034public interface CoreSchemaCfgClient extends SchemaProviderCfgClient { 035 036 /** 037 * Get the configuration definition associated with this Core Schema. 038 * 039 * @return Returns the configuration definition associated with this Core Schema. 040 */ 041 ManagedObjectDefinition<? extends CoreSchemaCfgClient, ? extends CoreSchemaCfg> definition(); 042 043 044 045 /** 046 * Gets the "allow-zero-length-values-directory-string" property. 047 * <p> 048 * Indicates whether zero-length (that is, an empty string) values 049 * are allowed for directory string. 050 * <p> 051 * This is technically not allowed by the revised LDAPv3 052 * specification, but some environments may require it for backward 053 * compatibility with servers that do allow it. 054 * 055 * @return Returns the value of the "allow-zero-length-values-directory-string" property. 056 */ 057 boolean isAllowZeroLengthValuesDirectoryString(); 058 059 060 061 /** 062 * Sets the "allow-zero-length-values-directory-string" property. 063 * <p> 064 * Indicates whether zero-length (that is, an empty string) values 065 * are allowed for directory string. 066 * <p> 067 * This is technically not allowed by the revised LDAPv3 068 * specification, but some environments may require it for backward 069 * compatibility with servers that do allow it. 070 * 071 * @param value The value of the "allow-zero-length-values-directory-string" property. 072 * @throws PropertyException 073 * If the new value is invalid. 074 */ 075 void setAllowZeroLengthValuesDirectoryString(Boolean value) throws PropertyException; 076 077 078 079 /** 080 * Gets the "disabled-matching-rule" property. 081 * <p> 082 * The set of disabled matching rules. 083 * <p> 084 * Matching rules must be specified using the syntax: OID, or use 085 * the default value 'NONE' to specify no value. 086 * 087 * @return Returns the values of the "disabled-matching-rule" property. 088 */ 089 SortedSet<String> getDisabledMatchingRule(); 090 091 092 093 /** 094 * Sets the "disabled-matching-rule" property. 095 * <p> 096 * The set of disabled matching rules. 097 * <p> 098 * Matching rules must be specified using the syntax: OID, or use 099 * the default value 'NONE' to specify no value. 100 * 101 * @param values The values of the "disabled-matching-rule" property. 102 * @throws PropertyException 103 * If one or more of the new values are invalid. 104 */ 105 void setDisabledMatchingRule(Collection<String> values) throws PropertyException; 106 107 108 109 /** 110 * Gets the "disabled-syntax" property. 111 * <p> 112 * The set of disabled syntaxes. 113 * <p> 114 * Syntaxes must be specified using the syntax: OID, or use the 115 * default value 'NONE' to specify no value. 116 * 117 * @return Returns the values of the "disabled-syntax" property. 118 */ 119 SortedSet<String> getDisabledSyntax(); 120 121 122 123 /** 124 * Sets the "disabled-syntax" property. 125 * <p> 126 * The set of disabled syntaxes. 127 * <p> 128 * Syntaxes must be specified using the syntax: OID, or use the 129 * default value 'NONE' to specify no value. 130 * 131 * @param values The values of the "disabled-syntax" property. 132 * @throws PropertyException 133 * If one or more of the new values are invalid. 134 */ 135 void setDisabledSyntax(Collection<String> values) throws PropertyException; 136 137 138 139 /** 140 * Gets the "java-class" property. 141 * <p> 142 * Specifies the fully-qualified name of the Java class that 143 * provides the Core Schema implementation. 144 * 145 * @return Returns the value of the "java-class" property. 146 */ 147 String getJavaClass(); 148 149 150 151 /** 152 * Sets the "java-class" property. 153 * <p> 154 * Specifies the fully-qualified name of the Java class that 155 * provides the Core Schema implementation. 156 * 157 * @param value The value of the "java-class" property. 158 * @throws PropertyException 159 * If the new value is invalid. 160 */ 161 void setJavaClass(String value) throws PropertyException; 162 163 164 165 /** 166 * Gets the "strict-format-country-string" property. 167 * <p> 168 * Indicates whether country code values are required to strictly 169 * comply with the standard definition for this syntax. 170 * <p> 171 * When set to false, country codes will not be validated and, as a 172 * result any string containing 2 characters will be acceptable. 173 * 174 * @return Returns the value of the "strict-format-country-string" property. 175 */ 176 boolean isStrictFormatCountryString(); 177 178 179 180 /** 181 * Sets the "strict-format-country-string" property. 182 * <p> 183 * Indicates whether country code values are required to strictly 184 * comply with the standard definition for this syntax. 185 * <p> 186 * When set to false, country codes will not be validated and, as a 187 * result any string containing 2 characters will be acceptable. 188 * 189 * @param value The value of the "strict-format-country-string" property. 190 * @throws PropertyException 191 * If the new value is invalid. 192 */ 193 void setStrictFormatCountryString(Boolean value) throws PropertyException; 194 195 196 197 /** 198 * Gets the "strip-syntax-min-upper-bound-attribute-type-description" property. 199 * <p> 200 * Indicates whether the suggested minimum upper bound appended to 201 * an attribute's syntax OID in it's schema definition Attribute Type 202 * Description is stripped off. 203 * <p> 204 * When retrieving the server's schema, some APIs (JNDI) fail in 205 * their syntax lookup methods, because they do not parse this value 206 * correctly. This configuration option allows the server to be 207 * configured to provide schema definitions these APIs can parse 208 * correctly. 209 * 210 * @return Returns the value of the "strip-syntax-min-upper-bound-attribute-type-description" property. 211 */ 212 boolean isStripSyntaxMinUpperBoundAttributeTypeDescription(); 213 214 215 216 /** 217 * Sets the "strip-syntax-min-upper-bound-attribute-type-description" property. 218 * <p> 219 * Indicates whether the suggested minimum upper bound appended to 220 * an attribute's syntax OID in it's schema definition Attribute Type 221 * Description is stripped off. 222 * <p> 223 * When retrieving the server's schema, some APIs (JNDI) fail in 224 * their syntax lookup methods, because they do not parse this value 225 * correctly. This configuration option allows the server to be 226 * configured to provide schema definitions these APIs can parse 227 * correctly. 228 * 229 * @param value The value of the "strip-syntax-min-upper-bound-attribute-type-description" property. 230 * @throws PropertyException 231 * If the new value is invalid. 232 */ 233 void setStripSyntaxMinUpperBoundAttributeTypeDescription(Boolean value) throws PropertyException; 234 235}