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.BackendIndexCfgDefn.IndexType; 036import org.opends.server.admin.std.server.BackendIndexCfg; 037import org.opends.server.types.AttributeType; 038 039 040 041/** 042 * A client-side interface for reading and modifying Backend Index 043 * settings. 044 * <p> 045 * Backend Indexes are used to store information that makes it 046 * possible to locate entries very quickly when processing search 047 * operations. 048 */ 049public interface BackendIndexCfgClient extends ConfigurationClient { 050 051 /** 052 * Get the configuration definition associated with this Backend Index. 053 * 054 * @return Returns the configuration definition associated with this Backend Index. 055 */ 056 ManagedObjectDefinition<? extends BackendIndexCfgClient, ? extends BackendIndexCfg> definition(); 057 058 059 060 /** 061 * Gets the "attribute" property. 062 * <p> 063 * Specifies the name of the attribute for which the index is to be 064 * maintained. 065 * 066 * @return Returns the value of the "attribute" property. 067 */ 068 AttributeType getAttribute(); 069 070 071 072 /** 073 * Sets the "attribute" property. 074 * <p> 075 * Specifies the name of the attribute for which the index is to be 076 * maintained. 077 * <p> 078 * This property is read-only and can only be modified during 079 * creation of a Backend Index. 080 * 081 * @param value The value of the "attribute" property. 082 * @throws PropertyException 083 * If the new value is invalid. 084 * @throws PropertyException 085 * If this Backend Index is not being initialized. 086 */ 087 void setAttribute(AttributeType value) throws PropertyException, PropertyException; 088 089 090 091 /** 092 * Gets the "index-entry-limit" property. 093 * <p> 094 * Specifies the maximum number of entries that are allowed to match 095 * a given index key before that particular index key is no longer 096 * maintained. 097 * <p> 098 * This is analogous to the ALL IDs threshold in the Sun Java System 099 * Directory Server. If this is specified, its value overrides the JE 100 * backend-wide configuration. For no limit, use 0 for the value. 101 * 102 * @return Returns the value of the "index-entry-limit" property. 103 */ 104 Integer getIndexEntryLimit(); 105 106 107 108 /** 109 * Sets the "index-entry-limit" property. 110 * <p> 111 * Specifies the maximum number of entries that are allowed to match 112 * a given index key before that particular index key is no longer 113 * maintained. 114 * <p> 115 * This is analogous to the ALL IDs threshold in the Sun Java System 116 * Directory Server. If this is specified, its value overrides the JE 117 * backend-wide configuration. For no limit, use 0 for the value. 118 * 119 * @param value The value of the "index-entry-limit" property. 120 * @throws PropertyException 121 * If the new value is invalid. 122 */ 123 void setIndexEntryLimit(Integer value) throws PropertyException; 124 125 126 127 /** 128 * Gets the "index-extensible-matching-rule" property. 129 * <p> 130 * The extensible matching rule in an extensible index. 131 * <p> 132 * An extensible matching rule must be specified using either LOCALE 133 * or OID of the matching rule. 134 * 135 * @return Returns the values of the "index-extensible-matching-rule" property. 136 */ 137 SortedSet<String> getIndexExtensibleMatchingRule(); 138 139 140 141 /** 142 * Sets the "index-extensible-matching-rule" property. 143 * <p> 144 * The extensible matching rule in an extensible index. 145 * <p> 146 * An extensible matching rule must be specified using either LOCALE 147 * or OID of the matching rule. 148 * 149 * @param values The values of the "index-extensible-matching-rule" property. 150 * @throws PropertyException 151 * If one or more of the new values are invalid. 152 */ 153 void setIndexExtensibleMatchingRule(Collection<String> values) throws PropertyException; 154 155 156 157 /** 158 * Gets the "index-type" property. 159 * <p> 160 * Specifies the type(s) of indexing that should be performed for 161 * the associated attribute. 162 * <p> 163 * For equality, presence, and substring index types, the associated 164 * attribute type must have a corresponding matching rule. 165 * 166 * @return Returns the values of the "index-type" property. 167 */ 168 SortedSet<IndexType> getIndexType(); 169 170 171 172 /** 173 * Sets the "index-type" property. 174 * <p> 175 * Specifies the type(s) of indexing that should be performed for 176 * the associated attribute. 177 * <p> 178 * For equality, presence, and substring index types, the associated 179 * attribute type must have a corresponding matching rule. 180 * 181 * @param values The values of the "index-type" property. 182 * @throws PropertyException 183 * If one or more of the new values are invalid. 184 */ 185 void setIndexType(Collection<IndexType> values) throws PropertyException; 186 187 188 189 /** 190 * Gets the "substring-length" property. 191 * <p> 192 * The length of substrings in a substring index. 193 * 194 * @return Returns the value of the "substring-length" property. 195 */ 196 int getSubstringLength(); 197 198 199 200 /** 201 * Sets the "substring-length" property. 202 * <p> 203 * The length of substrings in a substring index. 204 * 205 * @param value The value of the "substring-length" property. 206 * @throws PropertyException 207 * If the new value is invalid. 208 */ 209 void setSubstringLength(Integer value) throws PropertyException; 210 211}