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