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 * 246 * @return Returns the value of the "queue-size" property. 247 */ 248 int getQueueSize(); 249 250 251 252 /** 253 * Sets the "queue-size" property. 254 * <p> 255 * The maximum number of log records that can be stored in the 256 * asynchronous queue. 257 * 258 * @param value The value of the "queue-size" property. 259 * @throws PropertyException 260 * If the new value is invalid. 261 */ 262 void setQueueSize(Integer value) throws PropertyException; 263 264 265 266 /** 267 * Gets the "retention-policy" property. 268 * <p> 269 * The retention policy to use for the File Based Audit Log 270 * Publisher . 271 * <p> 272 * When multiple policies are used, log files are cleaned when any 273 * of the policy's conditions are met. 274 * 275 * @return Returns the values of the "retention-policy" property. 276 */ 277 SortedSet<String> getRetentionPolicy(); 278 279 280 281 /** 282 * Sets the "retention-policy" property. 283 * <p> 284 * The retention policy to use for the File Based Audit Log 285 * Publisher . 286 * <p> 287 * When multiple policies are used, log files are cleaned when any 288 * of the policy's conditions are met. 289 * 290 * @param values The values of the "retention-policy" property. 291 * @throws PropertyException 292 * If one or more of the new values are invalid. 293 */ 294 void setRetentionPolicy(Collection<String> values) throws PropertyException; 295 296 297 298 /** 299 * Gets the "rotation-policy" property. 300 * <p> 301 * The rotation policy to use for the File Based Audit Log Publisher 302 * . 303 * <p> 304 * When multiple policies are used, rotation will occur if any 305 * policy's conditions are met. 306 * 307 * @return Returns the values of the "rotation-policy" property. 308 */ 309 SortedSet<String> getRotationPolicy(); 310 311 312 313 /** 314 * Sets the "rotation-policy" property. 315 * <p> 316 * The rotation policy to use for the File Based Audit Log Publisher 317 * . 318 * <p> 319 * When multiple policies are used, rotation will occur if any 320 * policy's conditions are met. 321 * 322 * @param values The values of the "rotation-policy" property. 323 * @throws PropertyException 324 * If one or more of the new values are invalid. 325 */ 326 void setRotationPolicy(Collection<String> values) throws PropertyException; 327 328 329 330 /** 331 * Gets the "time-interval" property. 332 * <p> 333 * Specifies the interval at which to check whether the log files 334 * need to be rotated. 335 * 336 * @return Returns the value of the "time-interval" property. 337 */ 338 long getTimeInterval(); 339 340 341 342 /** 343 * Sets the "time-interval" property. 344 * <p> 345 * Specifies the interval at which to check whether the log files 346 * need to be rotated. 347 * 348 * @param value The value of the "time-interval" property. 349 * @throws PropertyException 350 * If the new value is invalid. 351 */ 352 void setTimeInterval(Long value) throws PropertyException; 353 354}