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