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.Configuration; 033 import org.opends.server.admin.server.ConfigurationChangeListener; 034 import org.opends.server.admin.std.meta.BackendCfgDefn.WritabilityMode; 035 import org.opends.server.types.DN; 036 037 038 039 /** 040 * A server-side interface for querying Backend settings. 041 * <p> 042 * Backends are responsible for providing access to the underlying 043 * data presented by the server. 044 */ 045 public interface BackendCfg extends Configuration { 046 047 /** 048 * Gets the configuration class associated with this Backend. 049 * 050 * @return Returns the configuration class associated with this Backend. 051 */ 052 Class<? extends BackendCfg> configurationClass(); 053 054 055 056 /** 057 * Register to be notified when this Backend is changed. 058 * 059 * @param listener 060 * The Backend configuration change listener. 061 */ 062 void addChangeListener(ConfigurationChangeListener<BackendCfg> listener); 063 064 065 066 /** 067 * Deregister an existing Backend configuration change listener. 068 * 069 * @param listener 070 * The Backend configuration change listener. 071 */ 072 void removeChangeListener(ConfigurationChangeListener<BackendCfg> listener); 073 074 075 076 /** 077 * Gets the "backend-id" property. 078 * <p> 079 * Specifies a name to identify the associated backend. 080 * <p> 081 * The name must be unique among all backends in the server. The 082 * backend ID may not be altered after the backend is created in the 083 * server. 084 * 085 * @return Returns the value of the "backend-id" property. 086 */ 087 String getBackendId(); 088 089 090 091 /** 092 * Gets the "base-dn" property. 093 * <p> 094 * Specifies the base DN(s) for the data that the backend handles. 095 * <p> 096 * A single backend may be responsible for one or more base DNs. 097 * Note that no two backends may have the same base DN although one 098 * backend may have a base DN that is below a base DN provided by 099 * another backend (similar to the use of sub-suffixes in the Sun 100 * Java System Directory Server). If any of the base DNs is 101 * subordinate to a base DN for another backend, then all base DNs 102 * for that backend must be subordinate to that same base DN. 103 * 104 * @return Returns an unmodifiable set containing the values of the "base-dn" property. 105 */ 106 SortedSet<DN> getBaseDN(); 107 108 109 110 /** 111 * Gets the "enabled" property. 112 * <p> 113 * Indicates whether the backend is enabled in the server. 114 * <p> 115 * If a backend is not enabled, then its contents are not accessible 116 * when processing operations. 117 * 118 * @return Returns the value of the "enabled" property. 119 */ 120 boolean isEnabled(); 121 122 123 124 /** 125 * Gets the "java-class" property. 126 * <p> 127 * Specifies the fully-qualified name of the Java class that 128 * provides the backend implementation. 129 * 130 * @return Returns the value of the "java-class" property. 131 */ 132 String getJavaClass(); 133 134 135 136 /** 137 * Gets the "writability-mode" property. 138 * <p> 139 * Specifies the behavior that the backend should use when 140 * processing write operations. 141 * 142 * @return Returns the value of the "writability-mode" property. 143 */ 144 WritabilityMode getWritabilityMode(); 145 146 }