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.AttributeTypePropertyDefinition;
035import org.forgerock.opendj.config.BooleanPropertyDefinition;
036import org.forgerock.opendj.config.ClassPropertyDefinition;
037import org.forgerock.opendj.config.client.ConcurrentModificationException;
038import org.forgerock.opendj.config.client.ManagedObject;
039import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException;
040import org.forgerock.opendj.config.client.OperationRejectedException;
041import org.forgerock.opendj.config.DefaultBehaviorProvider;
042import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
043import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
044import org.forgerock.opendj.config.ManagedObjectDefinition;
045import org.forgerock.opendj.config.PropertyOption;
046import org.forgerock.opendj.config.PropertyProvider;
047import org.forgerock.opendj.config.server.ConfigurationChangeListener;
048import org.forgerock.opendj.config.server.ServerManagedObject;
049import org.forgerock.opendj.config.StringPropertyDefinition;
050import org.forgerock.opendj.config.Tag;
051import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
052import org.forgerock.opendj.ldap.DN;
053import org.forgerock.opendj.ldap.LdapException;
054import org.forgerock.opendj.ldap.schema.AttributeType;
055import org.forgerock.opendj.server.config.client.SMTPAccountStatusNotificationHandlerCfgClient;
056import org.forgerock.opendj.server.config.server.AccountStatusNotificationHandlerCfg;
057import org.forgerock.opendj.server.config.server.SMTPAccountStatusNotificationHandlerCfg;
058
059
060
061/**
062 * An interface for querying the SMTP Account Status Notification
063 * Handler managed object definition meta information.
064 * <p>
065 * The SMTP Account Status Notification Handler is a notification
066 * handler that sends email messages to end users and/or administrators
067 * whenever an account status notification is generated.
068 */
069public final class SMTPAccountStatusNotificationHandlerCfgDefn extends ManagedObjectDefinition<SMTPAccountStatusNotificationHandlerCfgClient, SMTPAccountStatusNotificationHandlerCfg> {
070
071  /** The singleton configuration definition instance. */
072  private static final SMTPAccountStatusNotificationHandlerCfgDefn INSTANCE = new SMTPAccountStatusNotificationHandlerCfgDefn();
073
074
075
076  /** The "email-address-attribute-type" property definition. */
077  private static final AttributeTypePropertyDefinition PD_EMAIL_ADDRESS_ATTRIBUTE_TYPE;
078
079
080
081  /** The "java-class" property definition. */
082  private static final ClassPropertyDefinition PD_JAVA_CLASS;
083
084
085
086  /** The "message-subject" property definition. */
087  private static final StringPropertyDefinition PD_MESSAGE_SUBJECT;
088
089
090
091  /** The "message-template-file" property definition. */
092  private static final StringPropertyDefinition PD_MESSAGE_TEMPLATE_FILE;
093
094
095
096  /** The "recipient-address" property definition. */
097  private static final StringPropertyDefinition PD_RECIPIENT_ADDRESS;
098
099
100
101  /** The "send-email-as-html" property definition. */
102  private static final BooleanPropertyDefinition PD_SEND_EMAIL_AS_HTML;
103
104
105
106  /** The "sender-address" property definition. */
107  private static final StringPropertyDefinition PD_SENDER_ADDRESS;
108
109
110
111  /** The "send-message-without-end-user-address" property definition. */
112  private static final BooleanPropertyDefinition PD_SEND_MESSAGE_WITHOUT_END_USER_ADDRESS;
113
114
115
116  /** Build the "email-address-attribute-type" property definition. */
117  static {
118      AttributeTypePropertyDefinition.Builder builder = AttributeTypePropertyDefinition.createBuilder(INSTANCE, "email-address-attribute-type");
119      builder.setOption(PropertyOption.MULTI_VALUED);
120      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "email-address-attribute-type"));
121      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<AttributeType>(INSTANCE, "email-address-attribute-type"));
122      PD_EMAIL_ADDRESS_ATTRIBUTE_TYPE = builder.getInstance();
123      INSTANCE.registerPropertyDefinition(PD_EMAIL_ADDRESS_ATTRIBUTE_TYPE);
124  }
125
126
127
128  /** Build the "java-class" property definition. */
129  static {
130      ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class");
131      builder.setOption(PropertyOption.MANDATORY);
132      builder.setOption(PropertyOption.ADVANCED);
133      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class"));
134      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.extensions.SMTPAccountStatusNotificationHandler");
135      builder.setDefaultBehaviorProvider(provider);
136      builder.addInstanceOf("org.opends.server.api.AccountStatusNotificationHandler");
137      PD_JAVA_CLASS = builder.getInstance();
138      INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS);
139  }
140
141
142
143  /** Build the "message-subject" property definition. */
144  static {
145      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "message-subject");
146      builder.setOption(PropertyOption.MULTI_VALUED);
147      builder.setOption(PropertyOption.MANDATORY);
148      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "message-subject"));
149      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
150      PD_MESSAGE_SUBJECT = builder.getInstance();
151      INSTANCE.registerPropertyDefinition(PD_MESSAGE_SUBJECT);
152  }
153
154
155
156  /** Build the "message-template-file" property definition. */
157  static {
158      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "message-template-file");
159      builder.setOption(PropertyOption.MULTI_VALUED);
160      builder.setOption(PropertyOption.MANDATORY);
161      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "message-template-file"));
162      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
163      PD_MESSAGE_TEMPLATE_FILE = builder.getInstance();
164      INSTANCE.registerPropertyDefinition(PD_MESSAGE_TEMPLATE_FILE);
165  }
166
167
168
169  /** Build the "recipient-address" property definition. */
170  static {
171      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "recipient-address");
172      builder.setOption(PropertyOption.MULTI_VALUED);
173      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "recipient-address"));
174      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "recipient-address"));
175      PD_RECIPIENT_ADDRESS = builder.getInstance();
176      INSTANCE.registerPropertyDefinition(PD_RECIPIENT_ADDRESS);
177  }
178
179
180
181  /** Build the "send-email-as-html" property definition. */
182  static {
183      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "send-email-as-html");
184      builder.setOption(PropertyOption.ADVANCED);
185      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "send-email-as-html"));
186      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
187      builder.setDefaultBehaviorProvider(provider);
188      PD_SEND_EMAIL_AS_HTML = builder.getInstance();
189      INSTANCE.registerPropertyDefinition(PD_SEND_EMAIL_AS_HTML);
190  }
191
192
193
194  /** Build the "sender-address" property definition. */
195  static {
196      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "sender-address");
197      builder.setOption(PropertyOption.MANDATORY);
198      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "sender-address"));
199      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
200      PD_SENDER_ADDRESS = builder.getInstance();
201      INSTANCE.registerPropertyDefinition(PD_SENDER_ADDRESS);
202  }
203
204
205
206  /** Build the "send-message-without-end-user-address" property definition. */
207  static {
208      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "send-message-without-end-user-address");
209      builder.setOption(PropertyOption.MANDATORY);
210      builder.setOption(PropertyOption.ADVANCED);
211      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "send-message-without-end-user-address"));
212      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true");
213      builder.setDefaultBehaviorProvider(provider);
214      PD_SEND_MESSAGE_WITHOUT_END_USER_ADDRESS = builder.getInstance();
215      INSTANCE.registerPropertyDefinition(PD_SEND_MESSAGE_WITHOUT_END_USER_ADDRESS);
216  }
217
218
219
220  // Register the tags associated with this managed object definition.
221  static {
222    INSTANCE.registerTag(Tag.valueOf("user-management"));
223  }
224
225
226
227  /**
228   * Get the SMTP Account Status Notification Handler configuration
229   * definition singleton.
230   *
231   * @return Returns the SMTP Account Status Notification Handler
232   *         configuration definition singleton.
233   */
234  public static SMTPAccountStatusNotificationHandlerCfgDefn getInstance() {
235    return INSTANCE;
236  }
237
238
239
240  /**
241   * Private constructor.
242   */
243  private SMTPAccountStatusNotificationHandlerCfgDefn() {
244    super("smtp-account-status-notification-handler", AccountStatusNotificationHandlerCfgDefn.getInstance());
245  }
246
247
248
249  /** {@inheritDoc} */
250  public SMTPAccountStatusNotificationHandlerCfgClient createClientConfiguration(
251      ManagedObject<? extends SMTPAccountStatusNotificationHandlerCfgClient> impl) {
252    return new SMTPAccountStatusNotificationHandlerCfgClientImpl(impl);
253  }
254
255
256
257  /** {@inheritDoc} */
258  public SMTPAccountStatusNotificationHandlerCfg createServerConfiguration(
259      ServerManagedObject<? extends SMTPAccountStatusNotificationHandlerCfg> impl) {
260    return new SMTPAccountStatusNotificationHandlerCfgServerImpl(impl);
261  }
262
263
264
265  /** {@inheritDoc} */
266  public Class<SMTPAccountStatusNotificationHandlerCfg> getServerConfigurationClass() {
267    return SMTPAccountStatusNotificationHandlerCfg.class;
268  }
269
270
271
272  /**
273   * Get the "email-address-attribute-type" property definition.
274   * <p>
275   * Specifies which attribute in the user's entries may be used to
276   * obtain the email address when notifying the end user.
277   * <p>
278   * You can specify more than one email address as separate values.
279   * In this case, the OpenDJ server sends a notification to all email
280   * addresses identified.
281   *
282   * @return Returns the "email-address-attribute-type" property definition.
283   */
284  public AttributeTypePropertyDefinition getEmailAddressAttributeTypePropertyDefinition() {
285    return PD_EMAIL_ADDRESS_ATTRIBUTE_TYPE;
286  }
287
288
289
290  /**
291   * Get the "enabled" property definition.
292   * <p>
293   * Indicates whether the SMTP Account Status Notification Handler is
294   * enabled. Only enabled handlers are invoked whenever a related
295   * event occurs in the server.
296   *
297   * @return Returns the "enabled" property definition.
298   */
299  public BooleanPropertyDefinition getEnabledPropertyDefinition() {
300    return AccountStatusNotificationHandlerCfgDefn.getInstance().getEnabledPropertyDefinition();
301  }
302
303
304
305  /**
306   * Get the "java-class" property definition.
307   * <p>
308   * Specifies the fully-qualified name of the Java class that
309   * provides the SMTP Account Status Notification Handler
310   * implementation.
311   *
312   * @return Returns the "java-class" property definition.
313   */
314  public ClassPropertyDefinition getJavaClassPropertyDefinition() {
315    return PD_JAVA_CLASS;
316  }
317
318
319
320  /**
321   * Get the "message-subject" property definition.
322   * <p>
323   * Specifies the subject that should be used for email messages
324   * generated by this account status notification handler.
325   * <p>
326   * The values for this property should begin with the name of an
327   * account status notification type followed by a colon and the
328   * subject that should be used for the associated notification
329   * message. If an email message is generated for an account status
330   * notification type for which no subject is defined, then that
331   * message is given a generic subject.
332   *
333   * @return Returns the "message-subject" property definition.
334   */
335  public StringPropertyDefinition getMessageSubjectPropertyDefinition() {
336    return PD_MESSAGE_SUBJECT;
337  }
338
339
340
341  /**
342   * Get the "message-template-file" property definition.
343   * <p>
344   * Specifies the path to the file containing the message template to
345   * generate the email notification messages.
346   * <p>
347   * The values for this property should begin with the name of an
348   * account status notification type followed by a colon and the path
349   * to the template file that should be used for that notification
350   * type. If an account status notification has a notification type
351   * that is not associated with a message template file, then no email
352   * message is generated for that notification.
353   *
354   * @return Returns the "message-template-file" property definition.
355   */
356  public StringPropertyDefinition getMessageTemplateFilePropertyDefinition() {
357    return PD_MESSAGE_TEMPLATE_FILE;
358  }
359
360
361
362  /**
363   * Get the "recipient-address" property definition.
364   * <p>
365   * Specifies an email address to which notification messages are
366   * sent, either instead of or in addition to the end user for whom
367   * the notification has been generated.
368   * <p>
369   * This may be used to ensure that server administrators also
370   * receive a copy of any notification messages that are generated.
371   *
372   * @return Returns the "recipient-address" property definition.
373   */
374  public StringPropertyDefinition getRecipientAddressPropertyDefinition() {
375    return PD_RECIPIENT_ADDRESS;
376  }
377
378
379
380  /**
381   * Get the "send-email-as-html" property definition.
382   * <p>
383   * Indicates whether an email notification message should be sent as
384   * HTML.
385   * <p>
386   * If this value is true, email notification messages are marked as
387   * text/html. Otherwise outgoing email messages are assumed to be
388   * plaintext and marked as text/plain.
389   *
390   * @return Returns the "send-email-as-html" property definition.
391   */
392  public BooleanPropertyDefinition getSendEmailAsHtmlPropertyDefinition() {
393    return PD_SEND_EMAIL_AS_HTML;
394  }
395
396
397
398  /**
399   * Get the "sender-address" property definition.
400   * <p>
401   * Specifies the email address from which the message is sent. Note
402   * that this does not necessarily have to be a legitimate email
403   * address.
404   *
405   * @return Returns the "sender-address" property definition.
406   */
407  public StringPropertyDefinition getSenderAddressPropertyDefinition() {
408    return PD_SENDER_ADDRESS;
409  }
410
411
412
413  /**
414   * Get the "send-message-without-end-user-address" property definition.
415   * <p>
416   * Indicates whether an email notification message should be
417   * generated and sent to the set of notification recipients even if
418   * the user entry does not contain any values for any of the email
419   * address attributes (that is, in cases when it is not be possible
420   * to notify the end user).
421   * <p>
422   * This is only applicable if both one or more email address
423   * attribute types and one or more additional recipient addresses are
424   * specified.
425   *
426   * @return Returns the "send-message-without-end-user-address" property definition.
427   */
428  public BooleanPropertyDefinition getSendMessageWithoutEndUserAddressPropertyDefinition() {
429    return PD_SEND_MESSAGE_WITHOUT_END_USER_ADDRESS;
430  }
431
432
433
434  /**
435   * Managed object client implementation.
436   */
437  private static class SMTPAccountStatusNotificationHandlerCfgClientImpl implements
438    SMTPAccountStatusNotificationHandlerCfgClient {
439
440    /** Private implementation. */
441    private ManagedObject<? extends SMTPAccountStatusNotificationHandlerCfgClient> impl;
442
443
444
445    /** Private constructor. */
446    private SMTPAccountStatusNotificationHandlerCfgClientImpl(
447        ManagedObject<? extends SMTPAccountStatusNotificationHandlerCfgClient> impl) {
448      this.impl = impl;
449    }
450
451
452
453    /** {@inheritDoc} */
454    public SortedSet<AttributeType> getEmailAddressAttributeType() {
455      return impl.getPropertyValues(INSTANCE.getEmailAddressAttributeTypePropertyDefinition());
456    }
457
458
459
460    /** {@inheritDoc} */
461    public void setEmailAddressAttributeType(Collection<AttributeType> values) {
462      impl.setPropertyValues(INSTANCE.getEmailAddressAttributeTypePropertyDefinition(), values);
463    }
464
465
466
467    /** {@inheritDoc} */
468    public Boolean isEnabled() {
469      return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
470    }
471
472
473
474    /** {@inheritDoc} */
475    public void setEnabled(boolean value) {
476      impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value);
477    }
478
479
480
481    /** {@inheritDoc} */
482    public String getJavaClass() {
483      return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
484    }
485
486
487
488    /** {@inheritDoc} */
489    public void setJavaClass(String value) {
490      impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value);
491    }
492
493
494
495    /** {@inheritDoc} */
496    public SortedSet<String> getMessageSubject() {
497      return impl.getPropertyValues(INSTANCE.getMessageSubjectPropertyDefinition());
498    }
499
500
501
502    /** {@inheritDoc} */
503    public void setMessageSubject(Collection<String> values) {
504      impl.setPropertyValues(INSTANCE.getMessageSubjectPropertyDefinition(), values);
505    }
506
507
508
509    /** {@inheritDoc} */
510    public SortedSet<String> getMessageTemplateFile() {
511      return impl.getPropertyValues(INSTANCE.getMessageTemplateFilePropertyDefinition());
512    }
513
514
515
516    /** {@inheritDoc} */
517    public void setMessageTemplateFile(Collection<String> values) {
518      impl.setPropertyValues(INSTANCE.getMessageTemplateFilePropertyDefinition(), values);
519    }
520
521
522
523    /** {@inheritDoc} */
524    public SortedSet<String> getRecipientAddress() {
525      return impl.getPropertyValues(INSTANCE.getRecipientAddressPropertyDefinition());
526    }
527
528
529
530    /** {@inheritDoc} */
531    public void setRecipientAddress(Collection<String> values) {
532      impl.setPropertyValues(INSTANCE.getRecipientAddressPropertyDefinition(), values);
533    }
534
535
536
537    /** {@inheritDoc} */
538    public boolean isSendEmailAsHtml() {
539      return impl.getPropertyValue(INSTANCE.getSendEmailAsHtmlPropertyDefinition());
540    }
541
542
543
544    /** {@inheritDoc} */
545    public void setSendEmailAsHtml(Boolean value) {
546      impl.setPropertyValue(INSTANCE.getSendEmailAsHtmlPropertyDefinition(), value);
547    }
548
549
550
551    /** {@inheritDoc} */
552    public String getSenderAddress() {
553      return impl.getPropertyValue(INSTANCE.getSenderAddressPropertyDefinition());
554    }
555
556
557
558    /** {@inheritDoc} */
559    public void setSenderAddress(String value) {
560      impl.setPropertyValue(INSTANCE.getSenderAddressPropertyDefinition(), value);
561    }
562
563
564
565    /** {@inheritDoc} */
566    public boolean isSendMessageWithoutEndUserAddress() {
567      return impl.getPropertyValue(INSTANCE.getSendMessageWithoutEndUserAddressPropertyDefinition());
568    }
569
570
571
572    /** {@inheritDoc} */
573    public void setSendMessageWithoutEndUserAddress(boolean value) {
574      impl.setPropertyValue(INSTANCE.getSendMessageWithoutEndUserAddressPropertyDefinition(), value);
575    }
576
577
578
579    /** {@inheritDoc} */
580    public ManagedObjectDefinition<? extends SMTPAccountStatusNotificationHandlerCfgClient, ? extends SMTPAccountStatusNotificationHandlerCfg> definition() {
581      return INSTANCE;
582    }
583
584
585
586    /** {@inheritDoc} */
587    public PropertyProvider properties() {
588      return impl;
589    }
590
591
592
593    /** {@inheritDoc} */
594    public void commit() throws ManagedObjectAlreadyExistsException,
595        MissingMandatoryPropertiesException, ConcurrentModificationException,
596        OperationRejectedException, LdapException {
597      impl.commit();
598    }
599
600
601
602    /** {@inheritDoc} */
603    public String toString() {
604      return impl.toString();
605    }
606  }
607
608
609
610  /**
611   * Managed object server implementation.
612   */
613  private static class SMTPAccountStatusNotificationHandlerCfgServerImpl implements
614    SMTPAccountStatusNotificationHandlerCfg {
615
616    /** Private implementation. */
617    private ServerManagedObject<? extends SMTPAccountStatusNotificationHandlerCfg> impl;
618
619    /** The value of the "email-address-attribute-type" property. */
620    private final SortedSet<AttributeType> pEmailAddressAttributeType;
621
622    /** The value of the "enabled" property. */
623    private final boolean pEnabled;
624
625    /** The value of the "java-class" property. */
626    private final String pJavaClass;
627
628    /** The value of the "message-subject" property. */
629    private final SortedSet<String> pMessageSubject;
630
631    /** The value of the "message-template-file" property. */
632    private final SortedSet<String> pMessageTemplateFile;
633
634    /** The value of the "recipient-address" property. */
635    private final SortedSet<String> pRecipientAddress;
636
637    /** The value of the "send-email-as-html" property. */
638    private final boolean pSendEmailAsHtml;
639
640    /** The value of the "sender-address" property. */
641    private final String pSenderAddress;
642
643    /** The value of the "send-message-without-end-user-address" property. */
644    private final boolean pSendMessageWithoutEndUserAddress;
645
646
647
648    /** Private constructor. */
649    private SMTPAccountStatusNotificationHandlerCfgServerImpl(ServerManagedObject<? extends SMTPAccountStatusNotificationHandlerCfg> impl) {
650      this.impl = impl;
651      this.pEmailAddressAttributeType = impl.getPropertyValues(INSTANCE.getEmailAddressAttributeTypePropertyDefinition());
652      this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
653      this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
654      this.pMessageSubject = impl.getPropertyValues(INSTANCE.getMessageSubjectPropertyDefinition());
655      this.pMessageTemplateFile = impl.getPropertyValues(INSTANCE.getMessageTemplateFilePropertyDefinition());
656      this.pRecipientAddress = impl.getPropertyValues(INSTANCE.getRecipientAddressPropertyDefinition());
657      this.pSendEmailAsHtml = impl.getPropertyValue(INSTANCE.getSendEmailAsHtmlPropertyDefinition());
658      this.pSenderAddress = impl.getPropertyValue(INSTANCE.getSenderAddressPropertyDefinition());
659      this.pSendMessageWithoutEndUserAddress = impl.getPropertyValue(INSTANCE.getSendMessageWithoutEndUserAddressPropertyDefinition());
660    }
661
662
663
664    /** {@inheritDoc} */
665    public void addSMTPChangeListener(
666        ConfigurationChangeListener<SMTPAccountStatusNotificationHandlerCfg> listener) {
667      impl.registerChangeListener(listener);
668    }
669
670
671
672    /** {@inheritDoc} */
673    public void removeSMTPChangeListener(
674        ConfigurationChangeListener<SMTPAccountStatusNotificationHandlerCfg> listener) {
675      impl.deregisterChangeListener(listener);
676    }
677    /** {@inheritDoc} */
678    public void addChangeListener(
679        ConfigurationChangeListener<AccountStatusNotificationHandlerCfg> listener) {
680      impl.registerChangeListener(listener);
681    }
682
683
684
685    /** {@inheritDoc} */
686    public void removeChangeListener(
687        ConfigurationChangeListener<AccountStatusNotificationHandlerCfg> listener) {
688      impl.deregisterChangeListener(listener);
689    }
690
691
692
693    /** {@inheritDoc} */
694    public SortedSet<AttributeType> getEmailAddressAttributeType() {
695      return pEmailAddressAttributeType;
696    }
697
698
699
700    /** {@inheritDoc} */
701    public boolean isEnabled() {
702      return pEnabled;
703    }
704
705
706
707    /** {@inheritDoc} */
708    public String getJavaClass() {
709      return pJavaClass;
710    }
711
712
713
714    /** {@inheritDoc} */
715    public SortedSet<String> getMessageSubject() {
716      return pMessageSubject;
717    }
718
719
720
721    /** {@inheritDoc} */
722    public SortedSet<String> getMessageTemplateFile() {
723      return pMessageTemplateFile;
724    }
725
726
727
728    /** {@inheritDoc} */
729    public SortedSet<String> getRecipientAddress() {
730      return pRecipientAddress;
731    }
732
733
734
735    /** {@inheritDoc} */
736    public boolean isSendEmailAsHtml() {
737      return pSendEmailAsHtml;
738    }
739
740
741
742    /** {@inheritDoc} */
743    public String getSenderAddress() {
744      return pSenderAddress;
745    }
746
747
748
749    /** {@inheritDoc} */
750    public boolean isSendMessageWithoutEndUserAddress() {
751      return pSendMessageWithoutEndUserAddress;
752    }
753
754
755
756    /** {@inheritDoc} */
757    public Class<? extends SMTPAccountStatusNotificationHandlerCfg> configurationClass() {
758      return SMTPAccountStatusNotificationHandlerCfg.class;
759    }
760
761
762
763    /** {@inheritDoc} */
764    public DN dn() {
765      return impl.getDN();
766    }
767
768
769
770    /** {@inheritDoc} */
771    public String toString() {
772      return impl.toString();
773    }
774  }
775}