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.client;
027
028
029
030import java.util.Collection;
031import java.util.SortedSet;
032import org.opends.server.admin.ManagedObjectDefinition;
033import org.opends.server.admin.PropertyException;
034import org.opends.server.admin.std.server.FileBasedHTTPAccessLogPublisherCfg;
035
036
037
038/**
039 * A client-side interface for reading and modifying File Based HTTP
040 * Access Log Publisher settings.
041 * <p>
042 * File Based HTTP Access Log Publishers publish HTTP access messages
043 * to the file system.
044 */
045public interface FileBasedHTTPAccessLogPublisherCfgClient extends HTTPAccessLogPublisherCfgClient {
046
047  /**
048   * Get the configuration definition associated with this File Based HTTP Access Log Publisher.
049   *
050   * @return Returns the configuration definition associated with this File Based HTTP Access Log Publisher.
051   */
052  ManagedObjectDefinition<? extends FileBasedHTTPAccessLogPublisherCfgClient, ? extends FileBasedHTTPAccessLogPublisherCfg> definition();
053
054
055
056  /**
057   * Gets the "append" property.
058   * <p>
059   * Specifies whether to append to existing log files.
060   *
061   * @return Returns the value of the "append" property.
062   */
063  boolean isAppend();
064
065
066
067  /**
068   * Sets the "append" property.
069   * <p>
070   * Specifies whether to append to existing log files.
071   *
072   * @param value The value of the "append" property.
073   * @throws PropertyException
074   *           If the new value is invalid.
075   */
076  void setAppend(Boolean value) throws PropertyException;
077
078
079
080  /**
081   * Gets the "asynchronous" property.
082   * <p>
083   * Indicates whether the File Based HTTP Access Log Publisher will
084   * publish records asynchronously.
085   *
086   * @return Returns the value of the "asynchronous" property.
087   */
088  boolean isAsynchronous();
089
090
091
092  /**
093   * Sets the "asynchronous" property.
094   * <p>
095   * Indicates whether the File Based HTTP Access Log Publisher will
096   * publish records asynchronously.
097   *
098   * @param value The value of the "asynchronous" property.
099   * @throws PropertyException
100   *           If the new value is invalid.
101   */
102  void setAsynchronous(boolean value) throws PropertyException;
103
104
105
106  /**
107   * Gets the "auto-flush" property.
108   * <p>
109   * Specifies whether to flush the writer after every log record.
110   * <p>
111   * If the asynchronous writes option is used, the writer is flushed
112   * after all the log records in the queue are written.
113   *
114   * @return Returns the value of the "auto-flush" property.
115   */
116  boolean isAutoFlush();
117
118
119
120  /**
121   * Sets the "auto-flush" property.
122   * <p>
123   * Specifies whether to flush the writer after every log record.
124   * <p>
125   * If the asynchronous writes option is used, the writer is flushed
126   * after all the log records in the queue are written.
127   *
128   * @param value The value of the "auto-flush" property.
129   * @throws PropertyException
130   *           If the new value is invalid.
131   */
132  void setAutoFlush(Boolean value) throws PropertyException;
133
134
135
136  /**
137   * Gets the "buffer-size" property.
138   * <p>
139   * Specifies the log file buffer size.
140   *
141   * @return Returns the value of the "buffer-size" property.
142   */
143  long getBufferSize();
144
145
146
147  /**
148   * Sets the "buffer-size" property.
149   * <p>
150   * Specifies the log file buffer size.
151   *
152   * @param value The value of the "buffer-size" property.
153   * @throws PropertyException
154   *           If the new value is invalid.
155   */
156  void setBufferSize(Long value) throws PropertyException;
157
158
159
160  /**
161   * Gets the "java-class" property.
162   * <p>
163   * The fully-qualified name of the Java class that provides the File
164   * Based HTTP Access Log Publisher implementation.
165   *
166   * @return Returns the value of the "java-class" property.
167   */
168  String getJavaClass();
169
170
171
172  /**
173   * Sets the "java-class" property.
174   * <p>
175   * The fully-qualified name of the Java class that provides the File
176   * Based HTTP Access Log Publisher implementation.
177   *
178   * @param value The value of the "java-class" property.
179   * @throws PropertyException
180   *           If the new value is invalid.
181   */
182  void setJavaClass(String value) throws PropertyException;
183
184
185
186  /**
187   * Gets the "log-file" property.
188   * <p>
189   * The file name to use for the log files generated by the File
190   * Based HTTP Access Log Publisher. The path to the file is relative
191   * to the server root.
192   *
193   * @return Returns the value of the "log-file" property.
194   */
195  String getLogFile();
196
197
198
199  /**
200   * Sets the "log-file" property.
201   * <p>
202   * The file name to use for the log files generated by the File
203   * Based HTTP Access Log Publisher. The path to the file is relative
204   * to the server root.
205   *
206   * @param value The value of the "log-file" property.
207   * @throws PropertyException
208   *           If the new value is invalid.
209   */
210  void setLogFile(String value) throws PropertyException;
211
212
213
214  /**
215   * Gets the "log-file-permissions" property.
216   * <p>
217   * The UNIX permissions of the log files created by this File Based
218   * HTTP Access Log Publisher.
219   *
220   * @return Returns the value of the "log-file-permissions" property.
221   */
222  String getLogFilePermissions();
223
224
225
226  /**
227   * Sets the "log-file-permissions" property.
228   * <p>
229   * The UNIX permissions of the log files created by this File Based
230   * HTTP Access Log Publisher.
231   *
232   * @param value The value of the "log-file-permissions" property.
233   * @throws PropertyException
234   *           If the new value is invalid.
235   */
236  void setLogFilePermissions(String value) throws PropertyException;
237
238
239
240  /**
241   * Gets the "log-format" property.
242   * <p>
243   * Specifies how log records should be formatted and written to the
244   * HTTP access log.
245   *
246   * @return Returns the value of the "log-format" property.
247   */
248  String getLogFormat();
249
250
251
252  /**
253   * Sets the "log-format" property.
254   * <p>
255   * Specifies how log records should be formatted and written to the
256   * HTTP access log.
257   *
258   * @param value The value of the "log-format" property.
259   * @throws PropertyException
260   *           If the new value is invalid.
261   */
262  void setLogFormat(String value) throws PropertyException;
263
264
265
266  /**
267   * Gets the "log-record-time-format" property.
268   * <p>
269   * Specifies the format string that is used to generate log record
270   * timestamps.
271   *
272   * @return Returns the value of the "log-record-time-format" property.
273   */
274  String getLogRecordTimeFormat();
275
276
277
278  /**
279   * Sets the "log-record-time-format" property.
280   * <p>
281   * Specifies the format string that is used to generate log record
282   * timestamps.
283   *
284   * @param value The value of the "log-record-time-format" property.
285   * @throws PropertyException
286   *           If the new value is invalid.
287   */
288  void setLogRecordTimeFormat(String value) throws PropertyException;
289
290
291
292  /**
293   * Gets the "queue-size" property.
294   * <p>
295   * The maximum number of log records that can be stored in the
296   * asynchronous queue.
297   *
298   * @return Returns the value of the "queue-size" property.
299   */
300  int getQueueSize();
301
302
303
304  /**
305   * Sets the "queue-size" property.
306   * <p>
307   * The maximum number of log records that can be stored in the
308   * asynchronous queue.
309   *
310   * @param value The value of the "queue-size" property.
311   * @throws PropertyException
312   *           If the new value is invalid.
313   */
314  void setQueueSize(Integer value) throws PropertyException;
315
316
317
318  /**
319   * Gets the "retention-policy" property.
320   * <p>
321   * The retention policy to use for the File Based HTTP Access Log
322   * Publisher .
323   * <p>
324   * When multiple policies are used, log files are cleaned when any
325   * of the policy's conditions are met.
326   *
327   * @return Returns the values of the "retention-policy" property.
328   */
329  SortedSet<String> getRetentionPolicy();
330
331
332
333  /**
334   * Sets the "retention-policy" property.
335   * <p>
336   * The retention policy to use for the File Based HTTP Access Log
337   * Publisher .
338   * <p>
339   * When multiple policies are used, log files are cleaned when any
340   * of the policy's conditions are met.
341   *
342   * @param values The values of the "retention-policy" property.
343   * @throws PropertyException
344   *           If one or more of the new values are invalid.
345   */
346  void setRetentionPolicy(Collection<String> values) throws PropertyException;
347
348
349
350  /**
351   * Gets the "rotation-policy" property.
352   * <p>
353   * The rotation policy to use for the File Based HTTP Access Log
354   * Publisher .
355   * <p>
356   * When multiple policies are used, rotation will occur if any
357   * policy's conditions are met.
358   *
359   * @return Returns the values of the "rotation-policy" property.
360   */
361  SortedSet<String> getRotationPolicy();
362
363
364
365  /**
366   * Sets the "rotation-policy" property.
367   * <p>
368   * The rotation policy to use for the File Based HTTP Access Log
369   * Publisher .
370   * <p>
371   * When multiple policies are used, rotation will occur if any
372   * policy's conditions are met.
373   *
374   * @param values The values of the "rotation-policy" property.
375   * @throws PropertyException
376   *           If one or more of the new values are invalid.
377   */
378  void setRotationPolicy(Collection<String> values) throws PropertyException;
379
380
381
382  /**
383   * Gets the "time-interval" property.
384   * <p>
385   * Specifies the interval at which to check whether the log files
386   * need to be rotated.
387   *
388   * @return Returns the value of the "time-interval" property.
389   */
390  long getTimeInterval();
391
392
393
394  /**
395   * Sets the "time-interval" property.
396   * <p>
397   * Specifies the interval at which to check whether the log files
398   * need to be rotated.
399   *
400   * @param value The value of the "time-interval" property.
401   * @throws PropertyException
402   *           If the new value is invalid.
403   */
404  void setTimeInterval(Long value) throws PropertyException;
405
406}