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