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