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.FileBasedAuditLogPublisherCfg; 035 036 037 038/** 039 * A client-side interface for reading and modifying File Based Audit 040 * Log Publisher settings. 041 * <p> 042 * File Based Audit Log Publishers publish access messages to the file 043 * system. 044 */ 045public interface FileBasedAuditLogPublisherCfgClient extends AccessLogPublisherCfgClient { 046 047 /** 048 * Get the configuration definition associated with this File Based Audit Log Publisher. 049 * 050 * @return Returns the configuration definition associated with this File Based Audit Log Publisher. 051 */ 052 ManagedObjectDefinition<? extends FileBasedAuditLogPublisherCfgClient, ? extends FileBasedAuditLogPublisherCfg> 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 Audit 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 Audit 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 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 Audit 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 Audit 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 Audit Log Publisher. The path to the file is relative to the 191 * 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 Audit Log Publisher. The path to the file is relative to the 204 * 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 * Audit 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 * Audit 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 "queue-size" property. 242 * <p> 243 * The maximum number of log records that can be stored in the 244 * asynchronous queue. 245 * <p> 246 * Setting the queue size to zero activates parallel log writer 247 * implementation which has no queue size limit and as such the 248 * parallel log writer should only be used on a very well tuned 249 * server configuration to avoid potential out of memory errors. 250 * 251 * @return Returns the value of the "queue-size" property. 252 */ 253 int getQueueSize(); 254 255 256 257 /** 258 * Sets the "queue-size" property. 259 * <p> 260 * The maximum number of log records that can be stored in the 261 * asynchronous queue. 262 * <p> 263 * Setting the queue size to zero activates parallel log writer 264 * implementation which has no queue size limit and as such the 265 * parallel log writer should only be used on a very well tuned 266 * server configuration to avoid potential out of memory errors. 267 * 268 * @param value The value of the "queue-size" property. 269 * @throws PropertyException 270 * If the new value is invalid. 271 */ 272 void setQueueSize(Integer value) throws PropertyException; 273 274 275 276 /** 277 * Gets the "retention-policy" property. 278 * <p> 279 * The retention policy to use for the File Based Audit Log 280 * Publisher . 281 * <p> 282 * When multiple policies are used, log files are cleaned when any 283 * of the policy's conditions are met. 284 * 285 * @return Returns the values of the "retention-policy" property. 286 */ 287 SortedSet<String> getRetentionPolicy(); 288 289 290 291 /** 292 * Sets the "retention-policy" property. 293 * <p> 294 * The retention policy to use for the File Based Audit Log 295 * Publisher . 296 * <p> 297 * When multiple policies are used, log files are cleaned when any 298 * of the policy's conditions are met. 299 * 300 * @param values The values of the "retention-policy" property. 301 * @throws PropertyException 302 * If one or more of the new values are invalid. 303 */ 304 void setRetentionPolicy(Collection<String> values) throws PropertyException; 305 306 307 308 /** 309 * Gets the "rotation-policy" property. 310 * <p> 311 * The rotation policy to use for the File Based Audit Log Publisher 312 * . 313 * <p> 314 * When multiple policies are used, rotation will occur if any 315 * policy's conditions are met. 316 * 317 * @return Returns the values of the "rotation-policy" property. 318 */ 319 SortedSet<String> getRotationPolicy(); 320 321 322 323 /** 324 * Sets the "rotation-policy" property. 325 * <p> 326 * The rotation policy to use for the File Based Audit Log Publisher 327 * . 328 * <p> 329 * When multiple policies are used, rotation will occur if any 330 * policy's conditions are met. 331 * 332 * @param values The values of the "rotation-policy" property. 333 * @throws PropertyException 334 * If one or more of the new values are invalid. 335 */ 336 void setRotationPolicy(Collection<String> values) throws PropertyException; 337 338 339 340 /** 341 * Gets the "time-interval" property. 342 * <p> 343 * Specifies the interval at which to check whether the log files 344 * need to be rotated. 345 * 346 * @return Returns the value of the "time-interval" property. 347 */ 348 long getTimeInterval(); 349 350 351 352 /** 353 * Sets the "time-interval" property. 354 * <p> 355 * Specifies the interval at which to check whether the log files 356 * need to be rotated. 357 * 358 * @param value The value of the "time-interval" property. 359 * @throws PropertyException 360 * If the new value is invalid. 361 */ 362 void setTimeInterval(Long value) throws PropertyException; 363 364}