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