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.meta.FileBasedAccessLogPublisherCfgDefn.LogFormat; 035import 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 */ 046public 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 PropertyException 075 * If the new value is invalid. 076 */ 077 void setAppend(Boolean value) throws PropertyException; 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 PropertyException 101 * If the new value is invalid. 102 */ 103 void setAsynchronous(boolean value) throws PropertyException; 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 PropertyException 131 * If the new value is invalid. 132 */ 133 void setAutoFlush(Boolean value) throws PropertyException; 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 PropertyException 155 * If the new value is invalid. 156 */ 157 void setBufferSize(Long value) throws PropertyException; 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 PropertyException 181 * If the new value is invalid. 182 */ 183 void setJavaClass(String value) throws PropertyException; 184 185 186 187 /** 188 * Gets the "log-control-oids" property. 189 * <p> 190 * Specifies whether control OIDs will be included in operation log 191 * records. 192 * 193 * @return Returns the value of the "log-control-oids" property. 194 */ 195 boolean isLogControlOids(); 196 197 198 199 /** 200 * Sets the "log-control-oids" property. 201 * <p> 202 * Specifies whether control OIDs will be included in operation log 203 * records. 204 * 205 * @param value The value of the "log-control-oids" property. 206 * @throws PropertyException 207 * If the new value is invalid. 208 */ 209 void setLogControlOids(Boolean value) throws PropertyException; 210 211 212 213 /** 214 * Gets the "log-file" property. 215 * <p> 216 * The file name to use for the log files generated by the File 217 * Based Access Log Publisher. The path to the file is relative to 218 * the server root. 219 * 220 * @return Returns the value of the "log-file" property. 221 */ 222 String getLogFile(); 223 224 225 226 /** 227 * Sets the "log-file" property. 228 * <p> 229 * The file name to use for the log files generated by the File 230 * Based Access Log Publisher. The path to the file is relative to 231 * the server root. 232 * 233 * @param value The value of the "log-file" property. 234 * @throws PropertyException 235 * If the new value is invalid. 236 */ 237 void setLogFile(String value) throws PropertyException; 238 239 240 241 /** 242 * Gets the "log-file-permissions" property. 243 * <p> 244 * The UNIX permissions of the log files created by this File Based 245 * Access Log Publisher. 246 * 247 * @return Returns the value of the "log-file-permissions" property. 248 */ 249 String getLogFilePermissions(); 250 251 252 253 /** 254 * Sets the "log-file-permissions" property. 255 * <p> 256 * The UNIX permissions of the log files created by this File Based 257 * Access Log Publisher. 258 * 259 * @param value The value of the "log-file-permissions" property. 260 * @throws PropertyException 261 * If the new value is invalid. 262 */ 263 void setLogFilePermissions(String value) throws PropertyException; 264 265 266 267 /** 268 * Gets the "log-format" property. 269 * <p> 270 * Specifies how log records should be formatted and written to the 271 * access log. 272 * 273 * @return Returns the value of the "log-format" property. 274 */ 275 LogFormat getLogFormat(); 276 277 278 279 /** 280 * Sets the "log-format" property. 281 * <p> 282 * Specifies how log records should be formatted and written to the 283 * access log. 284 * 285 * @param value The value of the "log-format" property. 286 * @throws PropertyException 287 * If the new value is invalid. 288 */ 289 void setLogFormat(LogFormat value) throws PropertyException; 290 291 292 293 /** 294 * Gets the "log-record-time-format" property. 295 * <p> 296 * Specifies the format string that is used to generate log record 297 * timestamps. 298 * 299 * @return Returns the value of the "log-record-time-format" property. 300 */ 301 String getLogRecordTimeFormat(); 302 303 304 305 /** 306 * Sets the "log-record-time-format" property. 307 * <p> 308 * Specifies the format string that is used to generate log record 309 * timestamps. 310 * 311 * @param value The value of the "log-record-time-format" property. 312 * @throws PropertyException 313 * If the new value is invalid. 314 */ 315 void setLogRecordTimeFormat(String value) throws PropertyException; 316 317 318 319 /** 320 * Gets the "queue-size" property. 321 * <p> 322 * The maximum number of log records that can be stored in the 323 * asynchronous queue. 324 * 325 * @return Returns the value of the "queue-size" property. 326 */ 327 int getQueueSize(); 328 329 330 331 /** 332 * Sets the "queue-size" property. 333 * <p> 334 * The maximum number of log records that can be stored in the 335 * asynchronous queue. 336 * 337 * @param value The value of the "queue-size" property. 338 * @throws PropertyException 339 * If the new value is invalid. 340 */ 341 void setQueueSize(Integer value) throws PropertyException; 342 343 344 345 /** 346 * Gets the "retention-policy" property. 347 * <p> 348 * The retention policy to use for the File Based Access Log 349 * Publisher . 350 * <p> 351 * When multiple policies are used, log files are cleaned when any 352 * of the policy's conditions are met. 353 * 354 * @return Returns the values of the "retention-policy" property. 355 */ 356 SortedSet<String> getRetentionPolicy(); 357 358 359 360 /** 361 * Sets the "retention-policy" property. 362 * <p> 363 * The retention policy to use for the File Based Access Log 364 * Publisher . 365 * <p> 366 * When multiple policies are used, log files are cleaned when any 367 * of the policy's conditions are met. 368 * 369 * @param values The values of the "retention-policy" property. 370 * @throws PropertyException 371 * If one or more of the new values are invalid. 372 */ 373 void setRetentionPolicy(Collection<String> values) throws PropertyException; 374 375 376 377 /** 378 * Gets the "rotation-policy" property. 379 * <p> 380 * The rotation policy to use for the File Based Access Log 381 * Publisher . 382 * <p> 383 * When multiple policies are used, rotation will occur if any 384 * policy's conditions are met. 385 * 386 * @return Returns the values of the "rotation-policy" property. 387 */ 388 SortedSet<String> getRotationPolicy(); 389 390 391 392 /** 393 * Sets the "rotation-policy" property. 394 * <p> 395 * The rotation policy to use for the File Based Access Log 396 * Publisher . 397 * <p> 398 * When multiple policies are used, rotation will occur if any 399 * policy's conditions are met. 400 * 401 * @param values The values of the "rotation-policy" property. 402 * @throws PropertyException 403 * If one or more of the new values are invalid. 404 */ 405 void setRotationPolicy(Collection<String> values) throws PropertyException; 406 407 408 409 /** 410 * Gets the "time-interval" property. 411 * <p> 412 * Specifies the interval at which to check whether the log files 413 * need to be rotated. 414 * 415 * @return Returns the value of the "time-interval" property. 416 */ 417 long getTimeInterval(); 418 419 420 421 /** 422 * Sets the "time-interval" property. 423 * <p> 424 * Specifies the interval at which to check whether the log files 425 * need to be rotated. 426 * 427 * @param value The value of the "time-interval" property. 428 * @throws PropertyException 429 * If the new value is invalid. 430 */ 431 void setTimeInterval(Long value) throws PropertyException; 432 433}