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.client; 027 028 029 030import java.util.Collection; 031import java.util.SortedSet; 032import org.opends.server.admin.ConfigurationClient; 033import org.opends.server.admin.ManagedObjectDefinition; 034import org.opends.server.admin.PropertyException; 035import org.opends.server.admin.std.meta.BackendCfgDefn.WritabilityMode; 036import org.opends.server.admin.std.server.BackendCfg; 037import org.opends.server.types.DN; 038 039 040 041/** 042 * A client-side interface for reading and modifying Backend settings. 043 * <p> 044 * Backends are responsible for providing access to the underlying 045 * data presented by the server. 046 */ 047public interface BackendCfgClient extends ConfigurationClient { 048 049 /** 050 * Get the configuration definition associated with this Backend. 051 * 052 * @return Returns the configuration definition associated with this Backend. 053 */ 054 ManagedObjectDefinition<? extends BackendCfgClient, ? extends BackendCfg> definition(); 055 056 057 058 /** 059 * Gets the "backend-id" property. 060 * <p> 061 * Specifies a name to identify the associated backend. 062 * <p> 063 * The name must be unique among all backends in the server. The 064 * backend ID may not be altered after the backend is created in the 065 * server. 066 * 067 * @return Returns the value of the "backend-id" property. 068 */ 069 String getBackendId(); 070 071 072 073 /** 074 * Sets the "backend-id" property. 075 * <p> 076 * Specifies a name to identify the associated backend. 077 * <p> 078 * The name must be unique among all backends in the server. The 079 * backend ID may not be altered after the backend is created in the 080 * server. 081 * <p> 082 * This property is read-only and can only be modified during 083 * creation of a Backend. 084 * 085 * @param value The value of the "backend-id" property. 086 * @throws PropertyException 087 * If the new value is invalid. 088 * @throws PropertyException 089 * If this Backend is not being initialized. 090 */ 091 void setBackendId(String value) throws PropertyException, PropertyException; 092 093 094 095 /** 096 * Gets the "base-dn" property. 097 * <p> 098 * Specifies the base DN(s) for the data that the backend handles. 099 * <p> 100 * A single backend may be responsible for one or more base DNs. 101 * Note that no two backends may have the same base DN although one 102 * backend may have a base DN that is below a base DN provided by 103 * another backend (similar to the use of sub-suffixes in the Sun 104 * Java System Directory Server). If any of the base DNs is 105 * subordinate to a base DN for another backend, then all base DNs 106 * for that backend must be subordinate to that same base DN. 107 * 108 * @return Returns the values of the "base-dn" property. 109 */ 110 SortedSet<DN> getBaseDN(); 111 112 113 114 /** 115 * Sets the "base-dn" property. 116 * <p> 117 * Specifies the base DN(s) for the data that the backend handles. 118 * <p> 119 * A single backend may be responsible for one or more base DNs. 120 * Note that no two backends may have the same base DN although one 121 * backend may have a base DN that is below a base DN provided by 122 * another backend (similar to the use of sub-suffixes in the Sun 123 * Java System Directory Server). If any of the base DNs is 124 * subordinate to a base DN for another backend, then all base DNs 125 * for that backend must be subordinate to that same base DN. 126 * 127 * @param values The values of the "base-dn" property. 128 * @throws PropertyException 129 * If one or more of the new values are invalid. 130 */ 131 void setBaseDN(Collection<DN> values) throws PropertyException; 132 133 134 135 /** 136 * Gets the "enabled" property. 137 * <p> 138 * Indicates whether the backend is enabled in the server. 139 * <p> 140 * If a backend is not enabled, then its contents are not accessible 141 * when processing operations. 142 * 143 * @return Returns the value of the "enabled" property. 144 */ 145 Boolean isEnabled(); 146 147 148 149 /** 150 * Sets the "enabled" property. 151 * <p> 152 * Indicates whether the backend is enabled in the server. 153 * <p> 154 * If a backend is not enabled, then its contents are not accessible 155 * when processing operations. 156 * 157 * @param value The value of the "enabled" property. 158 * @throws PropertyException 159 * If the new value is invalid. 160 */ 161 void setEnabled(boolean value) throws PropertyException; 162 163 164 165 /** 166 * Gets the "java-class" property. 167 * <p> 168 * Specifies the fully-qualified name of the Java class that 169 * provides the backend implementation. 170 * 171 * @return Returns the value of the "java-class" property. 172 */ 173 String getJavaClass(); 174 175 176 177 /** 178 * Sets the "java-class" property. 179 * <p> 180 * Specifies the fully-qualified name of the Java class that 181 * provides the backend implementation. 182 * 183 * @param value The value of the "java-class" property. 184 * @throws PropertyException 185 * If the new value is invalid. 186 */ 187 void setJavaClass(String value) throws PropertyException; 188 189 190 191 /** 192 * Gets the "writability-mode" property. 193 * <p> 194 * Specifies the behavior that the backend should use when 195 * processing write operations. 196 * 197 * @return Returns the value of the "writability-mode" property. 198 */ 199 WritabilityMode getWritabilityMode(); 200 201 202 203 /** 204 * Sets the "writability-mode" property. 205 * <p> 206 * Specifies the behavior that the backend should use when 207 * processing write operations. 208 * 209 * @param value The value of the "writability-mode" property. 210 * @throws PropertyException 211 * If the new value is invalid. 212 */ 213 void setWritabilityMode(WritabilityMode value) throws PropertyException; 214 215}