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
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.admin.std.server;
028
029
030
031 import java.util.SortedSet;
032 import org.opends.server.admin.server.ConfigurationChangeListener;
033 import org.opends.server.admin.std.meta.BackendCfgDefn.WritabilityMode;
034 import org.opends.server.types.DN;
035
036
037
038 /**
039 * A server-side interface for querying Schema Backend settings.
040 * <p>
041 * The Schema Backend provides access to the Directory Server schema
042 * information, including the attribute types, object classes,
043 * attribute syntaxes, matching rules, matching rule uses, DIT content
044 * rules, and DIT structure rules that it contains.
045 */
046 public interface SchemaBackendCfg extends BackendCfg {
047
048 /**
049 * Gets the configuration class associated with this Schema Backend.
050 *
051 * @return Returns the configuration class associated with this Schema Backend.
052 */
053 Class<? extends SchemaBackendCfg> configurationClass();
054
055
056
057 /**
058 * Register to be notified when this Schema Backend is changed.
059 *
060 * @param listener
061 * The Schema Backend configuration change listener.
062 */
063 void addSchemaChangeListener(ConfigurationChangeListener<SchemaBackendCfg> listener);
064
065
066
067 /**
068 * Deregister an existing Schema Backend configuration change listener.
069 *
070 * @param listener
071 * The Schema Backend configuration change listener.
072 */
073 void removeSchemaChangeListener(ConfigurationChangeListener<SchemaBackendCfg> listener);
074
075
076
077 /**
078 * Gets the "java-class" property.
079 * <p>
080 * Specifies the fully-qualified name of the Java class that
081 * provides the backend implementation.
082 *
083 * @return Returns the value of the "java-class" property.
084 */
085 String getJavaClass();
086
087
088
089 /**
090 * Gets the "schema-entry-dn" property.
091 * <p>
092 * Defines the base DNs of the subtrees in which the schema
093 * information is published in addition to the value included in the
094 * base-dn property.
095 * <p>
096 * The value provided in the base-dn property is the only one that
097 * appears in the subschemaSubentry operational attribute of the
098 * server's root DSE (which is necessary because that is a
099 * single-valued attribute) and as a virtual attribute in other
100 * entries. The schema-entry-dn attribute may be used to make the
101 * schema information available in other locations to accommodate
102 * certain client applications that have been hard-coded to expect
103 * the schema to reside in a specific location.
104 *
105 * @return Returns an unmodifiable set containing the values of the "schema-entry-dn" property.
106 */
107 SortedSet<DN> getSchemaEntryDN();
108
109
110
111 /**
112 * Gets the "show-all-attributes" property.
113 * <p>
114 * Indicates whether to treat all attributes in the schema entry as
115 * if they were user attributes regardless of their configuration.
116 * <p>
117 * This may provide compatibility with some applications that expect
118 * schema attributes like attributeTypes and objectClasses to be
119 * included by default even if they are not requested. Note that the
120 * ldapSyntaxes attribute is always treated as operational in order
121 * to avoid problems with attempts to modify the schema over
122 * protocol.
123 *
124 * @return Returns the value of the "show-all-attributes" property.
125 */
126 boolean isShowAllAttributes();
127
128
129
130 /**
131 * Gets the "writability-mode" property.
132 * <p>
133 * Specifies the behavior that the backend should use when
134 * processing write operations.
135 *
136 * @return Returns the value of the "writability-mode" property.
137 */
138 WritabilityMode getWritabilityMode();
139
140 }