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