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.forgerock.opendj.server.config.server;
027
028
029
030import java.util.SortedSet;
031import org.forgerock.opendj.config.server.ConfigurationChangeListener;
032import org.forgerock.opendj.ldap.DN;
033
034
035
036/**
037 * A server-side interface for querying Csv File HTTP Access Log
038 * Publisher settings.
039 * <p>
040 * Csv File HTTP Access Log Publishers publish HTTP access messages to
041 * CSV files.
042 */
043public interface CsvFileHTTPAccessLogPublisherCfg extends HTTPAccessLogPublisherCfg {
044
045  /**
046   * Gets the configuration class associated with this Csv File HTTP Access Log Publisher.
047   *
048   * @return Returns the configuration class associated with this Csv File HTTP Access Log Publisher.
049   */
050  Class<? extends CsvFileHTTPAccessLogPublisherCfg> configurationClass();
051
052
053
054  /**
055   * Register to be notified when this Csv File HTTP Access Log Publisher is changed.
056   *
057   * @param listener
058   *          The Csv File HTTP Access Log Publisher configuration change listener.
059   */
060  void addCsvFileHTTPAccessChangeListener(ConfigurationChangeListener<CsvFileHTTPAccessLogPublisherCfg> listener);
061
062
063
064  /**
065   * Deregister an existing Csv File HTTP Access Log Publisher configuration change listener.
066   *
067   * @param listener
068   *          The Csv File HTTP Access Log Publisher configuration change listener.
069   */
070  void removeCsvFileHTTPAccessChangeListener(ConfigurationChangeListener<CsvFileHTTPAccessLogPublisherCfg> listener);
071
072
073
074  /**
075   * Gets the "asynchronous" property.
076   * <p>
077   * Indicates whether the Csv File HTTP Access Log Publisher will
078   * publish records asynchronously.
079   *
080   * @return Returns the value of the "asynchronous" property.
081   */
082  boolean isAsynchronous();
083
084
085
086  /**
087   * Gets the "auto-flush" property.
088   * <p>
089   * Specifies whether to flush the writer after every log record.
090   * <p>
091   * If the asynchronous writes option is used, the writer is flushed
092   * after all the log records in the queue are written.
093   *
094   * @return Returns the value of the "auto-flush" property.
095   */
096  boolean isAutoFlush();
097
098
099
100  /**
101   * Gets the "csv-delimiter-char" property.
102   * <p>
103   * The delimiter character to use when writing in CSV format.
104   *
105   * @return Returns the value of the "csv-delimiter-char" property.
106   */
107  String getCsvDelimiterChar();
108
109
110
111  /**
112   * Gets the "csv-eol-symbols" property.
113   * <p>
114   * The string that marks the end of a line.
115   *
116   * @return Returns the value of the "csv-eol-symbols" property.
117   */
118  String getCsvEolSymbols();
119
120
121
122  /**
123   * Gets the "csv-quote-char" property.
124   * <p>
125   * The character to append and prepend to a CSV field when writing
126   * in CSV format.
127   *
128   * @return Returns the value of the "csv-quote-char" property.
129   */
130  String getCsvQuoteChar();
131
132
133
134  /**
135   * Gets the "java-class" property.
136   * <p>
137   * The fully-qualified name of the Java class that provides the Csv
138   * File HTTP Access Log Publisher implementation.
139   *
140   * @return Returns the value of the "java-class" property.
141   */
142  String getJavaClass();
143
144
145
146  /**
147   * Gets the "key-store-file" property.
148   * <p>
149   * Specifies the path to the file that contains the private key
150   * information. This may be an absolute path, or a path that is
151   * relative to the OpenDJ instance root.
152   * <p>
153   * Changes to this property will take effect the next time that the
154   * key store is accessed.
155   *
156   * @return Returns the value of the "key-store-file" property.
157   */
158  String getKeyStoreFile();
159
160
161
162  /**
163   * Gets the "key-store-pin-file" property.
164   * <p>
165   * Specifies the path to the text file whose only contents should be
166   * a single line containing the clear-text PIN needed to access the
167   * Csv File HTTP Access Log Publisher .
168   *
169   * @return Returns the value of the "key-store-pin-file" property.
170   */
171  String getKeyStorePinFile();
172
173
174
175  /**
176   * Gets the "log-directory" property.
177   * <p>
178   * The directory to use for the log files generated by the Csv File
179   * HTTP Access Log Publisher. The path to the directory is relative
180   * to the server root.
181   *
182   * @return Returns the value of the "log-directory" property.
183   */
184  String getLogDirectory();
185
186
187
188  /**
189   * Gets the "retention-policy" property.
190   * <p>
191   * The retention policy to use for the Csv File HTTP Access Log
192   * Publisher .
193   * <p>
194   * When multiple policies are used, log files are cleaned when any
195   * of the policy's conditions are met.
196   *
197   * @return Returns an unmodifiable set containing the values of the "retention-policy" property.
198   */
199  SortedSet<String> getRetentionPolicy();
200
201
202
203  /**
204   * Gets the "retention-policy" property as a set of DNs.
205   * <p>
206   * The retention policy to use for the Csv File HTTP Access Log
207   * Publisher .
208   * <p>
209   * When multiple policies are used, log files are cleaned when any
210   * of the policy's conditions are met.
211   *
212   * @return Returns the DN values of the "retention-policy" property.
213   */
214  SortedSet<DN> getRetentionPolicyDNs();
215
216
217
218  /**
219   * Gets the "rotation-policy" property.
220   * <p>
221   * The rotation policy to use for the Csv File HTTP Access Log
222   * Publisher .
223   * <p>
224   * When multiple policies are used, rotation will occur if any
225   * policy's conditions are met.
226   *
227   * @return Returns an unmodifiable set containing the values of the "rotation-policy" property.
228   */
229  SortedSet<String> getRotationPolicy();
230
231
232
233  /**
234   * Gets the "rotation-policy" property as a set of DNs.
235   * <p>
236   * The rotation policy to use for the Csv File HTTP Access Log
237   * Publisher .
238   * <p>
239   * When multiple policies are used, rotation will occur if any
240   * policy's conditions are met.
241   *
242   * @return Returns the DN values of the "rotation-policy" property.
243   */
244  SortedSet<DN> getRotationPolicyDNs();
245
246
247
248  /**
249   * Gets the "signature-time-interval" property.
250   * <p>
251   * Specifies the interval at which to sign the log file when secure
252   * option is enabled.
253   *
254   * @return Returns the value of the "signature-time-interval" property.
255   */
256  long getSignatureTimeInterval();
257
258
259
260  /**
261   * Gets the "tamper-evident" property.
262   * <p>
263   * Specifies whether the log should be signed in order to detect
264   * tampering.
265   * <p>
266   * Every log record will be signed, making it possible to verify
267   * that the log has not been tampered with. This feature has a
268   * significative impact on performance of the server.
269   *
270   * @return Returns the value of the "tamper-evident" property.
271   */
272  boolean isTamperEvident();
273
274}