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;
022
023
024
025/**
026 * A server-side interface for querying Core Schema settings.
027 * <p>
028 * Core Schema define the core schema elements to load.
029 */
030public interface CoreSchemaCfg extends SchemaProviderCfg {
031
032  /**
033   * Gets the configuration class associated with this Core Schema.
034   *
035   * @return Returns the configuration class associated with this Core Schema.
036   */
037  Class<? extends CoreSchemaCfg> configurationClass();
038
039
040
041  /**
042   * Register to be notified when this Core Schema is changed.
043   *
044   * @param listener
045   *          The Core Schema configuration change listener.
046   */
047  void addCoreSchemaChangeListener(ConfigurationChangeListener<CoreSchemaCfg> listener);
048
049
050
051  /**
052   * Deregister an existing Core Schema configuration change listener.
053   *
054   * @param listener
055   *          The Core Schema configuration change listener.
056   */
057  void removeCoreSchemaChangeListener(ConfigurationChangeListener<CoreSchemaCfg> listener);
058
059
060
061  /**
062   * Gets 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   * @return Returns the value of the "allow-zero-length-values-directory-string" property.
072   */
073  boolean isAllowZeroLengthValuesDirectoryString();
074
075
076
077  /**
078   * Gets the "disabled-matching-rule" property.
079   * <p>
080   * The set of disabled matching rules.
081   * <p>
082   * Matching rules must be specified using the syntax: OID, or use
083   * the default value 'NONE' to specify no value.
084   *
085   * @return Returns an unmodifiable set containing the values of the "disabled-matching-rule" property.
086   */
087  SortedSet<String> getDisabledMatchingRule();
088
089
090
091  /**
092   * Gets the "disabled-syntax" property.
093   * <p>
094   * The set of disabled syntaxes.
095   * <p>
096   * Syntaxes must be specified using the syntax: OID, or use the
097   * default value 'NONE' to specify no value.
098   *
099   * @return Returns an unmodifiable set containing the values of the "disabled-syntax" property.
100   */
101  SortedSet<String> getDisabledSyntax();
102
103
104
105  /**
106   * Gets the "java-class" property.
107   * <p>
108   * Specifies the fully-qualified name of the Java class that
109   * provides the Core Schema implementation.
110   *
111   * @return Returns the value of the "java-class" property.
112   */
113  String getJavaClass();
114
115
116
117  /**
118   * Gets the "strict-format-country-string" property.
119   * <p>
120   * Indicates whether country code values are required to strictly
121   * comply with the standard definition for this syntax.
122   * <p>
123   * When set to false, country codes will not be validated and, as a
124   * result any string containing 2 characters will be acceptable.
125   *
126   * @return Returns the value of the "strict-format-country-string" property.
127   */
128  boolean isStrictFormatCountryString();
129
130
131
132  /**
133   * Gets the "strip-syntax-min-upper-bound-attribute-type-description" property.
134   * <p>
135   * Indicates whether the suggested minimum upper bound appended to
136   * an attribute's syntax OID in it's schema definition Attribute Type
137   * Description is stripped off.
138   * <p>
139   * When retrieving the server's schema, some APIs (JNDI) fail in
140   * their syntax lookup methods, because they do not parse this value
141   * correctly. This configuration option allows the server to be
142   * configured to provide schema definitions these APIs can parse
143   * correctly.
144   *
145   * @return Returns the value of the "strip-syntax-min-upper-bound-attribute-type-description" property.
146   */
147  boolean isStripSyntaxMinUpperBoundAttributeTypeDescription();
148
149}