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 java.util.SortedSet;
021import org.forgerock.opendj.config.server.ConfigurationChangeListener;
022import org.forgerock.opendj.ldap.DN;
023
024
025
026/**
027 * A server-side interface for querying File Based Audit Log Publisher
028 * settings.
029 * <p>
030 * File Based Audit Log Publishers publish access messages to the file
031 * system.
032 */
033public interface FileBasedAuditLogPublisherCfg extends AccessLogPublisherCfg {
034
035  /**
036   * Gets the configuration class associated with this File Based Audit Log Publisher.
037   *
038   * @return Returns the configuration class associated with this File Based Audit Log Publisher.
039   */
040  Class<? extends FileBasedAuditLogPublisherCfg> configurationClass();
041
042
043
044  /**
045   * Register to be notified when this File Based Audit Log Publisher is changed.
046   *
047   * @param listener
048   *          The File Based Audit Log Publisher configuration change listener.
049   */
050  void addFileBasedAuditChangeListener(ConfigurationChangeListener<FileBasedAuditLogPublisherCfg> listener);
051
052
053
054  /**
055   * Deregister an existing File Based Audit Log Publisher configuration change listener.
056   *
057   * @param listener
058   *          The File Based Audit Log Publisher configuration change listener.
059   */
060  void removeFileBasedAuditChangeListener(ConfigurationChangeListener<FileBasedAuditLogPublisherCfg> listener);
061
062
063
064  /**
065   * Gets the "append" property.
066   * <p>
067   * Specifies whether to append to existing log files.
068   *
069   * @return Returns the value of the "append" property.
070   */
071  boolean isAppend();
072
073
074
075  /**
076   * Gets the "asynchronous" property.
077   * <p>
078   * Indicates whether the File Based Audit Log Publisher will publish
079   * records asynchronously.
080   *
081   * @return Returns the value of the "asynchronous" property.
082   */
083  boolean isAsynchronous();
084
085
086
087  /**
088   * Gets the "auto-flush" property.
089   * <p>
090   * Specifies whether to flush the writer after every log record.
091   * <p>
092   * If the asynchronous writes option is used, the writer is flushed
093   * after all the log records in the queue are written.
094   *
095   * @return Returns the value of the "auto-flush" property.
096   */
097  boolean isAutoFlush();
098
099
100
101  /**
102   * Gets the "buffer-size" property.
103   * <p>
104   * Specifies the log file buffer size.
105   *
106   * @return Returns the value of the "buffer-size" property.
107   */
108  long getBufferSize();
109
110
111
112  /**
113   * Gets the "java-class" property.
114   * <p>
115   * The fully-qualified name of the Java class that provides the File
116   * Based Audit Log Publisher implementation.
117   *
118   * @return Returns the value of the "java-class" property.
119   */
120  String getJavaClass();
121
122
123
124  /**
125   * Gets the "log-file" property.
126   * <p>
127   * The file name to use for the log files generated by the File
128   * Based Audit Log Publisher. The path to the file is relative to the
129   * server root.
130   *
131   * @return Returns the value of the "log-file" property.
132   */
133  String getLogFile();
134
135
136
137  /**
138   * Gets the "log-file-permissions" property.
139   * <p>
140   * The UNIX permissions of the log files created by this File Based
141   * Audit Log Publisher.
142   *
143   * @return Returns the value of the "log-file-permissions" property.
144   */
145  String getLogFilePermissions();
146
147
148
149  /**
150   * Gets the "queue-size" property.
151   * <p>
152   * The maximum number of log records that can be stored in the
153   * asynchronous queue.
154   *
155   * @return Returns the value of the "queue-size" property.
156   */
157  int getQueueSize();
158
159
160
161  /**
162   * Gets the "retention-policy" property.
163   * <p>
164   * The retention policy to use for the File Based Audit Log
165   * Publisher .
166   * <p>
167   * When multiple policies are used, log files are cleaned when any
168   * of the policy's conditions are met.
169   *
170   * @return Returns an unmodifiable set containing the values of the "retention-policy" property.
171   */
172  SortedSet<String> getRetentionPolicy();
173
174
175
176  /**
177   * Gets the "retention-policy" property as a set of DNs.
178   * <p>
179   * The retention policy to use for the File Based Audit Log
180   * Publisher .
181   * <p>
182   * When multiple policies are used, log files are cleaned when any
183   * of the policy's conditions are met.
184   *
185   * @return Returns the DN values of the "retention-policy" property.
186   */
187  SortedSet<DN> getRetentionPolicyDNs();
188
189
190
191  /**
192   * Gets the "rotation-policy" property.
193   * <p>
194   * The rotation policy to use for the File Based Audit Log Publisher
195   * .
196   * <p>
197   * When multiple policies are used, rotation will occur if any
198   * policy's conditions are met.
199   *
200   * @return Returns an unmodifiable set containing the values of the "rotation-policy" property.
201   */
202  SortedSet<String> getRotationPolicy();
203
204
205
206  /**
207   * Gets the "rotation-policy" property as a set of DNs.
208   * <p>
209   * The rotation policy to use for the File Based Audit Log Publisher
210   * .
211   * <p>
212   * When multiple policies are used, rotation will occur if any
213   * policy's conditions are met.
214   *
215   * @return Returns the DN values of the "rotation-policy" property.
216   */
217  SortedSet<DN> getRotationPolicyDNs();
218
219
220
221  /**
222   * Gets the "time-interval" property.
223   * <p>
224   * Specifies the interval at which to check whether the log files
225   * need to be rotated.
226   *
227   * @return Returns the value of the "time-interval" property.
228   */
229  long getTimeInterval();
230
231}