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.meta; 017 018 019 020import java.util.Collection; 021import java.util.SortedSet; 022import org.forgerock.opendj.config.AdministratorAction; 023import org.forgerock.opendj.config.AliasDefaultBehaviorProvider; 024import org.forgerock.opendj.config.BooleanPropertyDefinition; 025import org.forgerock.opendj.config.ClassPropertyDefinition; 026import org.forgerock.opendj.config.client.ConcurrentModificationException; 027import org.forgerock.opendj.config.client.ManagedObject; 028import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException; 029import org.forgerock.opendj.config.client.OperationRejectedException; 030import org.forgerock.opendj.config.DefaultBehaviorProvider; 031import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider; 032import org.forgerock.opendj.config.DNPropertyDefinition; 033import org.forgerock.opendj.config.EnumPropertyDefinition; 034import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException; 035import org.forgerock.opendj.config.ManagedObjectDefinition; 036import org.forgerock.opendj.config.ManagedObjectOption; 037import org.forgerock.opendj.config.PropertyException; 038import org.forgerock.opendj.config.PropertyOption; 039import org.forgerock.opendj.config.PropertyProvider; 040import org.forgerock.opendj.config.server.ConfigurationChangeListener; 041import org.forgerock.opendj.config.server.ServerManagedObject; 042import org.forgerock.opendj.config.StringPropertyDefinition; 043import org.forgerock.opendj.config.Tag; 044import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider; 045import org.forgerock.opendj.ldap.DN; 046import org.forgerock.opendj.ldap.LdapException; 047import org.forgerock.opendj.server.config.client.TrustStoreBackendCfgClient; 048import org.forgerock.opendj.server.config.meta.BackendCfgDefn.WritabilityMode; 049import org.forgerock.opendj.server.config.server.BackendCfg; 050import org.forgerock.opendj.server.config.server.TrustStoreBackendCfg; 051 052 053 054/** 055 * An interface for querying the Trust Store Backend managed object 056 * definition meta information. 057 * <p> 058 * The Trust Store Backend provides an LDAP view of a file-based trust 059 * store. It is used by the administrative cryptographic framework. 060 */ 061public final class TrustStoreBackendCfgDefn extends ManagedObjectDefinition<TrustStoreBackendCfgClient, TrustStoreBackendCfg> { 062 063 /** The singleton configuration definition instance. */ 064 private static final TrustStoreBackendCfgDefn INSTANCE = new TrustStoreBackendCfgDefn(); 065 066 067 068 /** The "java-class" property definition. */ 069 private static final ClassPropertyDefinition PD_JAVA_CLASS; 070 071 072 073 /** The "trust-store-file" property definition. */ 074 private static final StringPropertyDefinition PD_TRUST_STORE_FILE; 075 076 077 078 /** The "trust-store-pin" property definition. */ 079 private static final StringPropertyDefinition PD_TRUST_STORE_PIN; 080 081 082 083 /** The "trust-store-pin-environment-variable" property definition. */ 084 private static final StringPropertyDefinition PD_TRUST_STORE_PIN_ENVIRONMENT_VARIABLE; 085 086 087 088 /** The "trust-store-pin-file" property definition. */ 089 private static final StringPropertyDefinition PD_TRUST_STORE_PIN_FILE; 090 091 092 093 /** The "trust-store-pin-property" property definition. */ 094 private static final StringPropertyDefinition PD_TRUST_STORE_PIN_PROPERTY; 095 096 097 098 /** The "trust-store-type" property definition. */ 099 private static final StringPropertyDefinition PD_TRUST_STORE_TYPE; 100 101 102 103 /** The "writability-mode" property definition. */ 104 private static final EnumPropertyDefinition<WritabilityMode> PD_WRITABILITY_MODE; 105 106 107 108 /** Build the "java-class" property definition. */ 109 static { 110 ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class"); 111 builder.setOption(PropertyOption.MANDATORY); 112 builder.setOption(PropertyOption.ADVANCED); 113 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class")); 114 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.backends.TrustStoreBackend"); 115 builder.setDefaultBehaviorProvider(provider); 116 builder.addInstanceOf("org.opends.server.api.Backend"); 117 PD_JAVA_CLASS = builder.getInstance(); 118 INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS); 119 } 120 121 122 123 /** Build the "trust-store-file" property definition. */ 124 static { 125 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "trust-store-file"); 126 builder.setOption(PropertyOption.MANDATORY); 127 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "trust-store-file")); 128 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("config/ads-truststore"); 129 builder.setDefaultBehaviorProvider(provider); 130 PD_TRUST_STORE_FILE = builder.getInstance(); 131 INSTANCE.registerPropertyDefinition(PD_TRUST_STORE_FILE); 132 } 133 134 135 136 /** Build the "trust-store-pin" property definition. */ 137 static { 138 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "trust-store-pin"); 139 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "trust-store-pin")); 140 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 141 PD_TRUST_STORE_PIN = builder.getInstance(); 142 INSTANCE.registerPropertyDefinition(PD_TRUST_STORE_PIN); 143 } 144 145 146 147 /** Build the "trust-store-pin-environment-variable" property definition. */ 148 static { 149 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "trust-store-pin-environment-variable"); 150 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "trust-store-pin-environment-variable")); 151 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 152 PD_TRUST_STORE_PIN_ENVIRONMENT_VARIABLE = builder.getInstance(); 153 INSTANCE.registerPropertyDefinition(PD_TRUST_STORE_PIN_ENVIRONMENT_VARIABLE); 154 } 155 156 157 158 /** Build the "trust-store-pin-file" property definition. */ 159 static { 160 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "trust-store-pin-file"); 161 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "trust-store-pin-file")); 162 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 163 PD_TRUST_STORE_PIN_FILE = builder.getInstance(); 164 INSTANCE.registerPropertyDefinition(PD_TRUST_STORE_PIN_FILE); 165 } 166 167 168 169 /** Build the "trust-store-pin-property" property definition. */ 170 static { 171 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "trust-store-pin-property"); 172 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "trust-store-pin-property")); 173 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 174 PD_TRUST_STORE_PIN_PROPERTY = builder.getInstance(); 175 INSTANCE.registerPropertyDefinition(PD_TRUST_STORE_PIN_PROPERTY); 176 } 177 178 179 180 /** Build the "trust-store-type" property definition. */ 181 static { 182 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "trust-store-type"); 183 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "trust-store-type")); 184 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "trust-store-type")); 185 PD_TRUST_STORE_TYPE = builder.getInstance(); 186 INSTANCE.registerPropertyDefinition(PD_TRUST_STORE_TYPE); 187 } 188 189 190 191 /** Build the "writability-mode" property definition. */ 192 static { 193 EnumPropertyDefinition.Builder<WritabilityMode> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "writability-mode"); 194 builder.setOption(PropertyOption.MANDATORY); 195 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "writability-mode")); 196 DefaultBehaviorProvider<WritabilityMode> provider = new DefinedDefaultBehaviorProvider<WritabilityMode>("enabled"); 197 builder.setDefaultBehaviorProvider(provider); 198 builder.setEnumClass(WritabilityMode.class); 199 PD_WRITABILITY_MODE = builder.getInstance(); 200 INSTANCE.registerPropertyDefinition(PD_WRITABILITY_MODE); 201 } 202 203 204 205 // Register the options associated with this managed object definition. 206 static { 207 INSTANCE.registerOption(ManagedObjectOption.ADVANCED); 208 } 209 210 211 212 // Register the tags associated with this managed object definition. 213 static { 214 INSTANCE.registerTag(Tag.valueOf("database")); 215 } 216 217 218 219 /** 220 * Get the Trust Store Backend configuration definition singleton. 221 * 222 * @return Returns the Trust Store Backend configuration definition 223 * singleton. 224 */ 225 public static TrustStoreBackendCfgDefn getInstance() { 226 return INSTANCE; 227 } 228 229 230 231 /** 232 * Private constructor. 233 */ 234 private TrustStoreBackendCfgDefn() { 235 super("trust-store-backend", BackendCfgDefn.getInstance()); 236 } 237 238 239 240 /** {@inheritDoc} */ 241 public TrustStoreBackendCfgClient createClientConfiguration( 242 ManagedObject<? extends TrustStoreBackendCfgClient> impl) { 243 return new TrustStoreBackendCfgClientImpl(impl); 244 } 245 246 247 248 /** {@inheritDoc} */ 249 public TrustStoreBackendCfg createServerConfiguration( 250 ServerManagedObject<? extends TrustStoreBackendCfg> impl) { 251 return new TrustStoreBackendCfgServerImpl(impl); 252 } 253 254 255 256 /** {@inheritDoc} */ 257 public Class<TrustStoreBackendCfg> getServerConfigurationClass() { 258 return TrustStoreBackendCfg.class; 259 } 260 261 262 263 /** 264 * Get the "backend-id" property definition. 265 * <p> 266 * Specifies a name to identify the associated backend. 267 * <p> 268 * The name must be unique among all backends in the server. The 269 * backend ID may not be altered after the backend is created in the 270 * server. 271 * 272 * @return Returns the "backend-id" property definition. 273 */ 274 public StringPropertyDefinition getBackendIdPropertyDefinition() { 275 return BackendCfgDefn.getInstance().getBackendIdPropertyDefinition(); 276 } 277 278 279 280 /** 281 * Get the "base-dn" property definition. 282 * <p> 283 * Specifies the base DN(s) for the data that the backend handles. 284 * <p> 285 * A single backend may be responsible for one or more base DNs. 286 * Note that no two backends may have the same base DN although one 287 * backend may have a base DN that is below a base DN provided by 288 * another backend (similar to the use of sub-suffixes in the Sun 289 * Java System Directory Server). If any of the base DNs is 290 * subordinate to a base DN for another backend, then all base DNs 291 * for that backend must be subordinate to that same base DN. 292 * 293 * @return Returns the "base-dn" property definition. 294 */ 295 public DNPropertyDefinition getBaseDNPropertyDefinition() { 296 return BackendCfgDefn.getInstance().getBaseDNPropertyDefinition(); 297 } 298 299 300 301 /** 302 * Get the "enabled" property definition. 303 * <p> 304 * Indicates whether the backend is enabled in the server. 305 * <p> 306 * If a backend is not enabled, then its contents are not accessible 307 * when processing operations. 308 * 309 * @return Returns the "enabled" property definition. 310 */ 311 public BooleanPropertyDefinition getEnabledPropertyDefinition() { 312 return BackendCfgDefn.getInstance().getEnabledPropertyDefinition(); 313 } 314 315 316 317 /** 318 * Get the "java-class" property definition. 319 * <p> 320 * Specifies the fully-qualified name of the Java class that 321 * provides the backend implementation. 322 * 323 * @return Returns the "java-class" property definition. 324 */ 325 public ClassPropertyDefinition getJavaClassPropertyDefinition() { 326 return PD_JAVA_CLASS; 327 } 328 329 330 331 /** 332 * Get the "trust-store-file" property definition. 333 * <p> 334 * Specifies the path to the file that stores the trust information. 335 * <p> 336 * It may be an absolute path, or a path that is relative to the 337 * OpenDJ instance root. 338 * 339 * @return Returns the "trust-store-file" property definition. 340 */ 341 public StringPropertyDefinition getTrustStoreFilePropertyDefinition() { 342 return PD_TRUST_STORE_FILE; 343 } 344 345 346 347 /** 348 * Get the "trust-store-pin" property definition. 349 * <p> 350 * Specifies the clear-text PIN needed to access the Trust Store 351 * Backend . 352 * 353 * @return Returns the "trust-store-pin" property definition. 354 */ 355 public StringPropertyDefinition getTrustStorePinPropertyDefinition() { 356 return PD_TRUST_STORE_PIN; 357 } 358 359 360 361 /** 362 * Get the "trust-store-pin-environment-variable" property definition. 363 * <p> 364 * Specifies the name of the environment variable that contains the 365 * clear-text PIN needed to access the Trust Store Backend . 366 * 367 * @return Returns the "trust-store-pin-environment-variable" property definition. 368 */ 369 public StringPropertyDefinition getTrustStorePinEnvironmentVariablePropertyDefinition() { 370 return PD_TRUST_STORE_PIN_ENVIRONMENT_VARIABLE; 371 } 372 373 374 375 /** 376 * Get the "trust-store-pin-file" property definition. 377 * <p> 378 * Specifies the path to the text file whose only contents should be 379 * a single line containing the clear-text PIN needed to access the 380 * Trust Store Backend . 381 * 382 * @return Returns the "trust-store-pin-file" property definition. 383 */ 384 public StringPropertyDefinition getTrustStorePinFilePropertyDefinition() { 385 return PD_TRUST_STORE_PIN_FILE; 386 } 387 388 389 390 /** 391 * Get the "trust-store-pin-property" property definition. 392 * <p> 393 * Specifies the name of the Java property that contains the 394 * clear-text PIN needed to access the Trust Store Backend . 395 * 396 * @return Returns the "trust-store-pin-property" property definition. 397 */ 398 public StringPropertyDefinition getTrustStorePinPropertyPropertyDefinition() { 399 return PD_TRUST_STORE_PIN_PROPERTY; 400 } 401 402 403 404 /** 405 * Get the "trust-store-type" property definition. 406 * <p> 407 * Specifies the format for the data in the key store file. 408 * <p> 409 * Valid values should always include 'JKS' and 'PKCS12', but 410 * different implementations may allow other values as well. 411 * 412 * @return Returns the "trust-store-type" property definition. 413 */ 414 public StringPropertyDefinition getTrustStoreTypePropertyDefinition() { 415 return PD_TRUST_STORE_TYPE; 416 } 417 418 419 420 /** 421 * Get the "writability-mode" property definition. 422 * <p> 423 * Specifies the behavior that the backend should use when 424 * processing write operations. 425 * 426 * @return Returns the "writability-mode" property definition. 427 */ 428 public EnumPropertyDefinition<WritabilityMode> getWritabilityModePropertyDefinition() { 429 return PD_WRITABILITY_MODE; 430 } 431 432 433 434 /** 435 * Managed object client implementation. 436 */ 437 private static class TrustStoreBackendCfgClientImpl implements 438 TrustStoreBackendCfgClient { 439 440 /** Private implementation. */ 441 private ManagedObject<? extends TrustStoreBackendCfgClient> impl; 442 443 444 445 /** Private constructor. */ 446 private TrustStoreBackendCfgClientImpl( 447 ManagedObject<? extends TrustStoreBackendCfgClient> impl) { 448 this.impl = impl; 449 } 450 451 452 453 /** {@inheritDoc} */ 454 public String getBackendId() { 455 return impl.getPropertyValue(INSTANCE.getBackendIdPropertyDefinition()); 456 } 457 458 459 460 /** {@inheritDoc} */ 461 public void setBackendId(String value) throws PropertyException { 462 impl.setPropertyValue(INSTANCE.getBackendIdPropertyDefinition(), value); 463 } 464 465 466 467 /** {@inheritDoc} */ 468 public SortedSet<DN> getBaseDN() { 469 return impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition()); 470 } 471 472 473 474 /** {@inheritDoc} */ 475 public void setBaseDN(Collection<DN> values) { 476 impl.setPropertyValues(INSTANCE.getBaseDNPropertyDefinition(), values); 477 } 478 479 480 481 /** {@inheritDoc} */ 482 public Boolean isEnabled() { 483 return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 484 } 485 486 487 488 /** {@inheritDoc} */ 489 public void setEnabled(boolean value) { 490 impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value); 491 } 492 493 494 495 /** {@inheritDoc} */ 496 public String getJavaClass() { 497 return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 498 } 499 500 501 502 /** {@inheritDoc} */ 503 public void setJavaClass(String value) { 504 impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value); 505 } 506 507 508 509 /** {@inheritDoc} */ 510 public String getTrustStoreFile() { 511 return impl.getPropertyValue(INSTANCE.getTrustStoreFilePropertyDefinition()); 512 } 513 514 515 516 /** {@inheritDoc} */ 517 public void setTrustStoreFile(String value) { 518 impl.setPropertyValue(INSTANCE.getTrustStoreFilePropertyDefinition(), value); 519 } 520 521 522 523 /** {@inheritDoc} */ 524 public String getTrustStorePin() { 525 return impl.getPropertyValue(INSTANCE.getTrustStorePinPropertyDefinition()); 526 } 527 528 529 530 /** {@inheritDoc} */ 531 public void setTrustStorePin(String value) { 532 impl.setPropertyValue(INSTANCE.getTrustStorePinPropertyDefinition(), value); 533 } 534 535 536 537 /** {@inheritDoc} */ 538 public String getTrustStorePinEnvironmentVariable() { 539 return impl.getPropertyValue(INSTANCE.getTrustStorePinEnvironmentVariablePropertyDefinition()); 540 } 541 542 543 544 /** {@inheritDoc} */ 545 public void setTrustStorePinEnvironmentVariable(String value) { 546 impl.setPropertyValue(INSTANCE.getTrustStorePinEnvironmentVariablePropertyDefinition(), value); 547 } 548 549 550 551 /** {@inheritDoc} */ 552 public String getTrustStorePinFile() { 553 return impl.getPropertyValue(INSTANCE.getTrustStorePinFilePropertyDefinition()); 554 } 555 556 557 558 /** {@inheritDoc} */ 559 public void setTrustStorePinFile(String value) { 560 impl.setPropertyValue(INSTANCE.getTrustStorePinFilePropertyDefinition(), value); 561 } 562 563 564 565 /** {@inheritDoc} */ 566 public String getTrustStorePinProperty() { 567 return impl.getPropertyValue(INSTANCE.getTrustStorePinPropertyPropertyDefinition()); 568 } 569 570 571 572 /** {@inheritDoc} */ 573 public void setTrustStorePinProperty(String value) { 574 impl.setPropertyValue(INSTANCE.getTrustStorePinPropertyPropertyDefinition(), value); 575 } 576 577 578 579 /** {@inheritDoc} */ 580 public String getTrustStoreType() { 581 return impl.getPropertyValue(INSTANCE.getTrustStoreTypePropertyDefinition()); 582 } 583 584 585 586 /** {@inheritDoc} */ 587 public void setTrustStoreType(String value) { 588 impl.setPropertyValue(INSTANCE.getTrustStoreTypePropertyDefinition(), value); 589 } 590 591 592 593 /** {@inheritDoc} */ 594 public WritabilityMode getWritabilityMode() { 595 return impl.getPropertyValue(INSTANCE.getWritabilityModePropertyDefinition()); 596 } 597 598 599 600 /** {@inheritDoc} */ 601 public void setWritabilityMode(WritabilityMode value) { 602 impl.setPropertyValue(INSTANCE.getWritabilityModePropertyDefinition(), value); 603 } 604 605 606 607 /** {@inheritDoc} */ 608 public ManagedObjectDefinition<? extends TrustStoreBackendCfgClient, ? extends TrustStoreBackendCfg> definition() { 609 return INSTANCE; 610 } 611 612 613 614 /** {@inheritDoc} */ 615 public PropertyProvider properties() { 616 return impl; 617 } 618 619 620 621 /** {@inheritDoc} */ 622 public void commit() throws ManagedObjectAlreadyExistsException, 623 MissingMandatoryPropertiesException, ConcurrentModificationException, 624 OperationRejectedException, LdapException { 625 impl.commit(); 626 } 627 628 629 630 /** {@inheritDoc} */ 631 public String toString() { 632 return impl.toString(); 633 } 634 } 635 636 637 638 /** 639 * Managed object server implementation. 640 */ 641 private static class TrustStoreBackendCfgServerImpl implements 642 TrustStoreBackendCfg { 643 644 /** Private implementation. */ 645 private ServerManagedObject<? extends TrustStoreBackendCfg> impl; 646 647 /** The value of the "backend-id" property. */ 648 private final String pBackendId; 649 650 /** The value of the "base-dn" property. */ 651 private final SortedSet<DN> pBaseDN; 652 653 /** The value of the "enabled" property. */ 654 private final boolean pEnabled; 655 656 /** The value of the "java-class" property. */ 657 private final String pJavaClass; 658 659 /** The value of the "trust-store-file" property. */ 660 private final String pTrustStoreFile; 661 662 /** The value of the "trust-store-pin" property. */ 663 private final String pTrustStorePin; 664 665 /** The value of the "trust-store-pin-environment-variable" property. */ 666 private final String pTrustStorePinEnvironmentVariable; 667 668 /** The value of the "trust-store-pin-file" property. */ 669 private final String pTrustStorePinFile; 670 671 /** The value of the "trust-store-pin-property" property. */ 672 private final String pTrustStorePinProperty; 673 674 /** The value of the "trust-store-type" property. */ 675 private final String pTrustStoreType; 676 677 /** The value of the "writability-mode" property. */ 678 private final WritabilityMode pWritabilityMode; 679 680 681 682 /** Private constructor. */ 683 private TrustStoreBackendCfgServerImpl(ServerManagedObject<? extends TrustStoreBackendCfg> impl) { 684 this.impl = impl; 685 this.pBackendId = impl.getPropertyValue(INSTANCE.getBackendIdPropertyDefinition()); 686 this.pBaseDN = impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition()); 687 this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 688 this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 689 this.pTrustStoreFile = impl.getPropertyValue(INSTANCE.getTrustStoreFilePropertyDefinition()); 690 this.pTrustStorePin = impl.getPropertyValue(INSTANCE.getTrustStorePinPropertyDefinition()); 691 this.pTrustStorePinEnvironmentVariable = impl.getPropertyValue(INSTANCE.getTrustStorePinEnvironmentVariablePropertyDefinition()); 692 this.pTrustStorePinFile = impl.getPropertyValue(INSTANCE.getTrustStorePinFilePropertyDefinition()); 693 this.pTrustStorePinProperty = impl.getPropertyValue(INSTANCE.getTrustStorePinPropertyPropertyDefinition()); 694 this.pTrustStoreType = impl.getPropertyValue(INSTANCE.getTrustStoreTypePropertyDefinition()); 695 this.pWritabilityMode = impl.getPropertyValue(INSTANCE.getWritabilityModePropertyDefinition()); 696 } 697 698 699 700 /** {@inheritDoc} */ 701 public void addTrustStoreChangeListener( 702 ConfigurationChangeListener<TrustStoreBackendCfg> listener) { 703 impl.registerChangeListener(listener); 704 } 705 706 707 708 /** {@inheritDoc} */ 709 public void removeTrustStoreChangeListener( 710 ConfigurationChangeListener<TrustStoreBackendCfg> listener) { 711 impl.deregisterChangeListener(listener); 712 } 713 /** {@inheritDoc} */ 714 public void addChangeListener( 715 ConfigurationChangeListener<BackendCfg> listener) { 716 impl.registerChangeListener(listener); 717 } 718 719 720 721 /** {@inheritDoc} */ 722 public void removeChangeListener( 723 ConfigurationChangeListener<BackendCfg> listener) { 724 impl.deregisterChangeListener(listener); 725 } 726 727 728 729 /** {@inheritDoc} */ 730 public String getBackendId() { 731 return pBackendId; 732 } 733 734 735 736 /** {@inheritDoc} */ 737 public SortedSet<DN> getBaseDN() { 738 return pBaseDN; 739 } 740 741 742 743 /** {@inheritDoc} */ 744 public boolean isEnabled() { 745 return pEnabled; 746 } 747 748 749 750 /** {@inheritDoc} */ 751 public String getJavaClass() { 752 return pJavaClass; 753 } 754 755 756 757 /** {@inheritDoc} */ 758 public String getTrustStoreFile() { 759 return pTrustStoreFile; 760 } 761 762 763 764 /** {@inheritDoc} */ 765 public String getTrustStorePin() { 766 return pTrustStorePin; 767 } 768 769 770 771 /** {@inheritDoc} */ 772 public String getTrustStorePinEnvironmentVariable() { 773 return pTrustStorePinEnvironmentVariable; 774 } 775 776 777 778 /** {@inheritDoc} */ 779 public String getTrustStorePinFile() { 780 return pTrustStorePinFile; 781 } 782 783 784 785 /** {@inheritDoc} */ 786 public String getTrustStorePinProperty() { 787 return pTrustStorePinProperty; 788 } 789 790 791 792 /** {@inheritDoc} */ 793 public String getTrustStoreType() { 794 return pTrustStoreType; 795 } 796 797 798 799 /** {@inheritDoc} */ 800 public WritabilityMode getWritabilityMode() { 801 return pWritabilityMode; 802 } 803 804 805 806 /** {@inheritDoc} */ 807 public Class<? extends TrustStoreBackendCfg> configurationClass() { 808 return TrustStoreBackendCfg.class; 809 } 810 811 812 813 /** {@inheritDoc} */ 814 public DN dn() { 815 return impl.getDN(); 816 } 817 818 819 820 /** {@inheritDoc} */ 821 public String toString() { 822 return impl.toString(); 823 } 824 } 825}