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
010     * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011     * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012     * See the License for the specific language governing permissions
013     * and limitations under the License.
014     *
015     * When distributing Covered Code, include this CDDL HEADER in each
016     * file and include the License file at
017     * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
018     * add the following below this CDDL HEADER, with the fields enclosed
019     * by brackets "[]" replaced with your own identifying information:
020     *      Portions Copyright [yyyy] [name of copyright owner]
021     *
022     * CDDL HEADER END
023     *
024     *
025     *      Copyright 2008 Sun Microsystems, Inc.
026     */
027    package org.opends.server.admin.std.client;
028    
029    
030    
031    import java.util.Collection;
032    import java.util.SortedSet;
033    import org.opends.server.admin.IllegalPropertyValueException;
034    import org.opends.server.admin.ManagedObjectDefinition;
035    import org.opends.server.admin.std.server.FileBasedAccessLogPublisherCfg;
036    
037    
038    
039    /**
040     * A client-side interface for reading and modifying File Based Access
041     * Log Publisher settings.
042     * <p>
043     * File Based Access Log Publishers publish access messages to the
044     * file system.
045     */
046    public interface FileBasedAccessLogPublisherCfgClient extends AccessLogPublisherCfgClient {
047    
048      /**
049       * Get the configuration definition associated with this File Based Access Log Publisher.
050       *
051       * @return Returns the configuration definition associated with this File Based Access Log Publisher.
052       */
053      ManagedObjectDefinition<? extends FileBasedAccessLogPublisherCfgClient, ? extends FileBasedAccessLogPublisherCfg> definition();
054    
055    
056    
057      /**
058       * Gets the "append" property.
059       * <p>
060       * Specifies whether to append to existing log files.
061       *
062       * @return Returns the value of the "append" property.
063       */
064      boolean isAppend();
065    
066    
067    
068      /**
069       * Sets the "append" property.
070       * <p>
071       * Specifies whether to append to existing log files.
072       *
073       * @param value The value of the "append" property.
074       * @throws IllegalPropertyValueException
075       *           If the new value is invalid.
076       */
077      void setAppend(Boolean value) throws IllegalPropertyValueException;
078    
079    
080    
081      /**
082       * Gets the "asynchronous" property.
083       * <p>
084       * Indicates whether the File Based Access Log Publisher will
085       * publish records asynchronously.
086       *
087       * @return Returns the value of the "asynchronous" property.
088       */
089      boolean isAsynchronous();
090    
091    
092    
093      /**
094       * Sets the "asynchronous" property.
095       * <p>
096       * Indicates whether the File Based Access Log Publisher will
097       * publish records asynchronously.
098       *
099       * @param value The value of the "asynchronous" property.
100       * @throws IllegalPropertyValueException
101       *           If the new value is invalid.
102       */
103      void setAsynchronous(boolean value) throws IllegalPropertyValueException;
104    
105    
106    
107      /**
108       * Gets the "auto-flush" property.
109       * <p>
110       * Specifies whether to flush the writer after every log record.
111       * <p>
112       * If the asynchronous writes option is used, the writer is flushed
113       * after all the log records in the queue are written.
114       *
115       * @return Returns the value of the "auto-flush" property.
116       */
117      boolean isAutoFlush();
118    
119    
120    
121      /**
122       * Sets the "auto-flush" property.
123       * <p>
124       * Specifies whether to flush the writer after every log record.
125       * <p>
126       * If the asynchronous writes option is used, the writer is flushed
127       * after all the log records in the queue are written.
128       *
129       * @param value The value of the "auto-flush" property.
130       * @throws IllegalPropertyValueException
131       *           If the new value is invalid.
132       */
133      void setAutoFlush(Boolean value) throws IllegalPropertyValueException;
134    
135    
136    
137      /**
138       * Gets the "buffer-size" property.
139       * <p>
140       * Specifies the log file buffer size.
141       *
142       * @return Returns the value of the "buffer-size" property.
143       */
144      long getBufferSize();
145    
146    
147    
148      /**
149       * Sets the "buffer-size" property.
150       * <p>
151       * Specifies the log file buffer size.
152       *
153       * @param value The value of the "buffer-size" property.
154       * @throws IllegalPropertyValueException
155       *           If the new value is invalid.
156       */
157      void setBufferSize(Long value) throws IllegalPropertyValueException;
158    
159    
160    
161      /**
162       * Gets the "java-class" property.
163       * <p>
164       * The fully-qualified name of the Java class that provides the File
165       * Based Access Log Publisher implementation.
166       *
167       * @return Returns the value of the "java-class" property.
168       */
169      String getJavaClass();
170    
171    
172    
173      /**
174       * Sets the "java-class" property.
175       * <p>
176       * The fully-qualified name of the Java class that provides the File
177       * Based Access Log Publisher implementation.
178       *
179       * @param value The value of the "java-class" property.
180       * @throws IllegalPropertyValueException
181       *           If the new value is invalid.
182       */
183      void setJavaClass(String value) throws IllegalPropertyValueException;
184    
185    
186    
187      /**
188       * Gets the "log-file" property.
189       * <p>
190       * The file name to use for the log files generated by the File
191       * Based Access Log Publisher. The path to the file is relative to
192       * 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 Access Log Publisher. The path to the file is relative to
205       * the server root.
206       *
207       * @param value The value of the "log-file" property.
208       * @throws IllegalPropertyValueException
209       *           If the new value is invalid.
210       */
211      void setLogFile(String value) throws IllegalPropertyValueException;
212    
213    
214    
215      /**
216       * Gets the "log-file-permissions" property.
217       * <p>
218       * The UNIX permissions of the log files created by this File Based
219       * Access Log Publisher.
220       *
221       * @return Returns the value of the "log-file-permissions" property.
222       */
223      String getLogFilePermissions();
224    
225    
226    
227      /**
228       * Sets the "log-file-permissions" property.
229       * <p>
230       * The UNIX permissions of the log files created by this File Based
231       * Access Log Publisher.
232       *
233       * @param value The value of the "log-file-permissions" property.
234       * @throws IllegalPropertyValueException
235       *           If the new value is invalid.
236       */
237      void setLogFilePermissions(String value) throws IllegalPropertyValueException;
238    
239    
240    
241      /**
242       * Gets the "queue-size" property.
243       * <p>
244       * The maximum number of log records that can be stored in the
245       * asynchronous queue.
246       *
247       * @return Returns the value of the "queue-size" property.
248       */
249      int getQueueSize();
250    
251    
252    
253      /**
254       * Sets the "queue-size" property.
255       * <p>
256       * The maximum number of log records that can be stored in the
257       * asynchronous queue.
258       *
259       * @param value The value of the "queue-size" property.
260       * @throws IllegalPropertyValueException
261       *           If the new value is invalid.
262       */
263      void setQueueSize(Integer value) throws IllegalPropertyValueException;
264    
265    
266    
267      /**
268       * Gets the "retention-policy" property.
269       * <p>
270       * The retention policy to use for the File Based Access Log
271       * Publisher .
272       * <p>
273       * When multiple policies are used, log files are cleaned when any
274       * of the policy's conditions are met.
275       *
276       * @return Returns the values of the "retention-policy" property.
277       */
278      SortedSet<String> getRetentionPolicy();
279    
280    
281    
282      /**
283       * Sets the "retention-policy" property.
284       * <p>
285       * The retention policy to use for the File Based Access Log
286       * Publisher .
287       * <p>
288       * When multiple policies are used, log files are cleaned when any
289       * of the policy's conditions are met.
290       *
291       * @param values The values of the "retention-policy" property.
292       * @throws IllegalPropertyValueException
293       *           If one or more of the new values are invalid.
294       */
295      void setRetentionPolicy(Collection<String> values) throws IllegalPropertyValueException;
296    
297    
298    
299      /**
300       * Gets the "rotation-policy" property.
301       * <p>
302       * The rotation policy to use for the File Based Access Log
303       * Publisher .
304       * <p>
305       * When multiple policies are used, rotation will occur if any
306       * policy's conditions are met.
307       *
308       * @return Returns the values of the "rotation-policy" property.
309       */
310      SortedSet<String> getRotationPolicy();
311    
312    
313    
314      /**
315       * Sets the "rotation-policy" property.
316       * <p>
317       * The rotation policy to use for the File Based Access Log
318       * Publisher .
319       * <p>
320       * When multiple policies are used, rotation will occur if any
321       * policy's conditions are met.
322       *
323       * @param values The values of the "rotation-policy" property.
324       * @throws IllegalPropertyValueException
325       *           If one or more of the new values are invalid.
326       */
327      void setRotationPolicy(Collection<String> values) throws IllegalPropertyValueException;
328    
329    
330    
331      /**
332       * Gets the "time-interval" property.
333       * <p>
334       * Specifies the interval at which to check whether the log files
335       * need to be rotated.
336       *
337       * @return Returns the value of the "time-interval" property.
338       */
339      long getTimeInterval();
340    
341    
342    
343      /**
344       * Sets the "time-interval" property.
345       * <p>
346       * Specifies the interval at which to check whether the log files
347       * need to be rotated.
348       *
349       * @param value The value of the "time-interval" property.
350       * @throws IllegalPropertyValueException
351       *           If the new value is invalid.
352       */
353      void setTimeInterval(Long value) throws IllegalPropertyValueException;
354    
355    }