001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2008 Sun Microsystems, Inc. 015 */ 016package org.forgerock.opendj.server.config.client; 017 018 019 020import java.util.Collection; 021import java.util.SortedSet; 022import org.forgerock.opendj.config.ManagedObjectDefinition; 023import org.forgerock.opendj.config.PropertyException; 024import org.forgerock.opendj.server.config.meta.FileBasedAccessLogPublisherCfgDefn.LogFormat; 025import org.forgerock.opendj.server.config.server.FileBasedAccessLogPublisherCfg; 026 027 028 029/** 030 * A client-side interface for reading and modifying File Based Access 031 * Log Publisher settings. 032 * <p> 033 * File Based Access Log Publishers publish access messages to the 034 * file system. 035 */ 036public interface FileBasedAccessLogPublisherCfgClient extends AccessLogPublisherCfgClient { 037 038 /** 039 * Get the configuration definition associated with this File Based Access Log Publisher. 040 * 041 * @return Returns the configuration definition associated with this File Based Access Log Publisher. 042 */ 043 ManagedObjectDefinition<? extends FileBasedAccessLogPublisherCfgClient, ? extends FileBasedAccessLogPublisherCfg> definition(); 044 045 046 047 /** 048 * Gets the "append" property. 049 * <p> 050 * Specifies whether to append to existing log files. 051 * 052 * @return Returns the value of the "append" property. 053 */ 054 boolean isAppend(); 055 056 057 058 /** 059 * Sets the "append" property. 060 * <p> 061 * Specifies whether to append to existing log files. 062 * 063 * @param value The value of the "append" property. 064 * @throws PropertyException 065 * If the new value is invalid. 066 */ 067 void setAppend(Boolean value) throws PropertyException; 068 069 070 071 /** 072 * Gets the "asynchronous" property. 073 * <p> 074 * Indicates whether the File Based Access Log Publisher will 075 * publish records asynchronously. 076 * 077 * @return Returns the value of the "asynchronous" property. 078 */ 079 boolean isAsynchronous(); 080 081 082 083 /** 084 * Sets the "asynchronous" property. 085 * <p> 086 * Indicates whether the File Based Access Log Publisher will 087 * publish records asynchronously. 088 * 089 * @param value The value of the "asynchronous" property. 090 * @throws PropertyException 091 * If the new value is invalid. 092 */ 093 void setAsynchronous(boolean value) throws PropertyException; 094 095 096 097 /** 098 * Gets the "auto-flush" property. 099 * <p> 100 * Specifies whether to flush the writer after every log record. 101 * <p> 102 * If the asynchronous writes option is used, the writer is flushed 103 * after all the log records in the queue are written. 104 * 105 * @return Returns the value of the "auto-flush" property. 106 */ 107 boolean isAutoFlush(); 108 109 110 111 /** 112 * Sets the "auto-flush" property. 113 * <p> 114 * Specifies whether to flush the writer after every log record. 115 * <p> 116 * If the asynchronous writes option is used, the writer is flushed 117 * after all the log records in the queue are written. 118 * 119 * @param value The value of the "auto-flush" property. 120 * @throws PropertyException 121 * If the new value is invalid. 122 */ 123 void setAutoFlush(Boolean value) throws PropertyException; 124 125 126 127 /** 128 * Gets the "buffer-size" property. 129 * <p> 130 * Specifies the log file buffer size. 131 * 132 * @return Returns the value of the "buffer-size" property. 133 */ 134 long getBufferSize(); 135 136 137 138 /** 139 * Sets the "buffer-size" property. 140 * <p> 141 * Specifies the log file buffer size. 142 * 143 * @param value The value of the "buffer-size" property. 144 * @throws PropertyException 145 * If the new value is invalid. 146 */ 147 void setBufferSize(Long value) throws PropertyException; 148 149 150 151 /** 152 * Gets the "java-class" property. 153 * <p> 154 * The fully-qualified name of the Java class that provides the File 155 * Based Access Log Publisher implementation. 156 * 157 * @return Returns the value of the "java-class" property. 158 */ 159 String getJavaClass(); 160 161 162 163 /** 164 * Sets the "java-class" property. 165 * <p> 166 * The fully-qualified name of the Java class that provides the File 167 * Based Access Log Publisher implementation. 168 * 169 * @param value The value of the "java-class" property. 170 * @throws PropertyException 171 * If the new value is invalid. 172 */ 173 void setJavaClass(String value) throws PropertyException; 174 175 176 177 /** 178 * Gets the "log-control-oids" property. 179 * <p> 180 * Specifies whether control OIDs will be included in operation log 181 * records. 182 * 183 * @return Returns the value of the "log-control-oids" property. 184 */ 185 boolean isLogControlOids(); 186 187 188 189 /** 190 * Sets the "log-control-oids" property. 191 * <p> 192 * Specifies whether control OIDs will be included in operation log 193 * records. 194 * 195 * @param value The value of the "log-control-oids" property. 196 * @throws PropertyException 197 * If the new value is invalid. 198 */ 199 void setLogControlOids(Boolean value) throws PropertyException; 200 201 202 203 /** 204 * Gets the "log-file" property. 205 * <p> 206 * The file name to use for the log files generated by the File 207 * Based Access Log Publisher. The path to the file is relative to 208 * the server root. 209 * 210 * @return Returns the value of the "log-file" property. 211 */ 212 String getLogFile(); 213 214 215 216 /** 217 * Sets the "log-file" property. 218 * <p> 219 * The file name to use for the log files generated by the File 220 * Based Access Log Publisher. The path to the file is relative to 221 * the server root. 222 * 223 * @param value The value of the "log-file" property. 224 * @throws PropertyException 225 * If the new value is invalid. 226 */ 227 void setLogFile(String value) throws PropertyException; 228 229 230 231 /** 232 * Gets the "log-file-permissions" property. 233 * <p> 234 * The UNIX permissions of the log files created by this File Based 235 * Access Log Publisher. 236 * 237 * @return Returns the value of the "log-file-permissions" property. 238 */ 239 String getLogFilePermissions(); 240 241 242 243 /** 244 * Sets the "log-file-permissions" property. 245 * <p> 246 * The UNIX permissions of the log files created by this File Based 247 * Access Log Publisher. 248 * 249 * @param value The value of the "log-file-permissions" property. 250 * @throws PropertyException 251 * If the new value is invalid. 252 */ 253 void setLogFilePermissions(String value) throws PropertyException; 254 255 256 257 /** 258 * Gets the "log-format" property. 259 * <p> 260 * Specifies how log records should be formatted and written to the 261 * access log. 262 * 263 * @return Returns the value of the "log-format" property. 264 */ 265 LogFormat getLogFormat(); 266 267 268 269 /** 270 * Sets the "log-format" property. 271 * <p> 272 * Specifies how log records should be formatted and written to the 273 * access log. 274 * 275 * @param value The value of the "log-format" property. 276 * @throws PropertyException 277 * If the new value is invalid. 278 */ 279 void setLogFormat(LogFormat value) throws PropertyException; 280 281 282 283 /** 284 * Gets the "log-record-time-format" property. 285 * <p> 286 * Specifies the format string that is used to generate log record 287 * timestamps. 288 * 289 * @return Returns the value of the "log-record-time-format" property. 290 */ 291 String getLogRecordTimeFormat(); 292 293 294 295 /** 296 * Sets the "log-record-time-format" property. 297 * <p> 298 * Specifies the format string that is used to generate log record 299 * timestamps. 300 * 301 * @param value The value of the "log-record-time-format" property. 302 * @throws PropertyException 303 * If the new value is invalid. 304 */ 305 void setLogRecordTimeFormat(String value) throws PropertyException; 306 307 308 309 /** 310 * Gets the "queue-size" property. 311 * <p> 312 * The maximum number of log records that can be stored in the 313 * asynchronous queue. 314 * 315 * @return Returns the value of the "queue-size" property. 316 */ 317 int getQueueSize(); 318 319 320 321 /** 322 * Sets the "queue-size" property. 323 * <p> 324 * The maximum number of log records that can be stored in the 325 * asynchronous queue. 326 * 327 * @param value The value of the "queue-size" property. 328 * @throws PropertyException 329 * If the new value is invalid. 330 */ 331 void setQueueSize(Integer value) throws PropertyException; 332 333 334 335 /** 336 * Gets the "retention-policy" property. 337 * <p> 338 * The retention policy to use for the File Based Access Log 339 * Publisher . 340 * <p> 341 * When multiple policies are used, log files are cleaned when any 342 * of the policy's conditions are met. 343 * 344 * @return Returns the values of the "retention-policy" property. 345 */ 346 SortedSet<String> getRetentionPolicy(); 347 348 349 350 /** 351 * Sets the "retention-policy" property. 352 * <p> 353 * The retention policy to use for the File Based Access Log 354 * Publisher . 355 * <p> 356 * When multiple policies are used, log files are cleaned when any 357 * of the policy's conditions are met. 358 * 359 * @param values The values of the "retention-policy" property. 360 * @throws PropertyException 361 * If one or more of the new values are invalid. 362 */ 363 void setRetentionPolicy(Collection<String> values) throws PropertyException; 364 365 366 367 /** 368 * Gets the "rotation-policy" property. 369 * <p> 370 * The rotation policy to use for the File Based Access Log 371 * Publisher . 372 * <p> 373 * When multiple policies are used, rotation will occur if any 374 * policy's conditions are met. 375 * 376 * @return Returns the values of the "rotation-policy" property. 377 */ 378 SortedSet<String> getRotationPolicy(); 379 380 381 382 /** 383 * Sets the "rotation-policy" property. 384 * <p> 385 * The rotation policy to use for the File Based Access Log 386 * Publisher . 387 * <p> 388 * When multiple policies are used, rotation will occur if any 389 * policy's conditions are met. 390 * 391 * @param values The values of the "rotation-policy" property. 392 * @throws PropertyException 393 * If one or more of the new values are invalid. 394 */ 395 void setRotationPolicy(Collection<String> values) throws PropertyException; 396 397 398 399 /** 400 * Gets the "time-interval" property. 401 * <p> 402 * Specifies the interval at which to check whether the log files 403 * need to be rotated. 404 * 405 * @return Returns the value of the "time-interval" property. 406 */ 407 long getTimeInterval(); 408 409 410 411 /** 412 * Sets the "time-interval" property. 413 * <p> 414 * Specifies the interval at which to check whether the log files 415 * need to be rotated. 416 * 417 * @param value The value of the "time-interval" property. 418 * @throws PropertyException 419 * If the new value is invalid. 420 */ 421 void setTimeInterval(Long value) throws PropertyException; 422 423}