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.server;
017
018
019
020import org.forgerock.opendj.config.Configuration;
021import org.forgerock.opendj.config.server.ConfigurationChangeListener;
022import org.forgerock.opendj.ldap.DN;
023import org.forgerock.opendj.server.config.meta.BackendVLVIndexCfgDefn.Scope;
024
025
026
027/**
028 * A server-side interface for querying Backend VLV Index settings.
029 * <p>
030 * Backend VLV Indexes are used to store information about a specific
031 * search request that makes it possible to efficiently process them
032 * using the VLV control.
033 */
034public interface BackendVLVIndexCfg extends Configuration {
035
036  /**
037   * Gets the configuration class associated with this Backend VLV Index.
038   *
039   * @return Returns the configuration class associated with this Backend VLV Index.
040   */
041  Class<? extends BackendVLVIndexCfg> configurationClass();
042
043
044
045  /**
046   * Register to be notified when this Backend VLV Index is changed.
047   *
048   * @param listener
049   *          The Backend VLV Index configuration change listener.
050   */
051  void addChangeListener(ConfigurationChangeListener<BackendVLVIndexCfg> listener);
052
053
054
055  /**
056   * Deregister an existing Backend VLV Index configuration change listener.
057   *
058   * @param listener
059   *          The Backend VLV Index configuration change listener.
060   */
061  void removeChangeListener(ConfigurationChangeListener<BackendVLVIndexCfg> listener);
062
063
064
065  /**
066   * Gets the "base-dn" property.
067   * <p>
068   * Specifies the base DN used in the search query that is being
069   * indexed.
070   *
071   * @return Returns the value of the "base-dn" property.
072   */
073  DN getBaseDN();
074
075
076
077  /**
078   * Gets the "filter" property.
079   * <p>
080   * Specifies the LDAP filter used in the query that is being
081   * indexed.
082   *
083   * @return Returns the value of the "filter" property.
084   */
085  String getFilter();
086
087
088
089  /**
090   * Gets the "name" property.
091   * <p>
092   * Specifies a unique name for this VLV index.
093   *
094   * @return Returns the value of the "name" property.
095   */
096  String getName();
097
098
099
100  /**
101   * Gets the "scope" property.
102   * <p>
103   * Specifies the LDAP scope of the query that is being indexed.
104   *
105   * @return Returns the value of the "scope" property.
106   */
107  Scope getScope();
108
109
110
111  /**
112   * Gets the "sort-order" property.
113   * <p>
114   * Specifies the names of the attributes that are used to sort the
115   * entries for the query being indexed.
116   * <p>
117   * Multiple attributes can be used to determine the sort order by
118   * listing the attribute names from highest to lowest precedence.
119   * Optionally, + or - can be prefixed to the attribute name to sort
120   * the attribute in ascending order or descending order respectively.
121   *
122   * @return Returns the value of the "sort-order" property.
123   */
124  String getSortOrder();
125
126}