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.server;
027
028
029
030import org.forgerock.opendj.config.server.ConfigException;
031import org.opends.server.admin.server.ConfigurationAddListener;
032import org.opends.server.admin.server.ConfigurationChangeListener;
033import org.opends.server.admin.server.ConfigurationDeleteListener;
034import org.opends.server.admin.std.meta.AccessLogPublisherCfgDefn.FilteringPolicy;
035
036
037
038/**
039 * A server-side interface for querying Access Log Publisher settings.
040 * <p>
041 * Access Log Publishers are responsible for distributing access log
042 * messages from the access logger to a destination.
043 */
044public interface AccessLogPublisherCfg extends LogPublisherCfg {
045
046  /**
047   * Gets the configuration class associated with this Access Log Publisher.
048   *
049   * @return Returns the configuration class associated with this Access Log Publisher.
050   */
051  Class<? extends AccessLogPublisherCfg> configurationClass();
052
053
054
055  /**
056   * Register to be notified when this Access Log Publisher is changed.
057   *
058   * @param listener
059   *          The Access Log Publisher configuration change listener.
060   */
061  void addAccessChangeListener(ConfigurationChangeListener<AccessLogPublisherCfg> listener);
062
063
064
065  /**
066   * Deregister an existing Access Log Publisher configuration change listener.
067   *
068   * @param listener
069   *          The Access Log Publisher configuration change listener.
070   */
071  void removeAccessChangeListener(ConfigurationChangeListener<AccessLogPublisherCfg> listener);
072
073
074
075  /**
076   * Gets the "filtering-policy" property.
077   * <p>
078   * Specifies how filtering criteria should be applied to log
079   * records.
080   *
081   * @return Returns the value of the "filtering-policy" property.
082   */
083  FilteringPolicy getFilteringPolicy();
084
085
086
087  /**
088   * Gets the "java-class" property.
089   * <p>
090   * The fully-qualified name of the Java class that provides the
091   * Access Log Publisher implementation.
092   *
093   * @return Returns the value of the "java-class" property.
094   */
095  String getJavaClass();
096
097
098
099  /**
100   * Gets the "suppress-internal-operations" property.
101   * <p>
102   * Indicates whether internal operations (for example, operations
103   * that are initiated by plugins) should be logged along with the
104   * operations that are requested by users.
105   *
106   * @return Returns the value of the "suppress-internal-operations" property.
107   */
108  boolean isSuppressInternalOperations();
109
110
111
112  /**
113   * Gets the "suppress-synchronization-operations" property.
114   * <p>
115   * Indicates whether access messages that are generated by
116   * synchronization operations should be suppressed.
117   *
118   * @return Returns the value of the "suppress-synchronization-operations" property.
119   */
120  boolean isSuppressSynchronizationOperations();
121
122
123
124  /**
125   * Lists the Access Log Filtering Criteria.
126   *
127   * @return Returns an array containing the names of the
128   *         Access Log Filtering Criteria.
129   */
130  String[] listAccessLogFilteringCriteria();
131
132
133
134  /**
135   * Gets the named Access Log Filtering Criteria.
136   *
137   * @param name
138   *          The name of the Access Log Filtering Criteria to retrieve.
139   * @return Returns the named Access Log Filtering Criteria.
140   * @throws ConfigException
141   *           If the Access Log Filtering Criteria could not be found or it
142   *           could not be successfully decoded.
143   */
144  AccessLogFilteringCriteriaCfg getAccessLogFilteringCriteria(String name) throws ConfigException;
145
146
147
148  /**
149   * Registers to be notified when new Access Log Filtering Criteria are added.
150   *
151   * @param listener
152   *          The Access Log Filtering Criteria configuration add listener.
153   * @throws ConfigException
154   *          If the add listener could not be registered.
155   */
156  void addAccessLogFilteringCriteriaAddListener(ConfigurationAddListener<AccessLogFilteringCriteriaCfg> listener) throws ConfigException;
157
158
159
160  /**
161   * Deregisters an existing Access Log Filtering Criteria configuration add listener.
162   *
163   * @param listener
164   *          The Access Log Filtering Criteria configuration add listener.
165   */
166  void removeAccessLogFilteringCriteriaAddListener(ConfigurationAddListener<AccessLogFilteringCriteriaCfg> listener);
167
168
169
170  /**
171   * Registers to be notified when existing Access Log Filtering Criteria are deleted.
172   *
173   * @param listener
174   *          The Access Log Filtering Criteria configuration delete listener.
175   * @throws ConfigException
176   *          If the delete listener could not be registered.
177   */
178  void addAccessLogFilteringCriteriaDeleteListener(ConfigurationDeleteListener<AccessLogFilteringCriteriaCfg> listener) throws ConfigException;
179
180
181
182  /**
183   * Deregisters an existing Access Log Filtering Criteria configuration delete listener.
184   *
185   * @param listener
186   *          The Access Log Filtering Criteria configuration delete listener.
187   */
188  void removeAccessLogFilteringCriteriaDeleteListener(ConfigurationDeleteListener<AccessLogFilteringCriteriaCfg> listener);
189
190}