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