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.opends.server.admin.AdministratorAction; 034import org.opends.server.admin.AggregationPropertyDefinition; 035import org.opends.server.admin.AliasDefaultBehaviorProvider; 036import org.opends.server.admin.BooleanPropertyDefinition; 037import org.opends.server.admin.ClassPropertyDefinition; 038import org.opends.server.admin.client.AuthorizationException; 039import org.opends.server.admin.client.CommunicationException; 040import org.opends.server.admin.client.ConcurrentModificationException; 041import org.opends.server.admin.client.ManagedObject; 042import org.opends.server.admin.client.MissingMandatoryPropertiesException; 043import org.opends.server.admin.client.OperationRejectedException; 044import org.opends.server.admin.DefaultBehaviorProvider; 045import org.opends.server.admin.DefinedDefaultBehaviorProvider; 046import org.opends.server.admin.DurationPropertyDefinition; 047import org.opends.server.admin.ManagedObjectAlreadyExistsException; 048import org.opends.server.admin.ManagedObjectDefinition; 049import org.opends.server.admin.PropertyOption; 050import org.opends.server.admin.PropertyProvider; 051import org.opends.server.admin.server.ConfigurationChangeListener; 052import org.opends.server.admin.server.ServerManagedObject; 053import org.opends.server.admin.std.client.CsvFileHTTPAccessLogPublisherCfgClient; 054import org.opends.server.admin.std.client.LogRetentionPolicyCfgClient; 055import org.opends.server.admin.std.client.LogRotationPolicyCfgClient; 056import org.opends.server.admin.std.server.CsvFileHTTPAccessLogPublisherCfg; 057import org.opends.server.admin.std.server.HTTPAccessLogPublisherCfg; 058import org.opends.server.admin.std.server.LogPublisherCfg; 059import org.opends.server.admin.std.server.LogRetentionPolicyCfg; 060import org.opends.server.admin.std.server.LogRotationPolicyCfg; 061import org.opends.server.admin.StringPropertyDefinition; 062import org.opends.server.admin.Tag; 063import org.opends.server.admin.UndefinedDefaultBehaviorProvider; 064import org.opends.server.types.DN; 065 066 067 068/** 069 * An interface for querying the Csv File HTTP Access Log Publisher 070 * managed object definition meta information. 071 * <p> 072 * Csv File HTTP Access Log Publishers publish HTTP access messages to 073 * CSV files. 074 */ 075public final class CsvFileHTTPAccessLogPublisherCfgDefn extends ManagedObjectDefinition<CsvFileHTTPAccessLogPublisherCfgClient, CsvFileHTTPAccessLogPublisherCfg> { 076 077 // The singleton configuration definition instance. 078 private static final CsvFileHTTPAccessLogPublisherCfgDefn INSTANCE = new CsvFileHTTPAccessLogPublisherCfgDefn(); 079 080 081 082 // The "asynchronous" property definition. 083 private static final BooleanPropertyDefinition PD_ASYNCHRONOUS; 084 085 086 087 // The "auto-flush" property definition. 088 private static final BooleanPropertyDefinition PD_AUTO_FLUSH; 089 090 091 092 // The "csv-delimiter-char" property definition. 093 private static final StringPropertyDefinition PD_CSV_DELIMITER_CHAR; 094 095 096 097 // The "csv-eol-symbols" property definition. 098 private static final StringPropertyDefinition PD_CSV_EOL_SYMBOLS; 099 100 101 102 // The "csv-quote-char" property definition. 103 private static final StringPropertyDefinition PD_CSV_QUOTE_CHAR; 104 105 106 107 // The "java-class" property definition. 108 private static final ClassPropertyDefinition PD_JAVA_CLASS; 109 110 111 112 // The "key-store-file" property definition. 113 private static final StringPropertyDefinition PD_KEY_STORE_FILE; 114 115 116 117 // The "key-store-pin-file" property definition. 118 private static final StringPropertyDefinition PD_KEY_STORE_PIN_FILE; 119 120 121 122 // The "log-directory" property definition. 123 private static final StringPropertyDefinition PD_LOG_DIRECTORY; 124 125 126 127 // The "retention-policy" property definition. 128 private static final AggregationPropertyDefinition<LogRetentionPolicyCfgClient, LogRetentionPolicyCfg> PD_RETENTION_POLICY; 129 130 131 132 // The "rotation-policy" property definition. 133 private static final AggregationPropertyDefinition<LogRotationPolicyCfgClient, LogRotationPolicyCfg> PD_ROTATION_POLICY; 134 135 136 137 // The "signature-time-interval" property definition. 138 private static final DurationPropertyDefinition PD_SIGNATURE_TIME_INTERVAL; 139 140 141 142 // The "tamper-evident" property definition. 143 private static final BooleanPropertyDefinition PD_TAMPER_EVIDENT; 144 145 146 147 // Build the "asynchronous" property definition. 148 static { 149 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "asynchronous"); 150 builder.setOption(PropertyOption.MANDATORY); 151 builder.setOption(PropertyOption.ADVANCED); 152 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "asynchronous")); 153 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true"); 154 builder.setDefaultBehaviorProvider(provider); 155 PD_ASYNCHRONOUS = builder.getInstance(); 156 INSTANCE.registerPropertyDefinition(PD_ASYNCHRONOUS); 157 } 158 159 160 161 // Build the "auto-flush" property definition. 162 static { 163 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "auto-flush"); 164 builder.setOption(PropertyOption.ADVANCED); 165 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "auto-flush")); 166 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true"); 167 builder.setDefaultBehaviorProvider(provider); 168 PD_AUTO_FLUSH = builder.getInstance(); 169 INSTANCE.registerPropertyDefinition(PD_AUTO_FLUSH); 170 } 171 172 173 174 // Build the "csv-delimiter-char" property definition. 175 static { 176 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "csv-delimiter-char"); 177 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "csv-delimiter-char")); 178 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>(","); 179 builder.setDefaultBehaviorProvider(provider); 180 builder.setPattern(".*", "DELIMITER CHARACTER"); 181 PD_CSV_DELIMITER_CHAR = builder.getInstance(); 182 INSTANCE.registerPropertyDefinition(PD_CSV_DELIMITER_CHAR); 183 } 184 185 186 187 // Build the "csv-eol-symbols" property definition. 188 static { 189 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "csv-eol-symbols"); 190 builder.setOption(PropertyOption.ADVANCED); 191 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "csv-eol-symbols")); 192 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "csv-eol-symbols")); 193 builder.setPattern(".*", "EOL SYMBOLS"); 194 PD_CSV_EOL_SYMBOLS = builder.getInstance(); 195 INSTANCE.registerPropertyDefinition(PD_CSV_EOL_SYMBOLS); 196 } 197 198 199 200 // Build the "csv-quote-char" property definition. 201 static { 202 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "csv-quote-char"); 203 builder.setOption(PropertyOption.ADVANCED); 204 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "csv-quote-char")); 205 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("\""); 206 builder.setDefaultBehaviorProvider(provider); 207 builder.setPattern(".*", "QUOTE CHARACTER"); 208 PD_CSV_QUOTE_CHAR = builder.getInstance(); 209 INSTANCE.registerPropertyDefinition(PD_CSV_QUOTE_CHAR); 210 } 211 212 213 214 // Build the "java-class" property definition. 215 static { 216 ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class"); 217 builder.setOption(PropertyOption.MANDATORY); 218 builder.setOption(PropertyOption.ADVANCED); 219 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "java-class")); 220 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.loggers.CommonAuditHTTPAccessLogPublisher"); 221 builder.setDefaultBehaviorProvider(provider); 222 builder.addInstanceOf("org.opends.server.loggers.LogPublisher"); 223 PD_JAVA_CLASS = builder.getInstance(); 224 INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS); 225 } 226 227 228 229 // Build the "key-store-file" property definition. 230 static { 231 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "key-store-file"); 232 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "key-store-file")); 233 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 234 builder.setPattern(".*", "FILE"); 235 PD_KEY_STORE_FILE = builder.getInstance(); 236 INSTANCE.registerPropertyDefinition(PD_KEY_STORE_FILE); 237 } 238 239 240 241 // Build the "key-store-pin-file" property definition. 242 static { 243 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "key-store-pin-file"); 244 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "key-store-pin-file")); 245 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 246 builder.setPattern(".*", "FILE"); 247 PD_KEY_STORE_PIN_FILE = builder.getInstance(); 248 INSTANCE.registerPropertyDefinition(PD_KEY_STORE_PIN_FILE); 249 } 250 251 252 253 // Build the "log-directory" property definition. 254 static { 255 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "log-directory"); 256 builder.setOption(PropertyOption.MANDATORY); 257 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "log-directory")); 258 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("logs"); 259 builder.setDefaultBehaviorProvider(provider); 260 builder.setPattern(".*", "DIRECTORY"); 261 PD_LOG_DIRECTORY = builder.getInstance(); 262 INSTANCE.registerPropertyDefinition(PD_LOG_DIRECTORY); 263 } 264 265 266 267 // Build the "retention-policy" property definition. 268 static { 269 AggregationPropertyDefinition.Builder<LogRetentionPolicyCfgClient, LogRetentionPolicyCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "retention-policy"); 270 builder.setOption(PropertyOption.MULTI_VALUED); 271 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "retention-policy")); 272 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "retention-policy")); 273 builder.setParentPath("/"); 274 builder.setRelationDefinition("log-retention-policy"); 275 PD_RETENTION_POLICY = builder.getInstance(); 276 INSTANCE.registerPropertyDefinition(PD_RETENTION_POLICY); 277 INSTANCE.registerConstraint(PD_RETENTION_POLICY.getSourceConstraint()); 278 } 279 280 281 282 // Build the "rotation-policy" property definition. 283 static { 284 AggregationPropertyDefinition.Builder<LogRotationPolicyCfgClient, LogRotationPolicyCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "rotation-policy"); 285 builder.setOption(PropertyOption.MULTI_VALUED); 286 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "rotation-policy")); 287 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "rotation-policy")); 288 builder.setParentPath("/"); 289 builder.setRelationDefinition("log-rotation-policy"); 290 PD_ROTATION_POLICY = builder.getInstance(); 291 INSTANCE.registerPropertyDefinition(PD_ROTATION_POLICY); 292 INSTANCE.registerConstraint(PD_ROTATION_POLICY.getSourceConstraint()); 293 } 294 295 296 297 // Build the "signature-time-interval" property definition. 298 static { 299 DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "signature-time-interval"); 300 builder.setOption(PropertyOption.ADVANCED); 301 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "signature-time-interval")); 302 DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("3s"); 303 builder.setDefaultBehaviorProvider(provider); 304 builder.setBaseUnit("ms"); 305 builder.setLowerLimit("1"); 306 PD_SIGNATURE_TIME_INTERVAL = builder.getInstance(); 307 INSTANCE.registerPropertyDefinition(PD_SIGNATURE_TIME_INTERVAL); 308 } 309 310 311 312 // Build the "tamper-evident" property definition. 313 static { 314 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "tamper-evident"); 315 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "tamper-evident")); 316 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false"); 317 builder.setDefaultBehaviorProvider(provider); 318 PD_TAMPER_EVIDENT = builder.getInstance(); 319 INSTANCE.registerPropertyDefinition(PD_TAMPER_EVIDENT); 320 } 321 322 323 324 // Register the tags associated with this managed object definition. 325 static { 326 INSTANCE.registerTag(Tag.valueOf("logging")); 327 } 328 329 330 331 /** 332 * Get the Csv File HTTP Access Log Publisher configuration 333 * definition singleton. 334 * 335 * @return Returns the Csv File HTTP Access Log Publisher 336 * configuration definition singleton. 337 */ 338 public static CsvFileHTTPAccessLogPublisherCfgDefn getInstance() { 339 return INSTANCE; 340 } 341 342 343 344 /** 345 * Private constructor. 346 */ 347 private CsvFileHTTPAccessLogPublisherCfgDefn() { 348 super("csv-file-http-access-log-publisher", HTTPAccessLogPublisherCfgDefn.getInstance()); 349 } 350 351 352 353 /** 354 * {@inheritDoc} 355 */ 356 public CsvFileHTTPAccessLogPublisherCfgClient createClientConfiguration( 357 ManagedObject<? extends CsvFileHTTPAccessLogPublisherCfgClient> impl) { 358 return new CsvFileHTTPAccessLogPublisherCfgClientImpl(impl); 359 } 360 361 362 363 /** 364 * {@inheritDoc} 365 */ 366 public CsvFileHTTPAccessLogPublisherCfg createServerConfiguration( 367 ServerManagedObject<? extends CsvFileHTTPAccessLogPublisherCfg> impl) { 368 return new CsvFileHTTPAccessLogPublisherCfgServerImpl(impl); 369 } 370 371 372 373 /** 374 * {@inheritDoc} 375 */ 376 public Class<CsvFileHTTPAccessLogPublisherCfg> getServerConfigurationClass() { 377 return CsvFileHTTPAccessLogPublisherCfg.class; 378 } 379 380 381 382 /** 383 * Get the "asynchronous" property definition. 384 * <p> 385 * Indicates whether the Csv File HTTP Access Log Publisher will 386 * publish records asynchronously. 387 * 388 * @return Returns the "asynchronous" property definition. 389 */ 390 public BooleanPropertyDefinition getAsynchronousPropertyDefinition() { 391 return PD_ASYNCHRONOUS; 392 } 393 394 395 396 /** 397 * Get the "auto-flush" property definition. 398 * <p> 399 * Specifies whether to flush the writer after every log record. 400 * <p> 401 * If the asynchronous writes option is used, the writer is flushed 402 * after all the log records in the queue are written. 403 * 404 * @return Returns the "auto-flush" property definition. 405 */ 406 public BooleanPropertyDefinition getAutoFlushPropertyDefinition() { 407 return PD_AUTO_FLUSH; 408 } 409 410 411 412 /** 413 * Get the "csv-delimiter-char" property definition. 414 * <p> 415 * The delimiter character to use when writing in CSV format. 416 * 417 * @return Returns the "csv-delimiter-char" property definition. 418 */ 419 public StringPropertyDefinition getCsvDelimiterCharPropertyDefinition() { 420 return PD_CSV_DELIMITER_CHAR; 421 } 422 423 424 425 /** 426 * Get the "csv-eol-symbols" property definition. 427 * <p> 428 * The string that marks the end of a line. 429 * 430 * @return Returns the "csv-eol-symbols" property definition. 431 */ 432 public StringPropertyDefinition getCsvEolSymbolsPropertyDefinition() { 433 return PD_CSV_EOL_SYMBOLS; 434 } 435 436 437 438 /** 439 * Get the "csv-quote-char" property definition. 440 * <p> 441 * The character to append and prepend to a CSV field when writing 442 * in CSV format. 443 * 444 * @return Returns the "csv-quote-char" property definition. 445 */ 446 public StringPropertyDefinition getCsvQuoteCharPropertyDefinition() { 447 return PD_CSV_QUOTE_CHAR; 448 } 449 450 451 452 /** 453 * Get the "enabled" property definition. 454 * <p> 455 * Indicates whether the Csv File HTTP Access Log Publisher is 456 * enabled for use. 457 * 458 * @return Returns the "enabled" property definition. 459 */ 460 public BooleanPropertyDefinition getEnabledPropertyDefinition() { 461 return HTTPAccessLogPublisherCfgDefn.getInstance().getEnabledPropertyDefinition(); 462 } 463 464 465 466 /** 467 * Get the "java-class" property definition. 468 * <p> 469 * The fully-qualified name of the Java class that provides the Csv 470 * File HTTP Access Log Publisher implementation. 471 * 472 * @return Returns the "java-class" property definition. 473 */ 474 public ClassPropertyDefinition getJavaClassPropertyDefinition() { 475 return PD_JAVA_CLASS; 476 } 477 478 479 480 /** 481 * Get the "key-store-file" property definition. 482 * <p> 483 * Specifies the path to the file that contains the private key 484 * information. This may be an absolute path, or a path that is 485 * relative to the OpenDJ instance root. 486 * <p> 487 * Changes to this property will take effect the next time that the 488 * key store is accessed. 489 * 490 * @return Returns the "key-store-file" property definition. 491 */ 492 public StringPropertyDefinition getKeyStoreFilePropertyDefinition() { 493 return PD_KEY_STORE_FILE; 494 } 495 496 497 498 /** 499 * Get the "key-store-pin-file" property definition. 500 * <p> 501 * Specifies the path to the text file whose only contents should be 502 * a single line containing the clear-text PIN needed to access the 503 * Csv File HTTP Access Log Publisher . 504 * 505 * @return Returns the "key-store-pin-file" property definition. 506 */ 507 public StringPropertyDefinition getKeyStorePinFilePropertyDefinition() { 508 return PD_KEY_STORE_PIN_FILE; 509 } 510 511 512 513 /** 514 * Get the "log-directory" property definition. 515 * <p> 516 * The directory to use for the log files generated by the Csv File 517 * HTTP Access Log Publisher. The path to the directory is relative 518 * to the server root. 519 * 520 * @return Returns the "log-directory" property definition. 521 */ 522 public StringPropertyDefinition getLogDirectoryPropertyDefinition() { 523 return PD_LOG_DIRECTORY; 524 } 525 526 527 528 /** 529 * Get the "retention-policy" property definition. 530 * <p> 531 * The retention policy to use for the Csv File HTTP Access Log 532 * Publisher . 533 * <p> 534 * When multiple policies are used, log files are cleaned when any 535 * of the policy's conditions are met. 536 * 537 * @return Returns the "retention-policy" property definition. 538 */ 539 public AggregationPropertyDefinition<LogRetentionPolicyCfgClient, LogRetentionPolicyCfg> getRetentionPolicyPropertyDefinition() { 540 return PD_RETENTION_POLICY; 541 } 542 543 544 545 /** 546 * Get the "rotation-policy" property definition. 547 * <p> 548 * The rotation policy to use for the Csv File HTTP Access Log 549 * Publisher . 550 * <p> 551 * When multiple policies are used, rotation will occur if any 552 * policy's conditions are met. 553 * 554 * @return Returns the "rotation-policy" property definition. 555 */ 556 public AggregationPropertyDefinition<LogRotationPolicyCfgClient, LogRotationPolicyCfg> getRotationPolicyPropertyDefinition() { 557 return PD_ROTATION_POLICY; 558 } 559 560 561 562 /** 563 * Get the "signature-time-interval" property definition. 564 * <p> 565 * Specifies the interval at which to sign the log file when secure 566 * option is enabled. 567 * 568 * @return Returns the "signature-time-interval" property definition. 569 */ 570 public DurationPropertyDefinition getSignatureTimeIntervalPropertyDefinition() { 571 return PD_SIGNATURE_TIME_INTERVAL; 572 } 573 574 575 576 /** 577 * Get the "tamper-evident" property definition. 578 * <p> 579 * Specifies whether the log should be signed in order to detect 580 * tampering. 581 * <p> 582 * Every log record will be signed, making it possible to verify 583 * that the log has not been tampered with. This feature has a 584 * significative impact on performance of the server. 585 * 586 * @return Returns the "tamper-evident" property definition. 587 */ 588 public BooleanPropertyDefinition getTamperEvidentPropertyDefinition() { 589 return PD_TAMPER_EVIDENT; 590 } 591 592 593 594 /** 595 * Managed object client implementation. 596 */ 597 private static class CsvFileHTTPAccessLogPublisherCfgClientImpl implements 598 CsvFileHTTPAccessLogPublisherCfgClient { 599 600 // Private implementation. 601 private ManagedObject<? extends CsvFileHTTPAccessLogPublisherCfgClient> impl; 602 603 604 605 // Private constructor. 606 private CsvFileHTTPAccessLogPublisherCfgClientImpl( 607 ManagedObject<? extends CsvFileHTTPAccessLogPublisherCfgClient> impl) { 608 this.impl = impl; 609 } 610 611 612 613 /** 614 * {@inheritDoc} 615 */ 616 public boolean isAsynchronous() { 617 return impl.getPropertyValue(INSTANCE.getAsynchronousPropertyDefinition()); 618 } 619 620 621 622 /** 623 * {@inheritDoc} 624 */ 625 public void setAsynchronous(boolean value) { 626 impl.setPropertyValue(INSTANCE.getAsynchronousPropertyDefinition(), value); 627 } 628 629 630 631 /** 632 * {@inheritDoc} 633 */ 634 public boolean isAutoFlush() { 635 return impl.getPropertyValue(INSTANCE.getAutoFlushPropertyDefinition()); 636 } 637 638 639 640 /** 641 * {@inheritDoc} 642 */ 643 public void setAutoFlush(Boolean value) { 644 impl.setPropertyValue(INSTANCE.getAutoFlushPropertyDefinition(), value); 645 } 646 647 648 649 /** 650 * {@inheritDoc} 651 */ 652 public String getCsvDelimiterChar() { 653 return impl.getPropertyValue(INSTANCE.getCsvDelimiterCharPropertyDefinition()); 654 } 655 656 657 658 /** 659 * {@inheritDoc} 660 */ 661 public void setCsvDelimiterChar(String value) { 662 impl.setPropertyValue(INSTANCE.getCsvDelimiterCharPropertyDefinition(), value); 663 } 664 665 666 667 /** 668 * {@inheritDoc} 669 */ 670 public String getCsvEolSymbols() { 671 return impl.getPropertyValue(INSTANCE.getCsvEolSymbolsPropertyDefinition()); 672 } 673 674 675 676 /** 677 * {@inheritDoc} 678 */ 679 public void setCsvEolSymbols(String value) { 680 impl.setPropertyValue(INSTANCE.getCsvEolSymbolsPropertyDefinition(), value); 681 } 682 683 684 685 /** 686 * {@inheritDoc} 687 */ 688 public String getCsvQuoteChar() { 689 return impl.getPropertyValue(INSTANCE.getCsvQuoteCharPropertyDefinition()); 690 } 691 692 693 694 /** 695 * {@inheritDoc} 696 */ 697 public void setCsvQuoteChar(String value) { 698 impl.setPropertyValue(INSTANCE.getCsvQuoteCharPropertyDefinition(), value); 699 } 700 701 702 703 /** 704 * {@inheritDoc} 705 */ 706 public Boolean isEnabled() { 707 return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 708 } 709 710 711 712 /** 713 * {@inheritDoc} 714 */ 715 public void setEnabled(boolean value) { 716 impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value); 717 } 718 719 720 721 /** 722 * {@inheritDoc} 723 */ 724 public String getJavaClass() { 725 return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 726 } 727 728 729 730 /** 731 * {@inheritDoc} 732 */ 733 public void setJavaClass(String value) { 734 impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value); 735 } 736 737 738 739 /** 740 * {@inheritDoc} 741 */ 742 public String getKeyStoreFile() { 743 return impl.getPropertyValue(INSTANCE.getKeyStoreFilePropertyDefinition()); 744 } 745 746 747 748 /** 749 * {@inheritDoc} 750 */ 751 public void setKeyStoreFile(String value) { 752 impl.setPropertyValue(INSTANCE.getKeyStoreFilePropertyDefinition(), value); 753 } 754 755 756 757 /** 758 * {@inheritDoc} 759 */ 760 public String getKeyStorePinFile() { 761 return impl.getPropertyValue(INSTANCE.getKeyStorePinFilePropertyDefinition()); 762 } 763 764 765 766 /** 767 * {@inheritDoc} 768 */ 769 public void setKeyStorePinFile(String value) { 770 impl.setPropertyValue(INSTANCE.getKeyStorePinFilePropertyDefinition(), value); 771 } 772 773 774 775 /** 776 * {@inheritDoc} 777 */ 778 public String getLogDirectory() { 779 return impl.getPropertyValue(INSTANCE.getLogDirectoryPropertyDefinition()); 780 } 781 782 783 784 /** 785 * {@inheritDoc} 786 */ 787 public void setLogDirectory(String value) { 788 impl.setPropertyValue(INSTANCE.getLogDirectoryPropertyDefinition(), value); 789 } 790 791 792 793 /** 794 * {@inheritDoc} 795 */ 796 public SortedSet<String> getRetentionPolicy() { 797 return impl.getPropertyValues(INSTANCE.getRetentionPolicyPropertyDefinition()); 798 } 799 800 801 802 /** 803 * {@inheritDoc} 804 */ 805 public void setRetentionPolicy(Collection<String> values) { 806 impl.setPropertyValues(INSTANCE.getRetentionPolicyPropertyDefinition(), values); 807 } 808 809 810 811 /** 812 * {@inheritDoc} 813 */ 814 public SortedSet<String> getRotationPolicy() { 815 return impl.getPropertyValues(INSTANCE.getRotationPolicyPropertyDefinition()); 816 } 817 818 819 820 /** 821 * {@inheritDoc} 822 */ 823 public void setRotationPolicy(Collection<String> values) { 824 impl.setPropertyValues(INSTANCE.getRotationPolicyPropertyDefinition(), values); 825 } 826 827 828 829 /** 830 * {@inheritDoc} 831 */ 832 public long getSignatureTimeInterval() { 833 return impl.getPropertyValue(INSTANCE.getSignatureTimeIntervalPropertyDefinition()); 834 } 835 836 837 838 /** 839 * {@inheritDoc} 840 */ 841 public void setSignatureTimeInterval(Long value) { 842 impl.setPropertyValue(INSTANCE.getSignatureTimeIntervalPropertyDefinition(), value); 843 } 844 845 846 847 /** 848 * {@inheritDoc} 849 */ 850 public boolean isTamperEvident() { 851 return impl.getPropertyValue(INSTANCE.getTamperEvidentPropertyDefinition()); 852 } 853 854 855 856 /** 857 * {@inheritDoc} 858 */ 859 public void setTamperEvident(Boolean value) { 860 impl.setPropertyValue(INSTANCE.getTamperEvidentPropertyDefinition(), value); 861 } 862 863 864 865 /** 866 * {@inheritDoc} 867 */ 868 public ManagedObjectDefinition<? extends CsvFileHTTPAccessLogPublisherCfgClient, ? extends CsvFileHTTPAccessLogPublisherCfg> definition() { 869 return INSTANCE; 870 } 871 872 873 874 /** 875 * {@inheritDoc} 876 */ 877 public PropertyProvider properties() { 878 return impl; 879 } 880 881 882 883 /** 884 * {@inheritDoc} 885 */ 886 public void commit() throws ManagedObjectAlreadyExistsException, 887 MissingMandatoryPropertiesException, ConcurrentModificationException, 888 OperationRejectedException, AuthorizationException, 889 CommunicationException { 890 impl.commit(); 891 } 892 893 894 895 /** {@inheritDoc} */ 896 public String toString() { 897 return impl.toString(); 898 } 899 } 900 901 902 903 /** 904 * Managed object server implementation. 905 */ 906 private static class CsvFileHTTPAccessLogPublisherCfgServerImpl implements 907 CsvFileHTTPAccessLogPublisherCfg { 908 909 // Private implementation. 910 private ServerManagedObject<? extends CsvFileHTTPAccessLogPublisherCfg> impl; 911 912 // The value of the "asynchronous" property. 913 private final boolean pAsynchronous; 914 915 // The value of the "auto-flush" property. 916 private final boolean pAutoFlush; 917 918 // The value of the "csv-delimiter-char" property. 919 private final String pCsvDelimiterChar; 920 921 // The value of the "csv-eol-symbols" property. 922 private final String pCsvEolSymbols; 923 924 // The value of the "csv-quote-char" property. 925 private final String pCsvQuoteChar; 926 927 // The value of the "enabled" property. 928 private final boolean pEnabled; 929 930 // The value of the "java-class" property. 931 private final String pJavaClass; 932 933 // The value of the "key-store-file" property. 934 private final String pKeyStoreFile; 935 936 // The value of the "key-store-pin-file" property. 937 private final String pKeyStorePinFile; 938 939 // The value of the "log-directory" property. 940 private final String pLogDirectory; 941 942 // The value of the "retention-policy" property. 943 private final SortedSet<String> pRetentionPolicy; 944 945 // The value of the "rotation-policy" property. 946 private final SortedSet<String> pRotationPolicy; 947 948 // The value of the "signature-time-interval" property. 949 private final long pSignatureTimeInterval; 950 951 // The value of the "tamper-evident" property. 952 private final boolean pTamperEvident; 953 954 955 956 // Private constructor. 957 private CsvFileHTTPAccessLogPublisherCfgServerImpl(ServerManagedObject<? extends CsvFileHTTPAccessLogPublisherCfg> impl) { 958 this.impl = impl; 959 this.pAsynchronous = impl.getPropertyValue(INSTANCE.getAsynchronousPropertyDefinition()); 960 this.pAutoFlush = impl.getPropertyValue(INSTANCE.getAutoFlushPropertyDefinition()); 961 this.pCsvDelimiterChar = impl.getPropertyValue(INSTANCE.getCsvDelimiterCharPropertyDefinition()); 962 this.pCsvEolSymbols = impl.getPropertyValue(INSTANCE.getCsvEolSymbolsPropertyDefinition()); 963 this.pCsvQuoteChar = impl.getPropertyValue(INSTANCE.getCsvQuoteCharPropertyDefinition()); 964 this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 965 this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 966 this.pKeyStoreFile = impl.getPropertyValue(INSTANCE.getKeyStoreFilePropertyDefinition()); 967 this.pKeyStorePinFile = impl.getPropertyValue(INSTANCE.getKeyStorePinFilePropertyDefinition()); 968 this.pLogDirectory = impl.getPropertyValue(INSTANCE.getLogDirectoryPropertyDefinition()); 969 this.pRetentionPolicy = impl.getPropertyValues(INSTANCE.getRetentionPolicyPropertyDefinition()); 970 this.pRotationPolicy = impl.getPropertyValues(INSTANCE.getRotationPolicyPropertyDefinition()); 971 this.pSignatureTimeInterval = impl.getPropertyValue(INSTANCE.getSignatureTimeIntervalPropertyDefinition()); 972 this.pTamperEvident = impl.getPropertyValue(INSTANCE.getTamperEvidentPropertyDefinition()); 973 } 974 975 976 977 /** 978 * {@inheritDoc} 979 */ 980 public void addCsvFileHTTPAccessChangeListener( 981 ConfigurationChangeListener<CsvFileHTTPAccessLogPublisherCfg> listener) { 982 impl.registerChangeListener(listener); 983 } 984 985 986 987 /** 988 * {@inheritDoc} 989 */ 990 public void removeCsvFileHTTPAccessChangeListener( 991 ConfigurationChangeListener<CsvFileHTTPAccessLogPublisherCfg> listener) { 992 impl.deregisterChangeListener(listener); 993 } 994 /** 995 * {@inheritDoc} 996 */ 997 public void addHTTPAccessChangeListener( 998 ConfigurationChangeListener<HTTPAccessLogPublisherCfg> listener) { 999 impl.registerChangeListener(listener); 1000 } 1001 1002 1003 1004 /** 1005 * {@inheritDoc} 1006 */ 1007 public void removeHTTPAccessChangeListener( 1008 ConfigurationChangeListener<HTTPAccessLogPublisherCfg> listener) { 1009 impl.deregisterChangeListener(listener); 1010 } 1011 /** 1012 * {@inheritDoc} 1013 */ 1014 public void addChangeListener( 1015 ConfigurationChangeListener<LogPublisherCfg> listener) { 1016 impl.registerChangeListener(listener); 1017 } 1018 1019 1020 1021 /** 1022 * {@inheritDoc} 1023 */ 1024 public void removeChangeListener( 1025 ConfigurationChangeListener<LogPublisherCfg> listener) { 1026 impl.deregisterChangeListener(listener); 1027 } 1028 1029 1030 1031 /** 1032 * {@inheritDoc} 1033 */ 1034 public boolean isAsynchronous() { 1035 return pAsynchronous; 1036 } 1037 1038 1039 1040 /** 1041 * {@inheritDoc} 1042 */ 1043 public boolean isAutoFlush() { 1044 return pAutoFlush; 1045 } 1046 1047 1048 1049 /** 1050 * {@inheritDoc} 1051 */ 1052 public String getCsvDelimiterChar() { 1053 return pCsvDelimiterChar; 1054 } 1055 1056 1057 1058 /** 1059 * {@inheritDoc} 1060 */ 1061 public String getCsvEolSymbols() { 1062 return pCsvEolSymbols; 1063 } 1064 1065 1066 1067 /** 1068 * {@inheritDoc} 1069 */ 1070 public String getCsvQuoteChar() { 1071 return pCsvQuoteChar; 1072 } 1073 1074 1075 1076 /** 1077 * {@inheritDoc} 1078 */ 1079 public boolean isEnabled() { 1080 return pEnabled; 1081 } 1082 1083 1084 1085 /** 1086 * {@inheritDoc} 1087 */ 1088 public String getJavaClass() { 1089 return pJavaClass; 1090 } 1091 1092 1093 1094 /** 1095 * {@inheritDoc} 1096 */ 1097 public String getKeyStoreFile() { 1098 return pKeyStoreFile; 1099 } 1100 1101 1102 1103 /** 1104 * {@inheritDoc} 1105 */ 1106 public String getKeyStorePinFile() { 1107 return pKeyStorePinFile; 1108 } 1109 1110 1111 1112 /** 1113 * {@inheritDoc} 1114 */ 1115 public String getLogDirectory() { 1116 return pLogDirectory; 1117 } 1118 1119 1120 1121 /** 1122 * {@inheritDoc} 1123 */ 1124 public SortedSet<String> getRetentionPolicy() { 1125 return pRetentionPolicy; 1126 } 1127 1128 1129 1130 /** 1131 * {@inheritDoc} 1132 */ 1133 public SortedSet<DN> getRetentionPolicyDNs() { 1134 SortedSet<String> values = getRetentionPolicy(); 1135 SortedSet<DN> dnValues = new TreeSet<DN>(); 1136 for (String value : values) { 1137 DN dn = INSTANCE.getRetentionPolicyPropertyDefinition().getChildDN(value); 1138 dnValues.add(dn); 1139 } 1140 return dnValues; 1141 } 1142 1143 1144 1145 /** 1146 * {@inheritDoc} 1147 */ 1148 public SortedSet<String> getRotationPolicy() { 1149 return pRotationPolicy; 1150 } 1151 1152 1153 1154 /** 1155 * {@inheritDoc} 1156 */ 1157 public SortedSet<DN> getRotationPolicyDNs() { 1158 SortedSet<String> values = getRotationPolicy(); 1159 SortedSet<DN> dnValues = new TreeSet<DN>(); 1160 for (String value : values) { 1161 DN dn = INSTANCE.getRotationPolicyPropertyDefinition().getChildDN(value); 1162 dnValues.add(dn); 1163 } 1164 return dnValues; 1165 } 1166 1167 1168 1169 /** 1170 * {@inheritDoc} 1171 */ 1172 public long getSignatureTimeInterval() { 1173 return pSignatureTimeInterval; 1174 } 1175 1176 1177 1178 /** 1179 * {@inheritDoc} 1180 */ 1181 public boolean isTamperEvident() { 1182 return pTamperEvident; 1183 } 1184 1185 1186 1187 /** 1188 * {@inheritDoc} 1189 */ 1190 public Class<? extends CsvFileHTTPAccessLogPublisherCfg> configurationClass() { 1191 return CsvFileHTTPAccessLogPublisherCfg.class; 1192 } 1193 1194 1195 1196 /** 1197 * {@inheritDoc} 1198 */ 1199 public DN dn() { 1200 return impl.getDN(); 1201 } 1202 1203 1204 1205 /** {@inheritDoc} */ 1206 public String toString() { 1207 return impl.toString(); 1208 } 1209 } 1210}