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.FileBasedAuditLogPublisherCfg; 025 026 027 028/** 029 * A client-side interface for reading and modifying File Based Audit 030 * Log Publisher settings. 031 * <p> 032 * File Based Audit Log Publishers publish access messages to the file 033 * system. 034 */ 035public interface FileBasedAuditLogPublisherCfgClient extends AccessLogPublisherCfgClient { 036 037 /** 038 * Get the configuration definition associated with this File Based Audit Log Publisher. 039 * 040 * @return Returns the configuration definition associated with this File Based Audit Log Publisher. 041 */ 042 ManagedObjectDefinition<? extends FileBasedAuditLogPublisherCfgClient, ? extends FileBasedAuditLogPublisherCfg> 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 Audit Log Publisher will publish 074 * 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 Audit Log Publisher will publish 086 * 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 Audit 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 Audit 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 Audit Log Publisher. The path to the file is relative to the 181 * 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 Audit Log Publisher. The path to the file is relative to the 194 * 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 * Audit 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 * Audit 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 "queue-size" property. 232 * <p> 233 * The maximum number of log records that can be stored in the 234 * asynchronous queue. 235 * 236 * @return Returns the value of the "queue-size" property. 237 */ 238 int getQueueSize(); 239 240 241 242 /** 243 * Sets the "queue-size" property. 244 * <p> 245 * The maximum number of log records that can be stored in the 246 * asynchronous queue. 247 * 248 * @param value The value of the "queue-size" property. 249 * @throws PropertyException 250 * If the new value is invalid. 251 */ 252 void setQueueSize(Integer value) throws PropertyException; 253 254 255 256 /** 257 * Gets the "retention-policy" property. 258 * <p> 259 * The retention policy to use for the File Based Audit Log 260 * Publisher . 261 * <p> 262 * When multiple policies are used, log files are cleaned when any 263 * of the policy's conditions are met. 264 * 265 * @return Returns the values of the "retention-policy" property. 266 */ 267 SortedSet<String> getRetentionPolicy(); 268 269 270 271 /** 272 * Sets the "retention-policy" property. 273 * <p> 274 * The retention policy to use for the File Based Audit Log 275 * Publisher . 276 * <p> 277 * When multiple policies are used, log files are cleaned when any 278 * of the policy's conditions are met. 279 * 280 * @param values The values of the "retention-policy" property. 281 * @throws PropertyException 282 * If one or more of the new values are invalid. 283 */ 284 void setRetentionPolicy(Collection<String> values) throws PropertyException; 285 286 287 288 /** 289 * Gets the "rotation-policy" property. 290 * <p> 291 * The rotation policy to use for the File Based Audit Log Publisher 292 * . 293 * <p> 294 * When multiple policies are used, rotation will occur if any 295 * policy's conditions are met. 296 * 297 * @return Returns the values of the "rotation-policy" property. 298 */ 299 SortedSet<String> getRotationPolicy(); 300 301 302 303 /** 304 * Sets the "rotation-policy" property. 305 * <p> 306 * The rotation policy to use for the File Based Audit Log Publisher 307 * . 308 * <p> 309 * When multiple policies are used, rotation will occur if any 310 * policy's conditions are met. 311 * 312 * @param values The values of the "rotation-policy" property. 313 * @throws PropertyException 314 * If one or more of the new values are invalid. 315 */ 316 void setRotationPolicy(Collection<String> values) throws PropertyException; 317 318 319 320 /** 321 * Gets the "time-interval" property. 322 * <p> 323 * Specifies the interval at which to check whether the log files 324 * need to be rotated. 325 * 326 * @return Returns the value of the "time-interval" property. 327 */ 328 long getTimeInterval(); 329 330 331 332 /** 333 * Sets the "time-interval" property. 334 * <p> 335 * Specifies the interval at which to check whether the log files 336 * need to be rotated. 337 * 338 * @param value The value of the "time-interval" property. 339 * @throws PropertyException 340 * If the new value is invalid. 341 */ 342 void setTimeInterval(Long value) throws PropertyException; 343 344}