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