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.ldap.DN; 025import org.forgerock.opendj.server.config.meta.BackendCfgDefn.WritabilityMode; 026import org.forgerock.opendj.server.config.server.SchemaBackendCfg; 027 028 029 030/** 031 * A client-side interface for reading and modifying Schema Backend 032 * settings. 033 * <p> 034 * The Schema Backend provides access to the directory server schema 035 * information, including the attribute types, object classes, 036 * attribute syntaxes, matching rules, matching rule uses, DIT content 037 * rules, and DIT structure rules that it contains. 038 */ 039public interface SchemaBackendCfgClient extends BackendCfgClient { 040 041 /** 042 * Get the configuration definition associated with this Schema Backend. 043 * 044 * @return Returns the configuration definition associated with this Schema Backend. 045 */ 046 ManagedObjectDefinition<? extends SchemaBackendCfgClient, ? extends SchemaBackendCfg> definition(); 047 048 049 050 /** 051 * Gets the "java-class" property. 052 * <p> 053 * Specifies the fully-qualified name of the Java class that 054 * provides the backend implementation. 055 * 056 * @return Returns the value of the "java-class" property. 057 */ 058 String getJavaClass(); 059 060 061 062 /** 063 * Sets the "java-class" property. 064 * <p> 065 * Specifies the fully-qualified name of the Java class that 066 * provides the backend implementation. 067 * 068 * @param value The value of the "java-class" property. 069 * @throws PropertyException 070 * If the new value is invalid. 071 */ 072 void setJavaClass(String value) throws PropertyException; 073 074 075 076 /** 077 * Gets the "schema-entry-dn" property. 078 * <p> 079 * Defines the base DNs of the subtrees in which the schema 080 * information is published in addition to the value included in the 081 * base-dn property. 082 * <p> 083 * The value provided in the base-dn property is the only one that 084 * appears in the subschemaSubentry operational attribute of the 085 * server's root DSE (which is necessary because that is a 086 * single-valued attribute) and as a virtual attribute in other 087 * entries. The schema-entry-dn attribute may be used to make the 088 * schema information available in other locations to accommodate 089 * certain client applications that have been hard-coded to expect 090 * the schema to reside in a specific location. 091 * 092 * @return Returns the values of the "schema-entry-dn" property. 093 */ 094 SortedSet<DN> getSchemaEntryDN(); 095 096 097 098 /** 099 * Sets the "schema-entry-dn" property. 100 * <p> 101 * Defines the base DNs of the subtrees in which the schema 102 * information is published in addition to the value included in the 103 * base-dn property. 104 * <p> 105 * The value provided in the base-dn property is the only one that 106 * appears in the subschemaSubentry operational attribute of the 107 * server's root DSE (which is necessary because that is a 108 * single-valued attribute) and as a virtual attribute in other 109 * entries. The schema-entry-dn attribute may be used to make the 110 * schema information available in other locations to accommodate 111 * certain client applications that have been hard-coded to expect 112 * the schema to reside in a specific location. 113 * 114 * @param values The values of the "schema-entry-dn" property. 115 * @throws PropertyException 116 * If one or more of the new values are invalid. 117 */ 118 void setSchemaEntryDN(Collection<DN> values) throws PropertyException; 119 120 121 122 /** 123 * Gets the "show-all-attributes" property. 124 * <p> 125 * Indicates whether to treat all attributes in the schema entry as 126 * if they were user attributes regardless of their configuration. 127 * <p> 128 * This may provide compatibility with some applications that expect 129 * schema attributes like attributeTypes and objectClasses to be 130 * included by default even if they are not requested. Note that the 131 * ldapSyntaxes attribute is always treated as operational in order 132 * to avoid problems with attempts to modify the schema over 133 * protocol. 134 * 135 * @return Returns the value of the "show-all-attributes" property. 136 */ 137 Boolean isShowAllAttributes(); 138 139 140 141 /** 142 * Sets the "show-all-attributes" property. 143 * <p> 144 * Indicates whether to treat all attributes in the schema entry as 145 * if they were user attributes regardless of their configuration. 146 * <p> 147 * This may provide compatibility with some applications that expect 148 * schema attributes like attributeTypes and objectClasses to be 149 * included by default even if they are not requested. Note that the 150 * ldapSyntaxes attribute is always treated as operational in order 151 * to avoid problems with attempts to modify the schema over 152 * protocol. 153 * 154 * @param value The value of the "show-all-attributes" property. 155 * @throws PropertyException 156 * If the new value is invalid. 157 */ 158 void setShowAllAttributes(boolean value) throws PropertyException; 159 160 161 162 /** 163 * Gets the "writability-mode" property. 164 * <p> 165 * Specifies the behavior that the backend should use when 166 * processing write operations. 167 * 168 * @return Returns the value of the "writability-mode" property. 169 */ 170 WritabilityMode getWritabilityMode(); 171 172 173 174 /** 175 * Sets the "writability-mode" property. 176 * <p> 177 * Specifies the behavior that the backend should use when 178 * processing write operations. 179 * 180 * @param value The value of the "writability-mode" property. 181 * @throws PropertyException 182 * If the new value is invalid. 183 */ 184 void setWritabilityMode(WritabilityMode value) throws PropertyException; 185 186}