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