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.FileBasedErrorLogPublisherCfg;
035
036
037
038/**
039 * A client-side interface for reading and modifying File Based Error
040 * Log Publisher settings.
041 * <p>
042 * File Based Error Log Publishers publish error messages to the file
043 * system.
044 */
045public interface FileBasedErrorLogPublisherCfgClient extends ErrorLogPublisherCfgClient {
046
047  /**
048   * Get the configuration definition associated with this File Based Error Log Publisher.
049   *
050   * @return Returns the configuration definition associated with this File Based Error Log Publisher.
051   */
052  ManagedObjectDefinition<? extends FileBasedErrorLogPublisherCfgClient, ? extends FileBasedErrorLogPublisherCfg> 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 Error Log Publisher will publish
084   * 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 Error Log Publisher will publish
096   * 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 will be
112   * flushed 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 will be
126   * flushed 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 Error 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 Error 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 Error Log Publisher .
191   * <p>
192   * The path to the file is relative to the server root.
193   *
194   * @return Returns the value of the "log-file" property.
195   */
196  String getLogFile();
197
198
199
200  /**
201   * Sets the "log-file" property.
202   * <p>
203   * The file name to use for the log files generated by the File
204   * Based Error Log Publisher .
205   * <p>
206   * The path to the file is relative to the server root.
207   *
208   * @param value The value of the "log-file" property.
209   * @throws PropertyException
210   *           If the new value is invalid.
211   */
212  void setLogFile(String value) throws PropertyException;
213
214
215
216  /**
217   * Gets the "log-file-permissions" property.
218   * <p>
219   * The UNIX permissions of the log files created by this File Based
220   * Error Log Publisher .
221   *
222   * @return Returns the value of the "log-file-permissions" property.
223   */
224  String getLogFilePermissions();
225
226
227
228  /**
229   * Sets the "log-file-permissions" property.
230   * <p>
231   * The UNIX permissions of the log files created by this File Based
232   * Error Log Publisher .
233   *
234   * @param value The value of the "log-file-permissions" property.
235   * @throws PropertyException
236   *           If the new value is invalid.
237   */
238  void setLogFilePermissions(String value) throws PropertyException;
239
240
241
242  /**
243   * Gets the "queue-size" property.
244   * <p>
245   * The maximum number of log records that can be stored in the
246   * asynchronous queue.
247   *
248   * @return Returns the value of the "queue-size" property.
249   */
250  int getQueueSize();
251
252
253
254  /**
255   * Sets the "queue-size" property.
256   * <p>
257   * The maximum number of log records that can be stored in the
258   * asynchronous queue.
259   *
260   * @param value The value of the "queue-size" property.
261   * @throws PropertyException
262   *           If the new value is invalid.
263   */
264  void setQueueSize(Integer value) throws PropertyException;
265
266
267
268  /**
269   * Gets the "retention-policy" property.
270   * <p>
271   * The retention policy to use for the File Based Error Log
272   * Publisher .
273   * <p>
274   * When multiple policies are used, log files will be cleaned when
275   * any of the policy's conditions are met.
276   *
277   * @return Returns the values of the "retention-policy" property.
278   */
279  SortedSet<String> getRetentionPolicy();
280
281
282
283  /**
284   * Sets the "retention-policy" property.
285   * <p>
286   * The retention policy to use for the File Based Error Log
287   * Publisher .
288   * <p>
289   * When multiple policies are used, log files will be cleaned when
290   * any of the policy's conditions are met.
291   *
292   * @param values The values of the "retention-policy" property.
293   * @throws PropertyException
294   *           If one or more of the new values are invalid.
295   */
296  void setRetentionPolicy(Collection<String> values) throws PropertyException;
297
298
299
300  /**
301   * Gets the "rotation-policy" property.
302   * <p>
303   * The rotation policy to use for the File Based Error Log Publisher
304   * .
305   * <p>
306   * When multiple policies are used, rotation will occur if any
307   * policy's conditions are met.
308   *
309   * @return Returns the values of the "rotation-policy" property.
310   */
311  SortedSet<String> getRotationPolicy();
312
313
314
315  /**
316   * Sets the "rotation-policy" property.
317   * <p>
318   * The rotation policy to use for the File Based Error Log Publisher
319   * .
320   * <p>
321   * When multiple policies are used, rotation will occur if any
322   * policy's conditions are met.
323   *
324   * @param values The values of the "rotation-policy" property.
325   * @throws PropertyException
326   *           If one or more of the new values are invalid.
327   */
328  void setRotationPolicy(Collection<String> values) throws PropertyException;
329
330
331
332  /**
333   * Gets the "time-interval" property.
334   * <p>
335   * Specifies the interval at which to check whether the log files
336   * need to be rotated.
337   *
338   * @return Returns the value of the "time-interval" property.
339   */
340  long getTimeInterval();
341
342
343
344  /**
345   * Sets the "time-interval" property.
346   * <p>
347   * Specifies the interval at which to check whether the log files
348   * need to be rotated.
349   *
350   * @param value The value of the "time-interval" property.
351   * @throws PropertyException
352   *           If the new value is invalid.
353   */
354  void setTimeInterval(Long value) throws PropertyException;
355
356}