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  /** {@inheritDoc} */
251  public TrustStoreBackendCfgClient createClientConfiguration(
252      ManagedObject<? extends TrustStoreBackendCfgClient> impl) {
253    return new TrustStoreBackendCfgClientImpl(impl);
254  }
255
256
257
258  /** {@inheritDoc} */
259  public TrustStoreBackendCfg createServerConfiguration(
260      ServerManagedObject<? extends TrustStoreBackendCfg> impl) {
261    return new TrustStoreBackendCfgServerImpl(impl);
262  }
263
264
265
266  /** {@inheritDoc} */
267  public Class<TrustStoreBackendCfg> getServerConfigurationClass() {
268    return TrustStoreBackendCfg.class;
269  }
270
271
272
273  /**
274   * Get the "backend-id" property definition.
275   * <p>
276   * Specifies a name to identify the associated backend.
277   * <p>
278   * The name must be unique among all backends in the server. The
279   * backend ID may not be altered after the backend is created in the
280   * server.
281   *
282   * @return Returns the "backend-id" property definition.
283   */
284  public StringPropertyDefinition getBackendIdPropertyDefinition() {
285    return BackendCfgDefn.getInstance().getBackendIdPropertyDefinition();
286  }
287
288
289
290  /**
291   * Get the "base-dn" property definition.
292   * <p>
293   * Specifies the base DN(s) for the data that the backend handles.
294   * <p>
295   * A single backend may be responsible for one or more base DNs.
296   * Note that no two backends may have the same base DN although one
297   * backend may have a base DN that is below a base DN provided by
298   * another backend (similar to the use of sub-suffixes in the Sun
299   * Java System Directory Server). If any of the base DNs is
300   * subordinate to a base DN for another backend, then all base DNs
301   * for that backend must be subordinate to that same base DN.
302   *
303   * @return Returns the "base-dn" property definition.
304   */
305  public DNPropertyDefinition getBaseDNPropertyDefinition() {
306    return BackendCfgDefn.getInstance().getBaseDNPropertyDefinition();
307  }
308
309
310
311  /**
312   * Get the "enabled" property definition.
313   * <p>
314   * Indicates whether the backend is enabled in the server.
315   * <p>
316   * If a backend is not enabled, then its contents are not accessible
317   * when processing operations.
318   *
319   * @return Returns the "enabled" property definition.
320   */
321  public BooleanPropertyDefinition getEnabledPropertyDefinition() {
322    return BackendCfgDefn.getInstance().getEnabledPropertyDefinition();
323  }
324
325
326
327  /**
328   * Get the "java-class" property definition.
329   * <p>
330   * Specifies the fully-qualified name of the Java class that
331   * provides the backend implementation.
332   *
333   * @return Returns the "java-class" property definition.
334   */
335  public ClassPropertyDefinition getJavaClassPropertyDefinition() {
336    return PD_JAVA_CLASS;
337  }
338
339
340
341  /**
342   * Get the "trust-store-file" property definition.
343   * <p>
344   * Specifies the path to the file that stores the trust information.
345   * <p>
346   * It may be an absolute path, or a path that is relative to the
347   * OpenDJ instance root.
348   *
349   * @return Returns the "trust-store-file" property definition.
350   */
351  public StringPropertyDefinition getTrustStoreFilePropertyDefinition() {
352    return PD_TRUST_STORE_FILE;
353  }
354
355
356
357  /**
358   * Get the "trust-store-pin" property definition.
359   * <p>
360   * Specifies the clear-text PIN needed to access the Trust Store
361   * Backend .
362   *
363   * @return Returns the "trust-store-pin" property definition.
364   */
365  public StringPropertyDefinition getTrustStorePinPropertyDefinition() {
366    return PD_TRUST_STORE_PIN;
367  }
368
369
370
371  /**
372   * Get the "trust-store-pin-environment-variable" property definition.
373   * <p>
374   * Specifies the name of the environment variable that contains the
375   * clear-text PIN needed to access the Trust Store Backend .
376   *
377   * @return Returns the "trust-store-pin-environment-variable" property definition.
378   */
379  public StringPropertyDefinition getTrustStorePinEnvironmentVariablePropertyDefinition() {
380    return PD_TRUST_STORE_PIN_ENVIRONMENT_VARIABLE;
381  }
382
383
384
385  /**
386   * Get the "trust-store-pin-file" property definition.
387   * <p>
388   * Specifies the path to the text file whose only contents should be
389   * a single line containing the clear-text PIN needed to access the
390   * Trust Store Backend .
391   *
392   * @return Returns the "trust-store-pin-file" property definition.
393   */
394  public StringPropertyDefinition getTrustStorePinFilePropertyDefinition() {
395    return PD_TRUST_STORE_PIN_FILE;
396  }
397
398
399
400  /**
401   * Get the "trust-store-pin-property" property definition.
402   * <p>
403   * Specifies the name of the Java property that contains the
404   * clear-text PIN needed to access the Trust Store Backend .
405   *
406   * @return Returns the "trust-store-pin-property" property definition.
407   */
408  public StringPropertyDefinition getTrustStorePinPropertyPropertyDefinition() {
409    return PD_TRUST_STORE_PIN_PROPERTY;
410  }
411
412
413
414  /**
415   * Get the "trust-store-type" property definition.
416   * <p>
417   * Specifies the format for the data in the key store file.
418   * <p>
419   * Valid values should always include 'JKS' and 'PKCS12', but
420   * different implementations may allow other values as well.
421   *
422   * @return Returns the "trust-store-type" property definition.
423   */
424  public StringPropertyDefinition getTrustStoreTypePropertyDefinition() {
425    return PD_TRUST_STORE_TYPE;
426  }
427
428
429
430  /**
431   * Get the "writability-mode" property definition.
432   * <p>
433   * Specifies the behavior that the backend should use when
434   * processing write operations.
435   *
436   * @return Returns the "writability-mode" property definition.
437   */
438  public EnumPropertyDefinition<WritabilityMode> getWritabilityModePropertyDefinition() {
439    return PD_WRITABILITY_MODE;
440  }
441
442
443
444  /**
445   * Managed object client implementation.
446   */
447  private static class TrustStoreBackendCfgClientImpl implements
448    TrustStoreBackendCfgClient {
449
450    /** Private implementation. */
451    private ManagedObject<? extends TrustStoreBackendCfgClient> impl;
452
453
454
455    /** Private constructor. */
456    private TrustStoreBackendCfgClientImpl(
457        ManagedObject<? extends TrustStoreBackendCfgClient> impl) {
458      this.impl = impl;
459    }
460
461
462
463    /** {@inheritDoc} */
464    public String getBackendId() {
465      return impl.getPropertyValue(INSTANCE.getBackendIdPropertyDefinition());
466    }
467
468
469
470    /** {@inheritDoc} */
471    public void setBackendId(String value) throws PropertyException {
472      impl.setPropertyValue(INSTANCE.getBackendIdPropertyDefinition(), value);
473    }
474
475
476
477    /** {@inheritDoc} */
478    public SortedSet<DN> getBaseDN() {
479      return impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition());
480    }
481
482
483
484    /** {@inheritDoc} */
485    public void setBaseDN(Collection<DN> values) {
486      impl.setPropertyValues(INSTANCE.getBaseDNPropertyDefinition(), values);
487    }
488
489
490
491    /** {@inheritDoc} */
492    public Boolean isEnabled() {
493      return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
494    }
495
496
497
498    /** {@inheritDoc} */
499    public void setEnabled(boolean value) {
500      impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value);
501    }
502
503
504
505    /** {@inheritDoc} */
506    public String getJavaClass() {
507      return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
508    }
509
510
511
512    /** {@inheritDoc} */
513    public void setJavaClass(String value) {
514      impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value);
515    }
516
517
518
519    /** {@inheritDoc} */
520    public String getTrustStoreFile() {
521      return impl.getPropertyValue(INSTANCE.getTrustStoreFilePropertyDefinition());
522    }
523
524
525
526    /** {@inheritDoc} */
527    public void setTrustStoreFile(String value) {
528      impl.setPropertyValue(INSTANCE.getTrustStoreFilePropertyDefinition(), value);
529    }
530
531
532
533    /** {@inheritDoc} */
534    public String getTrustStorePin() {
535      return impl.getPropertyValue(INSTANCE.getTrustStorePinPropertyDefinition());
536    }
537
538
539
540    /** {@inheritDoc} */
541    public void setTrustStorePin(String value) {
542      impl.setPropertyValue(INSTANCE.getTrustStorePinPropertyDefinition(), value);
543    }
544
545
546
547    /** {@inheritDoc} */
548    public String getTrustStorePinEnvironmentVariable() {
549      return impl.getPropertyValue(INSTANCE.getTrustStorePinEnvironmentVariablePropertyDefinition());
550    }
551
552
553
554    /** {@inheritDoc} */
555    public void setTrustStorePinEnvironmentVariable(String value) {
556      impl.setPropertyValue(INSTANCE.getTrustStorePinEnvironmentVariablePropertyDefinition(), value);
557    }
558
559
560
561    /** {@inheritDoc} */
562    public String getTrustStorePinFile() {
563      return impl.getPropertyValue(INSTANCE.getTrustStorePinFilePropertyDefinition());
564    }
565
566
567
568    /** {@inheritDoc} */
569    public void setTrustStorePinFile(String value) {
570      impl.setPropertyValue(INSTANCE.getTrustStorePinFilePropertyDefinition(), value);
571    }
572
573
574
575    /** {@inheritDoc} */
576    public String getTrustStorePinProperty() {
577      return impl.getPropertyValue(INSTANCE.getTrustStorePinPropertyPropertyDefinition());
578    }
579
580
581
582    /** {@inheritDoc} */
583    public void setTrustStorePinProperty(String value) {
584      impl.setPropertyValue(INSTANCE.getTrustStorePinPropertyPropertyDefinition(), value);
585    }
586
587
588
589    /** {@inheritDoc} */
590    public String getTrustStoreType() {
591      return impl.getPropertyValue(INSTANCE.getTrustStoreTypePropertyDefinition());
592    }
593
594
595
596    /** {@inheritDoc} */
597    public void setTrustStoreType(String value) {
598      impl.setPropertyValue(INSTANCE.getTrustStoreTypePropertyDefinition(), value);
599    }
600
601
602
603    /** {@inheritDoc} */
604    public WritabilityMode getWritabilityMode() {
605      return impl.getPropertyValue(INSTANCE.getWritabilityModePropertyDefinition());
606    }
607
608
609
610    /** {@inheritDoc} */
611    public void setWritabilityMode(WritabilityMode value) {
612      impl.setPropertyValue(INSTANCE.getWritabilityModePropertyDefinition(), value);
613    }
614
615
616
617    /** {@inheritDoc} */
618    public ManagedObjectDefinition<? extends TrustStoreBackendCfgClient, ? extends TrustStoreBackendCfg> definition() {
619      return INSTANCE;
620    }
621
622
623
624    /** {@inheritDoc} */
625    public PropertyProvider properties() {
626      return impl;
627    }
628
629
630
631    /** {@inheritDoc} */
632    public void commit() throws ManagedObjectAlreadyExistsException,
633        MissingMandatoryPropertiesException, ConcurrentModificationException,
634        OperationRejectedException, LdapException {
635      impl.commit();
636    }
637
638
639
640    /** {@inheritDoc} */
641    public String toString() {
642      return impl.toString();
643    }
644  }
645
646
647
648  /**
649   * Managed object server implementation.
650   */
651  private static class TrustStoreBackendCfgServerImpl implements
652    TrustStoreBackendCfg {
653
654    /** Private implementation. */
655    private ServerManagedObject<? extends TrustStoreBackendCfg> impl;
656
657    /** The value of the "backend-id" property. */
658    private final String pBackendId;
659
660    /** The value of the "base-dn" property. */
661    private final SortedSet<DN> pBaseDN;
662
663    /** The value of the "enabled" property. */
664    private final boolean pEnabled;
665
666    /** The value of the "java-class" property. */
667    private final String pJavaClass;
668
669    /** The value of the "trust-store-file" property. */
670    private final String pTrustStoreFile;
671
672    /** The value of the "trust-store-pin" property. */
673    private final String pTrustStorePin;
674
675    /** The value of the "trust-store-pin-environment-variable" property. */
676    private final String pTrustStorePinEnvironmentVariable;
677
678    /** The value of the "trust-store-pin-file" property. */
679    private final String pTrustStorePinFile;
680
681    /** The value of the "trust-store-pin-property" property. */
682    private final String pTrustStorePinProperty;
683
684    /** The value of the "trust-store-type" property. */
685    private final String pTrustStoreType;
686
687    /** The value of the "writability-mode" property. */
688    private final WritabilityMode pWritabilityMode;
689
690
691
692    /** Private constructor. */
693    private TrustStoreBackendCfgServerImpl(ServerManagedObject<? extends TrustStoreBackendCfg> impl) {
694      this.impl = impl;
695      this.pBackendId = impl.getPropertyValue(INSTANCE.getBackendIdPropertyDefinition());
696      this.pBaseDN = impl.getPropertyValues(INSTANCE.getBaseDNPropertyDefinition());
697      this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
698      this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
699      this.pTrustStoreFile = impl.getPropertyValue(INSTANCE.getTrustStoreFilePropertyDefinition());
700      this.pTrustStorePin = impl.getPropertyValue(INSTANCE.getTrustStorePinPropertyDefinition());
701      this.pTrustStorePinEnvironmentVariable = impl.getPropertyValue(INSTANCE.getTrustStorePinEnvironmentVariablePropertyDefinition());
702      this.pTrustStorePinFile = impl.getPropertyValue(INSTANCE.getTrustStorePinFilePropertyDefinition());
703      this.pTrustStorePinProperty = impl.getPropertyValue(INSTANCE.getTrustStorePinPropertyPropertyDefinition());
704      this.pTrustStoreType = impl.getPropertyValue(INSTANCE.getTrustStoreTypePropertyDefinition());
705      this.pWritabilityMode = impl.getPropertyValue(INSTANCE.getWritabilityModePropertyDefinition());
706    }
707
708
709
710    /** {@inheritDoc} */
711    public void addTrustStoreChangeListener(
712        ConfigurationChangeListener<TrustStoreBackendCfg> listener) {
713      impl.registerChangeListener(listener);
714    }
715
716
717
718    /** {@inheritDoc} */
719    public void removeTrustStoreChangeListener(
720        ConfigurationChangeListener<TrustStoreBackendCfg> listener) {
721      impl.deregisterChangeListener(listener);
722    }
723    /** {@inheritDoc} */
724    public void addChangeListener(
725        ConfigurationChangeListener<BackendCfg> listener) {
726      impl.registerChangeListener(listener);
727    }
728
729
730
731    /** {@inheritDoc} */
732    public void removeChangeListener(
733        ConfigurationChangeListener<BackendCfg> listener) {
734      impl.deregisterChangeListener(listener);
735    }
736
737
738
739    /** {@inheritDoc} */
740    public String getBackendId() {
741      return pBackendId;
742    }
743
744
745
746    /** {@inheritDoc} */
747    public SortedSet<DN> getBaseDN() {
748      return pBaseDN;
749    }
750
751
752
753    /** {@inheritDoc} */
754    public boolean isEnabled() {
755      return pEnabled;
756    }
757
758
759
760    /** {@inheritDoc} */
761    public String getJavaClass() {
762      return pJavaClass;
763    }
764
765
766
767    /** {@inheritDoc} */
768    public String getTrustStoreFile() {
769      return pTrustStoreFile;
770    }
771
772
773
774    /** {@inheritDoc} */
775    public String getTrustStorePin() {
776      return pTrustStorePin;
777    }
778
779
780
781    /** {@inheritDoc} */
782    public String getTrustStorePinEnvironmentVariable() {
783      return pTrustStorePinEnvironmentVariable;
784    }
785
786
787
788    /** {@inheritDoc} */
789    public String getTrustStorePinFile() {
790      return pTrustStorePinFile;
791    }
792
793
794
795    /** {@inheritDoc} */
796    public String getTrustStorePinProperty() {
797      return pTrustStorePinProperty;
798    }
799
800
801
802    /** {@inheritDoc} */
803    public String getTrustStoreType() {
804      return pTrustStoreType;
805    }
806
807
808
809    /** {@inheritDoc} */
810    public WritabilityMode getWritabilityMode() {
811      return pWritabilityMode;
812    }
813
814
815
816    /** {@inheritDoc} */
817    public Class<? extends TrustStoreBackendCfg> configurationClass() {
818      return TrustStoreBackendCfg.class;
819    }
820
821
822
823    /** {@inheritDoc} */
824    public DN dn() {
825      return impl.getDN();
826    }
827
828
829
830    /** {@inheritDoc} */
831    public String toString() {
832      return impl.toString();
833    }
834  }
835}