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.meta; 027 028 029 030import java.util.Collection; 031import java.util.SortedSet; 032import java.util.TreeSet; 033import org.forgerock.opendj.config.server.ConfigException; 034import org.opends.server.admin.AdministratorAction; 035import org.opends.server.admin.AggregationPropertyDefinition; 036import org.opends.server.admin.AliasDefaultBehaviorProvider; 037import org.opends.server.admin.BooleanPropertyDefinition; 038import org.opends.server.admin.ClassPropertyDefinition; 039import org.opends.server.admin.client.AuthorizationException; 040import org.opends.server.admin.client.CommunicationException; 041import org.opends.server.admin.client.ConcurrentModificationException; 042import org.opends.server.admin.client.IllegalManagedObjectNameException; 043import org.opends.server.admin.client.ManagedObject; 044import org.opends.server.admin.client.ManagedObjectDecodingException; 045import org.opends.server.admin.client.MissingMandatoryPropertiesException; 046import org.opends.server.admin.client.OperationRejectedException; 047import org.opends.server.admin.DefaultBehaviorProvider; 048import org.opends.server.admin.DefinedDefaultBehaviorProvider; 049import org.opends.server.admin.DefinitionDecodingException; 050import org.opends.server.admin.DurationPropertyDefinition; 051import org.opends.server.admin.EnumPropertyDefinition; 052import org.opends.server.admin.InstantiableRelationDefinition; 053import org.opends.server.admin.IntegerPropertyDefinition; 054import org.opends.server.admin.ManagedObjectAlreadyExistsException; 055import org.opends.server.admin.ManagedObjectDefinition; 056import org.opends.server.admin.ManagedObjectNotFoundException; 057import org.opends.server.admin.PropertyException; 058import org.opends.server.admin.PropertyOption; 059import org.opends.server.admin.PropertyProvider; 060import org.opends.server.admin.server.ConfigurationAddListener; 061import org.opends.server.admin.server.ConfigurationChangeListener; 062import org.opends.server.admin.server.ConfigurationDeleteListener; 063import org.opends.server.admin.server.ServerManagedObject; 064import org.opends.server.admin.SizePropertyDefinition; 065import org.opends.server.admin.std.client.AccessLogFilteringCriteriaCfgClient; 066import org.opends.server.admin.std.client.FileBasedAccessLogPublisherCfgClient; 067import org.opends.server.admin.std.client.LogRetentionPolicyCfgClient; 068import org.opends.server.admin.std.client.LogRotationPolicyCfgClient; 069import org.opends.server.admin.std.meta.AccessLogPublisherCfgDefn.FilteringPolicy; 070import org.opends.server.admin.std.server.AccessLogFilteringCriteriaCfg; 071import org.opends.server.admin.std.server.AccessLogPublisherCfg; 072import org.opends.server.admin.std.server.FileBasedAccessLogPublisherCfg; 073import org.opends.server.admin.std.server.LogPublisherCfg; 074import org.opends.server.admin.std.server.LogRetentionPolicyCfg; 075import org.opends.server.admin.std.server.LogRotationPolicyCfg; 076import org.opends.server.admin.StringPropertyDefinition; 077import org.opends.server.admin.Tag; 078import org.opends.server.admin.UndefinedDefaultBehaviorProvider; 079import org.opends.server.types.DN; 080 081 082 083/** 084 * An interface for querying the File Based Access Log Publisher 085 * managed object definition meta information. 086 * <p> 087 * File Based Access Log Publishers publish access messages to the 088 * file system. 089 */ 090public final class FileBasedAccessLogPublisherCfgDefn extends ManagedObjectDefinition<FileBasedAccessLogPublisherCfgClient, FileBasedAccessLogPublisherCfg> { 091 092 // The singleton configuration definition instance. 093 private static final FileBasedAccessLogPublisherCfgDefn INSTANCE = new FileBasedAccessLogPublisherCfgDefn(); 094 095 096 097 /** 098 * Defines the set of permissable values for the "log-format" property. 099 * <p> 100 * Specifies how log records should be formatted and written to the 101 * access log. 102 */ 103 public static enum LogFormat { 104 105 /** 106 * Combine log records for operation requests and responses into a 107 * single record. This format should be used when log records are 108 * to be filtered based on response criteria (e.g. result code). 109 */ 110 COMBINED("combined"), 111 112 113 114 /** 115 * Outputs separate log records for operation requests and 116 * responses. 117 */ 118 MULTI_LINE("multi-line"); 119 120 121 122 // String representation of the value. 123 private final String name; 124 125 126 127 // Private constructor. 128 private LogFormat(String name) { this.name = name; } 129 130 131 132 /** 133 * {@inheritDoc} 134 */ 135 public String toString() { return name; } 136 137 } 138 139 140 141 // The "append" property definition. 142 private static final BooleanPropertyDefinition PD_APPEND; 143 144 145 146 // The "asynchronous" property definition. 147 private static final BooleanPropertyDefinition PD_ASYNCHRONOUS; 148 149 150 151 // The "auto-flush" property definition. 152 private static final BooleanPropertyDefinition PD_AUTO_FLUSH; 153 154 155 156 // The "buffer-size" property definition. 157 private static final SizePropertyDefinition PD_BUFFER_SIZE; 158 159 160 161 // The "java-class" property definition. 162 private static final ClassPropertyDefinition PD_JAVA_CLASS; 163 164 165 166 // The "log-control-oids" property definition. 167 private static final BooleanPropertyDefinition PD_LOG_CONTROL_OIDS; 168 169 170 171 // The "log-file" property definition. 172 private static final StringPropertyDefinition PD_LOG_FILE; 173 174 175 176 // The "log-file-permissions" property definition. 177 private static final StringPropertyDefinition PD_LOG_FILE_PERMISSIONS; 178 179 180 181 // The "log-format" property definition. 182 private static final EnumPropertyDefinition<LogFormat> PD_LOG_FORMAT; 183 184 185 186 // The "log-record-time-format" property definition. 187 private static final StringPropertyDefinition PD_LOG_RECORD_TIME_FORMAT; 188 189 190 191 // The "queue-size" property definition. 192 private static final IntegerPropertyDefinition PD_QUEUE_SIZE; 193 194 195 196 // The "retention-policy" property definition. 197 private static final AggregationPropertyDefinition<LogRetentionPolicyCfgClient, LogRetentionPolicyCfg> PD_RETENTION_POLICY; 198 199 200 201 // The "rotation-policy" property definition. 202 private static final AggregationPropertyDefinition<LogRotationPolicyCfgClient, LogRotationPolicyCfg> PD_ROTATION_POLICY; 203 204 205 206 // The "time-interval" property definition. 207 private static final DurationPropertyDefinition PD_TIME_INTERVAL; 208 209 210 211 // Build the "append" property definition. 212 static { 213 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "append"); 214 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "append")); 215 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true"); 216 builder.setDefaultBehaviorProvider(provider); 217 PD_APPEND = builder.getInstance(); 218 INSTANCE.registerPropertyDefinition(PD_APPEND); 219 } 220 221 222 223 // Build the "asynchronous" property definition. 224 static { 225 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "asynchronous"); 226 builder.setOption(PropertyOption.MANDATORY); 227 builder.setOption(PropertyOption.ADVANCED); 228 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "asynchronous")); 229 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true"); 230 builder.setDefaultBehaviorProvider(provider); 231 PD_ASYNCHRONOUS = builder.getInstance(); 232 INSTANCE.registerPropertyDefinition(PD_ASYNCHRONOUS); 233 } 234 235 236 237 // Build the "auto-flush" property definition. 238 static { 239 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "auto-flush"); 240 builder.setOption(PropertyOption.ADVANCED); 241 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "auto-flush")); 242 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true"); 243 builder.setDefaultBehaviorProvider(provider); 244 PD_AUTO_FLUSH = builder.getInstance(); 245 INSTANCE.registerPropertyDefinition(PD_AUTO_FLUSH); 246 } 247 248 249 250 // Build the "buffer-size" property definition. 251 static { 252 SizePropertyDefinition.Builder builder = SizePropertyDefinition.createBuilder(INSTANCE, "buffer-size"); 253 builder.setOption(PropertyOption.ADVANCED); 254 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "buffer-size")); 255 DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("64kb"); 256 builder.setDefaultBehaviorProvider(provider); 257 builder.setLowerLimit("1"); 258 PD_BUFFER_SIZE = builder.getInstance(); 259 INSTANCE.registerPropertyDefinition(PD_BUFFER_SIZE); 260 } 261 262 263 264 // Build the "java-class" property definition. 265 static { 266 ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class"); 267 builder.setOption(PropertyOption.MANDATORY); 268 builder.setOption(PropertyOption.ADVANCED); 269 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "java-class")); 270 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.loggers.TextAccessLogPublisher"); 271 builder.setDefaultBehaviorProvider(provider); 272 builder.addInstanceOf("org.opends.server.loggers.LogPublisher"); 273 PD_JAVA_CLASS = builder.getInstance(); 274 INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS); 275 } 276 277 278 279 // Build the "log-control-oids" property definition. 280 static { 281 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "log-control-oids"); 282 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "log-control-oids")); 283 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false"); 284 builder.setDefaultBehaviorProvider(provider); 285 PD_LOG_CONTROL_OIDS = builder.getInstance(); 286 INSTANCE.registerPropertyDefinition(PD_LOG_CONTROL_OIDS); 287 } 288 289 290 291 // Build the "log-file" property definition. 292 static { 293 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "log-file"); 294 builder.setOption(PropertyOption.MANDATORY); 295 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "log-file")); 296 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 297 builder.setPattern(".*", "FILE"); 298 PD_LOG_FILE = builder.getInstance(); 299 INSTANCE.registerPropertyDefinition(PD_LOG_FILE); 300 } 301 302 303 304 // Build the "log-file-permissions" property definition. 305 static { 306 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "log-file-permissions"); 307 builder.setOption(PropertyOption.MANDATORY); 308 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "log-file-permissions")); 309 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("640"); 310 builder.setDefaultBehaviorProvider(provider); 311 builder.setPattern("^([0-7][0-7][0-7])$", "MODE"); 312 PD_LOG_FILE_PERMISSIONS = builder.getInstance(); 313 INSTANCE.registerPropertyDefinition(PD_LOG_FILE_PERMISSIONS); 314 } 315 316 317 318 // Build the "log-format" property definition. 319 static { 320 EnumPropertyDefinition.Builder<LogFormat> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "log-format"); 321 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "log-format")); 322 DefaultBehaviorProvider<LogFormat> provider = new DefinedDefaultBehaviorProvider<LogFormat>("multi-line"); 323 builder.setDefaultBehaviorProvider(provider); 324 builder.setEnumClass(LogFormat.class); 325 PD_LOG_FORMAT = builder.getInstance(); 326 INSTANCE.registerPropertyDefinition(PD_LOG_FORMAT); 327 } 328 329 330 331 // Build the "log-record-time-format" property definition. 332 static { 333 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "log-record-time-format"); 334 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "log-record-time-format")); 335 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("dd/MMM/yyyy:HH:mm:ss Z"); 336 builder.setDefaultBehaviorProvider(provider); 337 builder.setPattern(".*", "STRING"); 338 PD_LOG_RECORD_TIME_FORMAT = builder.getInstance(); 339 INSTANCE.registerPropertyDefinition(PD_LOG_RECORD_TIME_FORMAT); 340 } 341 342 343 344 // Build the "queue-size" property definition. 345 static { 346 IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "queue-size"); 347 builder.setOption(PropertyOption.ADVANCED); 348 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.OTHER, INSTANCE, "queue-size")); 349 DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("5000"); 350 builder.setDefaultBehaviorProvider(provider); 351 builder.setLowerLimit(0); 352 PD_QUEUE_SIZE = builder.getInstance(); 353 INSTANCE.registerPropertyDefinition(PD_QUEUE_SIZE); 354 } 355 356 357 358 // Build the "retention-policy" property definition. 359 static { 360 AggregationPropertyDefinition.Builder<LogRetentionPolicyCfgClient, LogRetentionPolicyCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "retention-policy"); 361 builder.setOption(PropertyOption.MULTI_VALUED); 362 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "retention-policy")); 363 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "retention-policy")); 364 builder.setParentPath("/"); 365 builder.setRelationDefinition("log-retention-policy"); 366 PD_RETENTION_POLICY = builder.getInstance(); 367 INSTANCE.registerPropertyDefinition(PD_RETENTION_POLICY); 368 INSTANCE.registerConstraint(PD_RETENTION_POLICY.getSourceConstraint()); 369 } 370 371 372 373 // Build the "rotation-policy" property definition. 374 static { 375 AggregationPropertyDefinition.Builder<LogRotationPolicyCfgClient, LogRotationPolicyCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "rotation-policy"); 376 builder.setOption(PropertyOption.MULTI_VALUED); 377 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "rotation-policy")); 378 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "rotation-policy")); 379 builder.setParentPath("/"); 380 builder.setRelationDefinition("log-rotation-policy"); 381 PD_ROTATION_POLICY = builder.getInstance(); 382 INSTANCE.registerPropertyDefinition(PD_ROTATION_POLICY); 383 INSTANCE.registerConstraint(PD_ROTATION_POLICY.getSourceConstraint()); 384 } 385 386 387 388 // Build the "time-interval" property definition. 389 static { 390 DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "time-interval"); 391 builder.setOption(PropertyOption.ADVANCED); 392 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "time-interval")); 393 DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("5s"); 394 builder.setDefaultBehaviorProvider(provider); 395 builder.setBaseUnit("ms"); 396 builder.setLowerLimit("1"); 397 PD_TIME_INTERVAL = builder.getInstance(); 398 INSTANCE.registerPropertyDefinition(PD_TIME_INTERVAL); 399 } 400 401 402 403 // Register the tags associated with this managed object definition. 404 static { 405 INSTANCE.registerTag(Tag.valueOf("logging")); 406 } 407 408 409 410 /** 411 * Get the File Based Access Log Publisher configuration definition 412 * singleton. 413 * 414 * @return Returns the File Based Access Log Publisher configuration 415 * definition singleton. 416 */ 417 public static FileBasedAccessLogPublisherCfgDefn getInstance() { 418 return INSTANCE; 419 } 420 421 422 423 /** 424 * Private constructor. 425 */ 426 private FileBasedAccessLogPublisherCfgDefn() { 427 super("file-based-access-log-publisher", AccessLogPublisherCfgDefn.getInstance()); 428 } 429 430 431 432 /** 433 * {@inheritDoc} 434 */ 435 public FileBasedAccessLogPublisherCfgClient createClientConfiguration( 436 ManagedObject<? extends FileBasedAccessLogPublisherCfgClient> impl) { 437 return new FileBasedAccessLogPublisherCfgClientImpl(impl); 438 } 439 440 441 442 /** 443 * {@inheritDoc} 444 */ 445 public FileBasedAccessLogPublisherCfg createServerConfiguration( 446 ServerManagedObject<? extends FileBasedAccessLogPublisherCfg> impl) { 447 return new FileBasedAccessLogPublisherCfgServerImpl(impl); 448 } 449 450 451 452 /** 453 * {@inheritDoc} 454 */ 455 public Class<FileBasedAccessLogPublisherCfg> getServerConfigurationClass() { 456 return FileBasedAccessLogPublisherCfg.class; 457 } 458 459 460 461 /** 462 * Get the "append" property definition. 463 * <p> 464 * Specifies whether to append to existing log files. 465 * 466 * @return Returns the "append" property definition. 467 */ 468 public BooleanPropertyDefinition getAppendPropertyDefinition() { 469 return PD_APPEND; 470 } 471 472 473 474 /** 475 * Get the "asynchronous" property definition. 476 * <p> 477 * Indicates whether the File Based Access Log Publisher will 478 * publish records asynchronously. 479 * 480 * @return Returns the "asynchronous" property definition. 481 */ 482 public BooleanPropertyDefinition getAsynchronousPropertyDefinition() { 483 return PD_ASYNCHRONOUS; 484 } 485 486 487 488 /** 489 * Get the "auto-flush" property definition. 490 * <p> 491 * Specifies whether to flush the writer after every log record. 492 * <p> 493 * If the asynchronous writes option is used, the writer is flushed 494 * after all the log records in the queue are written. 495 * 496 * @return Returns the "auto-flush" property definition. 497 */ 498 public BooleanPropertyDefinition getAutoFlushPropertyDefinition() { 499 return PD_AUTO_FLUSH; 500 } 501 502 503 504 /** 505 * Get the "buffer-size" property definition. 506 * <p> 507 * Specifies the log file buffer size. 508 * 509 * @return Returns the "buffer-size" property definition. 510 */ 511 public SizePropertyDefinition getBufferSizePropertyDefinition() { 512 return PD_BUFFER_SIZE; 513 } 514 515 516 517 /** 518 * Get the "enabled" property definition. 519 * <p> 520 * Indicates whether the File Based Access Log Publisher is enabled 521 * for use. 522 * 523 * @return Returns the "enabled" property definition. 524 */ 525 public BooleanPropertyDefinition getEnabledPropertyDefinition() { 526 return AccessLogPublisherCfgDefn.getInstance().getEnabledPropertyDefinition(); 527 } 528 529 530 531 /** 532 * Get the "filtering-policy" property definition. 533 * <p> 534 * Specifies how filtering criteria should be applied to log 535 * records. 536 * 537 * @return Returns the "filtering-policy" property definition. 538 */ 539 public EnumPropertyDefinition<FilteringPolicy> getFilteringPolicyPropertyDefinition() { 540 return AccessLogPublisherCfgDefn.getInstance().getFilteringPolicyPropertyDefinition(); 541 } 542 543 544 545 /** 546 * Get the "java-class" property definition. 547 * <p> 548 * The fully-qualified name of the Java class that provides the File 549 * Based Access Log Publisher implementation. 550 * 551 * @return Returns the "java-class" property definition. 552 */ 553 public ClassPropertyDefinition getJavaClassPropertyDefinition() { 554 return PD_JAVA_CLASS; 555 } 556 557 558 559 /** 560 * Get the "log-control-oids" property definition. 561 * <p> 562 * Specifies whether control OIDs will be included in operation log 563 * records. 564 * 565 * @return Returns the "log-control-oids" property definition. 566 */ 567 public BooleanPropertyDefinition getLogControlOidsPropertyDefinition() { 568 return PD_LOG_CONTROL_OIDS; 569 } 570 571 572 573 /** 574 * Get the "log-file" property definition. 575 * <p> 576 * The file name to use for the log files generated by the File 577 * Based Access Log Publisher. The path to the file is relative to 578 * the server root. 579 * 580 * @return Returns the "log-file" property definition. 581 */ 582 public StringPropertyDefinition getLogFilePropertyDefinition() { 583 return PD_LOG_FILE; 584 } 585 586 587 588 /** 589 * Get the "log-file-permissions" property definition. 590 * <p> 591 * The UNIX permissions of the log files created by this File Based 592 * Access Log Publisher. 593 * 594 * @return Returns the "log-file-permissions" property definition. 595 */ 596 public StringPropertyDefinition getLogFilePermissionsPropertyDefinition() { 597 return PD_LOG_FILE_PERMISSIONS; 598 } 599 600 601 602 /** 603 * Get the "log-format" property definition. 604 * <p> 605 * Specifies how log records should be formatted and written to the 606 * access log. 607 * 608 * @return Returns the "log-format" property definition. 609 */ 610 public EnumPropertyDefinition<LogFormat> getLogFormatPropertyDefinition() { 611 return PD_LOG_FORMAT; 612 } 613 614 615 616 /** 617 * Get the "log-record-time-format" property definition. 618 * <p> 619 * Specifies the format string that is used to generate log record 620 * timestamps. 621 * 622 * @return Returns the "log-record-time-format" property definition. 623 */ 624 public StringPropertyDefinition getLogRecordTimeFormatPropertyDefinition() { 625 return PD_LOG_RECORD_TIME_FORMAT; 626 } 627 628 629 630 /** 631 * Get the "queue-size" property definition. 632 * <p> 633 * The maximum number of log records that can be stored in the 634 * asynchronous queue. 635 * <p> 636 * Setting the queue size to zero activates parallel log writer 637 * implementation which has no queue size limit and as such the 638 * parallel log writer should only be used on a very well tuned 639 * server configuration to avoid potential out of memory errors. 640 * 641 * @return Returns the "queue-size" property definition. 642 */ 643 public IntegerPropertyDefinition getQueueSizePropertyDefinition() { 644 return PD_QUEUE_SIZE; 645 } 646 647 648 649 /** 650 * Get the "retention-policy" property definition. 651 * <p> 652 * The retention policy to use for the File Based Access Log 653 * Publisher . 654 * <p> 655 * When multiple policies are used, log files are cleaned when any 656 * of the policy's conditions are met. 657 * 658 * @return Returns the "retention-policy" property definition. 659 */ 660 public AggregationPropertyDefinition<LogRetentionPolicyCfgClient, LogRetentionPolicyCfg> getRetentionPolicyPropertyDefinition() { 661 return PD_RETENTION_POLICY; 662 } 663 664 665 666 /** 667 * Get the "rotation-policy" property definition. 668 * <p> 669 * The rotation policy to use for the File Based Access Log 670 * Publisher . 671 * <p> 672 * When multiple policies are used, rotation will occur if any 673 * policy's conditions are met. 674 * 675 * @return Returns the "rotation-policy" property definition. 676 */ 677 public AggregationPropertyDefinition<LogRotationPolicyCfgClient, LogRotationPolicyCfg> getRotationPolicyPropertyDefinition() { 678 return PD_ROTATION_POLICY; 679 } 680 681 682 683 /** 684 * Get the "suppress-internal-operations" property definition. 685 * <p> 686 * Indicates whether internal operations (for example, operations 687 * that are initiated by plugins) should be logged along with the 688 * operations that are requested by users. 689 * 690 * @return Returns the "suppress-internal-operations" property definition. 691 */ 692 public BooleanPropertyDefinition getSuppressInternalOperationsPropertyDefinition() { 693 return AccessLogPublisherCfgDefn.getInstance().getSuppressInternalOperationsPropertyDefinition(); 694 } 695 696 697 698 /** 699 * Get the "suppress-synchronization-operations" property definition. 700 * <p> 701 * Indicates whether access messages that are generated by 702 * synchronization operations should be suppressed. 703 * 704 * @return Returns the "suppress-synchronization-operations" property definition. 705 */ 706 public BooleanPropertyDefinition getSuppressSynchronizationOperationsPropertyDefinition() { 707 return AccessLogPublisherCfgDefn.getInstance().getSuppressSynchronizationOperationsPropertyDefinition(); 708 } 709 710 711 712 /** 713 * Get the "time-interval" property definition. 714 * <p> 715 * Specifies the interval at which to check whether the log files 716 * need to be rotated. 717 * 718 * @return Returns the "time-interval" property definition. 719 */ 720 public DurationPropertyDefinition getTimeIntervalPropertyDefinition() { 721 return PD_TIME_INTERVAL; 722 } 723 724 725 726 /** 727 * Get the "access-log-filtering-criteria" relation definition. 728 * 729 * @return Returns the "access-log-filtering-criteria" relation definition. 730 */ 731 public InstantiableRelationDefinition<AccessLogFilteringCriteriaCfgClient,AccessLogFilteringCriteriaCfg> getAccessLogFilteringCriteriaRelationDefinition() { 732 return AccessLogPublisherCfgDefn.getInstance().getAccessLogFilteringCriteriaRelationDefinition(); 733 } 734 735 736 737 /** 738 * Managed object client implementation. 739 */ 740 private static class FileBasedAccessLogPublisherCfgClientImpl implements 741 FileBasedAccessLogPublisherCfgClient { 742 743 // Private implementation. 744 private ManagedObject<? extends FileBasedAccessLogPublisherCfgClient> impl; 745 746 747 748 // Private constructor. 749 private FileBasedAccessLogPublisherCfgClientImpl( 750 ManagedObject<? extends FileBasedAccessLogPublisherCfgClient> impl) { 751 this.impl = impl; 752 } 753 754 755 756 /** 757 * {@inheritDoc} 758 */ 759 public boolean isAppend() { 760 return impl.getPropertyValue(INSTANCE.getAppendPropertyDefinition()); 761 } 762 763 764 765 /** 766 * {@inheritDoc} 767 */ 768 public void setAppend(Boolean value) { 769 impl.setPropertyValue(INSTANCE.getAppendPropertyDefinition(), value); 770 } 771 772 773 774 /** 775 * {@inheritDoc} 776 */ 777 public boolean isAsynchronous() { 778 return impl.getPropertyValue(INSTANCE.getAsynchronousPropertyDefinition()); 779 } 780 781 782 783 /** 784 * {@inheritDoc} 785 */ 786 public void setAsynchronous(boolean value) { 787 impl.setPropertyValue(INSTANCE.getAsynchronousPropertyDefinition(), value); 788 } 789 790 791 792 /** 793 * {@inheritDoc} 794 */ 795 public boolean isAutoFlush() { 796 return impl.getPropertyValue(INSTANCE.getAutoFlushPropertyDefinition()); 797 } 798 799 800 801 /** 802 * {@inheritDoc} 803 */ 804 public void setAutoFlush(Boolean value) { 805 impl.setPropertyValue(INSTANCE.getAutoFlushPropertyDefinition(), value); 806 } 807 808 809 810 /** 811 * {@inheritDoc} 812 */ 813 public long getBufferSize() { 814 return impl.getPropertyValue(INSTANCE.getBufferSizePropertyDefinition()); 815 } 816 817 818 819 /** 820 * {@inheritDoc} 821 */ 822 public void setBufferSize(Long value) { 823 impl.setPropertyValue(INSTANCE.getBufferSizePropertyDefinition(), value); 824 } 825 826 827 828 /** 829 * {@inheritDoc} 830 */ 831 public Boolean isEnabled() { 832 return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 833 } 834 835 836 837 /** 838 * {@inheritDoc} 839 */ 840 public void setEnabled(boolean value) { 841 impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value); 842 } 843 844 845 846 /** 847 * {@inheritDoc} 848 */ 849 public FilteringPolicy getFilteringPolicy() { 850 return impl.getPropertyValue(INSTANCE.getFilteringPolicyPropertyDefinition()); 851 } 852 853 854 855 /** 856 * {@inheritDoc} 857 */ 858 public void setFilteringPolicy(FilteringPolicy value) { 859 impl.setPropertyValue(INSTANCE.getFilteringPolicyPropertyDefinition(), value); 860 } 861 862 863 864 /** 865 * {@inheritDoc} 866 */ 867 public String getJavaClass() { 868 return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 869 } 870 871 872 873 /** 874 * {@inheritDoc} 875 */ 876 public void setJavaClass(String value) { 877 impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value); 878 } 879 880 881 882 /** 883 * {@inheritDoc} 884 */ 885 public boolean isLogControlOids() { 886 return impl.getPropertyValue(INSTANCE.getLogControlOidsPropertyDefinition()); 887 } 888 889 890 891 /** 892 * {@inheritDoc} 893 */ 894 public void setLogControlOids(Boolean value) { 895 impl.setPropertyValue(INSTANCE.getLogControlOidsPropertyDefinition(), value); 896 } 897 898 899 900 /** 901 * {@inheritDoc} 902 */ 903 public String getLogFile() { 904 return impl.getPropertyValue(INSTANCE.getLogFilePropertyDefinition()); 905 } 906 907 908 909 /** 910 * {@inheritDoc} 911 */ 912 public void setLogFile(String value) { 913 impl.setPropertyValue(INSTANCE.getLogFilePropertyDefinition(), value); 914 } 915 916 917 918 /** 919 * {@inheritDoc} 920 */ 921 public String getLogFilePermissions() { 922 return impl.getPropertyValue(INSTANCE.getLogFilePermissionsPropertyDefinition()); 923 } 924 925 926 927 /** 928 * {@inheritDoc} 929 */ 930 public void setLogFilePermissions(String value) { 931 impl.setPropertyValue(INSTANCE.getLogFilePermissionsPropertyDefinition(), value); 932 } 933 934 935 936 /** 937 * {@inheritDoc} 938 */ 939 public LogFormat getLogFormat() { 940 return impl.getPropertyValue(INSTANCE.getLogFormatPropertyDefinition()); 941 } 942 943 944 945 /** 946 * {@inheritDoc} 947 */ 948 public void setLogFormat(LogFormat value) { 949 impl.setPropertyValue(INSTANCE.getLogFormatPropertyDefinition(), value); 950 } 951 952 953 954 /** 955 * {@inheritDoc} 956 */ 957 public String getLogRecordTimeFormat() { 958 return impl.getPropertyValue(INSTANCE.getLogRecordTimeFormatPropertyDefinition()); 959 } 960 961 962 963 /** 964 * {@inheritDoc} 965 */ 966 public void setLogRecordTimeFormat(String value) { 967 impl.setPropertyValue(INSTANCE.getLogRecordTimeFormatPropertyDefinition(), value); 968 } 969 970 971 972 /** 973 * {@inheritDoc} 974 */ 975 public int getQueueSize() { 976 return impl.getPropertyValue(INSTANCE.getQueueSizePropertyDefinition()); 977 } 978 979 980 981 /** 982 * {@inheritDoc} 983 */ 984 public void setQueueSize(Integer value) { 985 impl.setPropertyValue(INSTANCE.getQueueSizePropertyDefinition(), value); 986 } 987 988 989 990 /** 991 * {@inheritDoc} 992 */ 993 public SortedSet<String> getRetentionPolicy() { 994 return impl.getPropertyValues(INSTANCE.getRetentionPolicyPropertyDefinition()); 995 } 996 997 998 999 /** 1000 * {@inheritDoc} 1001 */ 1002 public void setRetentionPolicy(Collection<String> values) { 1003 impl.setPropertyValues(INSTANCE.getRetentionPolicyPropertyDefinition(), values); 1004 } 1005 1006 1007 1008 /** 1009 * {@inheritDoc} 1010 */ 1011 public SortedSet<String> getRotationPolicy() { 1012 return impl.getPropertyValues(INSTANCE.getRotationPolicyPropertyDefinition()); 1013 } 1014 1015 1016 1017 /** 1018 * {@inheritDoc} 1019 */ 1020 public void setRotationPolicy(Collection<String> values) { 1021 impl.setPropertyValues(INSTANCE.getRotationPolicyPropertyDefinition(), values); 1022 } 1023 1024 1025 1026 /** 1027 * {@inheritDoc} 1028 */ 1029 public boolean isSuppressInternalOperations() { 1030 return impl.getPropertyValue(INSTANCE.getSuppressInternalOperationsPropertyDefinition()); 1031 } 1032 1033 1034 1035 /** 1036 * {@inheritDoc} 1037 */ 1038 public void setSuppressInternalOperations(Boolean value) { 1039 impl.setPropertyValue(INSTANCE.getSuppressInternalOperationsPropertyDefinition(), value); 1040 } 1041 1042 1043 1044 /** 1045 * {@inheritDoc} 1046 */ 1047 public boolean isSuppressSynchronizationOperations() { 1048 return impl.getPropertyValue(INSTANCE.getSuppressSynchronizationOperationsPropertyDefinition()); 1049 } 1050 1051 1052 1053 /** 1054 * {@inheritDoc} 1055 */ 1056 public void setSuppressSynchronizationOperations(Boolean value) { 1057 impl.setPropertyValue(INSTANCE.getSuppressSynchronizationOperationsPropertyDefinition(), value); 1058 } 1059 1060 1061 1062 /** 1063 * {@inheritDoc} 1064 */ 1065 public long getTimeInterval() { 1066 return impl.getPropertyValue(INSTANCE.getTimeIntervalPropertyDefinition()); 1067 } 1068 1069 1070 1071 /** 1072 * {@inheritDoc} 1073 */ 1074 public void setTimeInterval(Long value) { 1075 impl.setPropertyValue(INSTANCE.getTimeIntervalPropertyDefinition(), value); 1076 } 1077 1078 1079 1080 /** 1081 * {@inheritDoc} 1082 */ 1083 public String[] listAccessLogFilteringCriteria() throws ConcurrentModificationException, 1084 AuthorizationException, CommunicationException { 1085 return impl.listChildren(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition()); 1086 } 1087 1088 1089 1090 /** 1091 * {@inheritDoc} 1092 */ 1093 public AccessLogFilteringCriteriaCfgClient getAccessLogFilteringCriteria(String name) 1094 throws DefinitionDecodingException, ManagedObjectDecodingException, 1095 ManagedObjectNotFoundException, ConcurrentModificationException, 1096 AuthorizationException, CommunicationException { 1097 return impl.getChild(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition(), name).getConfiguration(); 1098 } 1099 1100 1101 1102 /** 1103 * {@inheritDoc} 1104 */ 1105 public <M extends AccessLogFilteringCriteriaCfgClient> M createAccessLogFilteringCriteria( 1106 ManagedObjectDefinition<M, ? extends AccessLogFilteringCriteriaCfg> d, String name, Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException { 1107 return impl.createChild(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition(), d, name, exceptions).getConfiguration(); 1108 } 1109 1110 1111 1112 /** 1113 * {@inheritDoc} 1114 */ 1115 public void removeAccessLogFilteringCriteria(String name) 1116 throws ManagedObjectNotFoundException, ConcurrentModificationException, 1117 OperationRejectedException, AuthorizationException, CommunicationException { 1118 impl.removeChild(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition(), name); 1119 } 1120 1121 1122 1123 /** 1124 * {@inheritDoc} 1125 */ 1126 public ManagedObjectDefinition<? extends FileBasedAccessLogPublisherCfgClient, ? extends FileBasedAccessLogPublisherCfg> definition() { 1127 return INSTANCE; 1128 } 1129 1130 1131 1132 /** 1133 * {@inheritDoc} 1134 */ 1135 public PropertyProvider properties() { 1136 return impl; 1137 } 1138 1139 1140 1141 /** 1142 * {@inheritDoc} 1143 */ 1144 public void commit() throws ManagedObjectAlreadyExistsException, 1145 MissingMandatoryPropertiesException, ConcurrentModificationException, 1146 OperationRejectedException, AuthorizationException, 1147 CommunicationException { 1148 impl.commit(); 1149 } 1150 1151 } 1152 1153 1154 1155 /** 1156 * Managed object server implementation. 1157 */ 1158 private static class FileBasedAccessLogPublisherCfgServerImpl implements 1159 FileBasedAccessLogPublisherCfg { 1160 1161 // Private implementation. 1162 private ServerManagedObject<? extends FileBasedAccessLogPublisherCfg> impl; 1163 1164 // The value of the "append" property. 1165 private final boolean pAppend; 1166 1167 // The value of the "asynchronous" property. 1168 private final boolean pAsynchronous; 1169 1170 // The value of the "auto-flush" property. 1171 private final boolean pAutoFlush; 1172 1173 // The value of the "buffer-size" property. 1174 private final long pBufferSize; 1175 1176 // The value of the "enabled" property. 1177 private final boolean pEnabled; 1178 1179 // The value of the "filtering-policy" property. 1180 private final FilteringPolicy pFilteringPolicy; 1181 1182 // The value of the "java-class" property. 1183 private final String pJavaClass; 1184 1185 // The value of the "log-control-oids" property. 1186 private final boolean pLogControlOids; 1187 1188 // The value of the "log-file" property. 1189 private final String pLogFile; 1190 1191 // The value of the "log-file-permissions" property. 1192 private final String pLogFilePermissions; 1193 1194 // The value of the "log-format" property. 1195 private final LogFormat pLogFormat; 1196 1197 // The value of the "log-record-time-format" property. 1198 private final String pLogRecordTimeFormat; 1199 1200 // The value of the "queue-size" property. 1201 private final int pQueueSize; 1202 1203 // The value of the "retention-policy" property. 1204 private final SortedSet<String> pRetentionPolicy; 1205 1206 // The value of the "rotation-policy" property. 1207 private final SortedSet<String> pRotationPolicy; 1208 1209 // The value of the "suppress-internal-operations" property. 1210 private final boolean pSuppressInternalOperations; 1211 1212 // The value of the "suppress-synchronization-operations" property. 1213 private final boolean pSuppressSynchronizationOperations; 1214 1215 // The value of the "time-interval" property. 1216 private final long pTimeInterval; 1217 1218 1219 1220 // Private constructor. 1221 private FileBasedAccessLogPublisherCfgServerImpl(ServerManagedObject<? extends FileBasedAccessLogPublisherCfg> impl) { 1222 this.impl = impl; 1223 this.pAppend = impl.getPropertyValue(INSTANCE.getAppendPropertyDefinition()); 1224 this.pAsynchronous = impl.getPropertyValue(INSTANCE.getAsynchronousPropertyDefinition()); 1225 this.pAutoFlush = impl.getPropertyValue(INSTANCE.getAutoFlushPropertyDefinition()); 1226 this.pBufferSize = impl.getPropertyValue(INSTANCE.getBufferSizePropertyDefinition()); 1227 this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 1228 this.pFilteringPolicy = impl.getPropertyValue(INSTANCE.getFilteringPolicyPropertyDefinition()); 1229 this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 1230 this.pLogControlOids = impl.getPropertyValue(INSTANCE.getLogControlOidsPropertyDefinition()); 1231 this.pLogFile = impl.getPropertyValue(INSTANCE.getLogFilePropertyDefinition()); 1232 this.pLogFilePermissions = impl.getPropertyValue(INSTANCE.getLogFilePermissionsPropertyDefinition()); 1233 this.pLogFormat = impl.getPropertyValue(INSTANCE.getLogFormatPropertyDefinition()); 1234 this.pLogRecordTimeFormat = impl.getPropertyValue(INSTANCE.getLogRecordTimeFormatPropertyDefinition()); 1235 this.pQueueSize = impl.getPropertyValue(INSTANCE.getQueueSizePropertyDefinition()); 1236 this.pRetentionPolicy = impl.getPropertyValues(INSTANCE.getRetentionPolicyPropertyDefinition()); 1237 this.pRotationPolicy = impl.getPropertyValues(INSTANCE.getRotationPolicyPropertyDefinition()); 1238 this.pSuppressInternalOperations = impl.getPropertyValue(INSTANCE.getSuppressInternalOperationsPropertyDefinition()); 1239 this.pSuppressSynchronizationOperations = impl.getPropertyValue(INSTANCE.getSuppressSynchronizationOperationsPropertyDefinition()); 1240 this.pTimeInterval = impl.getPropertyValue(INSTANCE.getTimeIntervalPropertyDefinition()); 1241 } 1242 1243 1244 1245 /** 1246 * {@inheritDoc} 1247 */ 1248 public void addFileBasedAccessChangeListener( 1249 ConfigurationChangeListener<FileBasedAccessLogPublisherCfg> listener) { 1250 impl.registerChangeListener(listener); 1251 } 1252 1253 1254 1255 /** 1256 * {@inheritDoc} 1257 */ 1258 public void removeFileBasedAccessChangeListener( 1259 ConfigurationChangeListener<FileBasedAccessLogPublisherCfg> listener) { 1260 impl.deregisterChangeListener(listener); 1261 } 1262 /** 1263 * {@inheritDoc} 1264 */ 1265 public void addAccessChangeListener( 1266 ConfigurationChangeListener<AccessLogPublisherCfg> listener) { 1267 impl.registerChangeListener(listener); 1268 } 1269 1270 1271 1272 /** 1273 * {@inheritDoc} 1274 */ 1275 public void removeAccessChangeListener( 1276 ConfigurationChangeListener<AccessLogPublisherCfg> listener) { 1277 impl.deregisterChangeListener(listener); 1278 } 1279 /** 1280 * {@inheritDoc} 1281 */ 1282 public void addChangeListener( 1283 ConfigurationChangeListener<LogPublisherCfg> listener) { 1284 impl.registerChangeListener(listener); 1285 } 1286 1287 1288 1289 /** 1290 * {@inheritDoc} 1291 */ 1292 public void removeChangeListener( 1293 ConfigurationChangeListener<LogPublisherCfg> listener) { 1294 impl.deregisterChangeListener(listener); 1295 } 1296 1297 1298 1299 /** 1300 * {@inheritDoc} 1301 */ 1302 public boolean isAppend() { 1303 return pAppend; 1304 } 1305 1306 1307 1308 /** 1309 * {@inheritDoc} 1310 */ 1311 public boolean isAsynchronous() { 1312 return pAsynchronous; 1313 } 1314 1315 1316 1317 /** 1318 * {@inheritDoc} 1319 */ 1320 public boolean isAutoFlush() { 1321 return pAutoFlush; 1322 } 1323 1324 1325 1326 /** 1327 * {@inheritDoc} 1328 */ 1329 public long getBufferSize() { 1330 return pBufferSize; 1331 } 1332 1333 1334 1335 /** 1336 * {@inheritDoc} 1337 */ 1338 public boolean isEnabled() { 1339 return pEnabled; 1340 } 1341 1342 1343 1344 /** 1345 * {@inheritDoc} 1346 */ 1347 public FilteringPolicy getFilteringPolicy() { 1348 return pFilteringPolicy; 1349 } 1350 1351 1352 1353 /** 1354 * {@inheritDoc} 1355 */ 1356 public String getJavaClass() { 1357 return pJavaClass; 1358 } 1359 1360 1361 1362 /** 1363 * {@inheritDoc} 1364 */ 1365 public boolean isLogControlOids() { 1366 return pLogControlOids; 1367 } 1368 1369 1370 1371 /** 1372 * {@inheritDoc} 1373 */ 1374 public String getLogFile() { 1375 return pLogFile; 1376 } 1377 1378 1379 1380 /** 1381 * {@inheritDoc} 1382 */ 1383 public String getLogFilePermissions() { 1384 return pLogFilePermissions; 1385 } 1386 1387 1388 1389 /** 1390 * {@inheritDoc} 1391 */ 1392 public LogFormat getLogFormat() { 1393 return pLogFormat; 1394 } 1395 1396 1397 1398 /** 1399 * {@inheritDoc} 1400 */ 1401 public String getLogRecordTimeFormat() { 1402 return pLogRecordTimeFormat; 1403 } 1404 1405 1406 1407 /** 1408 * {@inheritDoc} 1409 */ 1410 public int getQueueSize() { 1411 return pQueueSize; 1412 } 1413 1414 1415 1416 /** 1417 * {@inheritDoc} 1418 */ 1419 public SortedSet<String> getRetentionPolicy() { 1420 return pRetentionPolicy; 1421 } 1422 1423 1424 1425 /** 1426 * {@inheritDoc} 1427 */ 1428 public SortedSet<DN> getRetentionPolicyDNs() { 1429 SortedSet<String> values = getRetentionPolicy(); 1430 SortedSet<DN> dnValues = new TreeSet<DN>(); 1431 for (String value : values) { 1432 DN dn = INSTANCE.getRetentionPolicyPropertyDefinition().getChildDN(value); 1433 dnValues.add(dn); 1434 } 1435 return dnValues; 1436 } 1437 1438 1439 1440 /** 1441 * {@inheritDoc} 1442 */ 1443 public SortedSet<String> getRotationPolicy() { 1444 return pRotationPolicy; 1445 } 1446 1447 1448 1449 /** 1450 * {@inheritDoc} 1451 */ 1452 public SortedSet<DN> getRotationPolicyDNs() { 1453 SortedSet<String> values = getRotationPolicy(); 1454 SortedSet<DN> dnValues = new TreeSet<DN>(); 1455 for (String value : values) { 1456 DN dn = INSTANCE.getRotationPolicyPropertyDefinition().getChildDN(value); 1457 dnValues.add(dn); 1458 } 1459 return dnValues; 1460 } 1461 1462 1463 1464 /** 1465 * {@inheritDoc} 1466 */ 1467 public boolean isSuppressInternalOperations() { 1468 return pSuppressInternalOperations; 1469 } 1470 1471 1472 1473 /** 1474 * {@inheritDoc} 1475 */ 1476 public boolean isSuppressSynchronizationOperations() { 1477 return pSuppressSynchronizationOperations; 1478 } 1479 1480 1481 1482 /** 1483 * {@inheritDoc} 1484 */ 1485 public long getTimeInterval() { 1486 return pTimeInterval; 1487 } 1488 1489 1490 1491 /** 1492 * {@inheritDoc} 1493 */ 1494 public String[] listAccessLogFilteringCriteria() { 1495 return impl.listChildren(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition()); 1496 } 1497 1498 1499 1500 /** 1501 * {@inheritDoc} 1502 */ 1503 public AccessLogFilteringCriteriaCfg getAccessLogFilteringCriteria(String name) throws ConfigException { 1504 return impl.getChild(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition(), name).getConfiguration(); 1505 } 1506 1507 1508 1509 /** 1510 * {@inheritDoc} 1511 */ 1512 public void addAccessLogFilteringCriteriaAddListener( 1513 ConfigurationAddListener<AccessLogFilteringCriteriaCfg> listener) throws ConfigException { 1514 impl.registerAddListener(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition(), listener); 1515 } 1516 1517 1518 1519 /** 1520 * {@inheritDoc} 1521 */ 1522 public void removeAccessLogFilteringCriteriaAddListener( 1523 ConfigurationAddListener<AccessLogFilteringCriteriaCfg> listener) { 1524 impl.deregisterAddListener(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition(), listener); 1525 } 1526 1527 1528 1529 /** 1530 * {@inheritDoc} 1531 */ 1532 public void addAccessLogFilteringCriteriaDeleteListener( 1533 ConfigurationDeleteListener<AccessLogFilteringCriteriaCfg> listener) throws ConfigException { 1534 impl.registerDeleteListener(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition(), listener); 1535 } 1536 1537 1538 1539 /** 1540 * {@inheritDoc} 1541 */ 1542 public void removeAccessLogFilteringCriteriaDeleteListener( 1543 ConfigurationDeleteListener<AccessLogFilteringCriteriaCfg> listener) { 1544 impl.deregisterDeleteListener(INSTANCE.getAccessLogFilteringCriteriaRelationDefinition(), listener); 1545 } 1546 1547 1548 1549 /** 1550 * {@inheritDoc} 1551 */ 1552 public Class<? extends FileBasedAccessLogPublisherCfg> configurationClass() { 1553 return FileBasedAccessLogPublisherCfg.class; 1554 } 1555 1556 1557 1558 /** 1559 * {@inheritDoc} 1560 */ 1561 public DN dn() { 1562 return impl.getDN(); 1563 } 1564 1565 } 1566}