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.server.config.meta.BackendCfgDefn.WritabilityMode;
024
025
026
027/**
028 * A server-side interface for querying Schema Backend settings.
029 * <p>
030 * The Schema Backend provides access to the directory server schema
031 * information, including the attribute types, object classes,
032 * attribute syntaxes, matching rules, matching rule uses, DIT content
033 * rules, and DIT structure rules that it contains.
034 */
035public interface SchemaBackendCfg extends BackendCfg {
036
037  /**
038   * Gets the configuration class associated with this Schema Backend.
039   *
040   * @return Returns the configuration class associated with this Schema Backend.
041   */
042  Class<? extends SchemaBackendCfg> configurationClass();
043
044
045
046  /**
047   * Register to be notified when this Schema Backend is changed.
048   *
049   * @param listener
050   *          The Schema Backend configuration change listener.
051   */
052  void addSchemaChangeListener(ConfigurationChangeListener<SchemaBackendCfg> listener);
053
054
055
056  /**
057   * Deregister an existing Schema Backend configuration change listener.
058   *
059   * @param listener
060   *          The Schema Backend configuration change listener.
061   */
062  void removeSchemaChangeListener(ConfigurationChangeListener<SchemaBackendCfg> listener);
063
064
065
066  /**
067   * Gets the "java-class" property.
068   * <p>
069   * Specifies the fully-qualified name of the Java class that
070   * provides the backend implementation.
071   *
072   * @return Returns the value of the "java-class" property.
073   */
074  String getJavaClass();
075
076
077
078  /**
079   * Gets the "schema-entry-dn" property.
080   * <p>
081   * Defines the base DNs of the subtrees in which the schema
082   * information is published in addition to the value included in the
083   * base-dn property.
084   * <p>
085   * The value provided in the base-dn property is the only one that
086   * appears in the subschemaSubentry operational attribute of the
087   * server's root DSE (which is necessary because that is a
088   * single-valued attribute) and as a virtual attribute in other
089   * entries. The schema-entry-dn attribute may be used to make the
090   * schema information available in other locations to accommodate
091   * certain client applications that have been hard-coded to expect
092   * the schema to reside in a specific location.
093   *
094   * @return Returns an unmodifiable set containing the values of the "schema-entry-dn" property.
095   */
096  SortedSet<DN> getSchemaEntryDN();
097
098
099
100  /**
101   * Gets the "show-all-attributes" property.
102   * <p>
103   * Indicates whether to treat all attributes in the schema entry as
104   * if they were user attributes regardless of their configuration.
105   * <p>
106   * This may provide compatibility with some applications that expect
107   * schema attributes like attributeTypes and objectClasses to be
108   * included by default even if they are not requested. Note that the
109   * ldapSyntaxes attribute is always treated as operational in order
110   * to avoid problems with attempts to modify the schema over
111   * protocol.
112   *
113   * @return Returns the value of the "show-all-attributes" property.
114   */
115  boolean isShowAllAttributes();
116
117
118
119  /**
120   * Gets the "writability-mode" property.
121   * <p>
122   * Specifies the behavior that the backend should use when
123   * processing write operations.
124   *
125   * @return Returns the value of the "writability-mode" property.
126   */
127  WritabilityMode getWritabilityMode();
128
129}