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.server; 027 028 029 030import java.util.SortedSet; 031import org.opends.server.admin.server.ConfigurationChangeListener; 032import org.opends.server.types.AttributeType; 033 034 035 036/** 037 * A server-side interface for querying SMTP Account Status 038 * Notification Handler settings. 039 * <p> 040 * The SMTP Account Status Notification Handler is a notification 041 * handler that sends email messages to end users and/or administrators 042 * whenever an account status notification is generated. 043 */ 044public interface SMTPAccountStatusNotificationHandlerCfg extends AccountStatusNotificationHandlerCfg { 045 046 /** 047 * Gets the configuration class associated with this SMTP Account Status Notification Handler. 048 * 049 * @return Returns the configuration class associated with this SMTP Account Status Notification Handler. 050 */ 051 Class<? extends SMTPAccountStatusNotificationHandlerCfg> configurationClass(); 052 053 054 055 /** 056 * Register to be notified when this SMTP Account Status Notification Handler is changed. 057 * 058 * @param listener 059 * The SMTP Account Status Notification Handler configuration change listener. 060 */ 061 void addSMTPChangeListener(ConfigurationChangeListener<SMTPAccountStatusNotificationHandlerCfg> listener); 062 063 064 065 /** 066 * Deregister an existing SMTP Account Status Notification Handler configuration change listener. 067 * 068 * @param listener 069 * The SMTP Account Status Notification Handler configuration change listener. 070 */ 071 void removeSMTPChangeListener(ConfigurationChangeListener<SMTPAccountStatusNotificationHandlerCfg> listener); 072 073 074 075 /** 076 * Gets the "email-address-attribute-type" property. 077 * <p> 078 * Specifies which attribute in the user's entries may be used to 079 * obtain the email address when notifying the end user. 080 * <p> 081 * You can specify more than one email address as separate values. 082 * In this case, the OpenDJ server sends a notification to all email 083 * addresses identified. 084 * 085 * @return Returns an unmodifiable set containing the values of the "email-address-attribute-type" property. 086 */ 087 SortedSet<AttributeType> getEmailAddressAttributeType(); 088 089 090 091 /** 092 * Gets the "java-class" property. 093 * <p> 094 * Specifies the fully-qualified name of the Java class that 095 * provides the SMTP Account Status Notification Handler 096 * implementation. 097 * 098 * @return Returns the value of the "java-class" property. 099 */ 100 String getJavaClass(); 101 102 103 104 /** 105 * Gets the "message-subject" property. 106 * <p> 107 * Specifies the subject that should be used for email messages 108 * generated by this account status notification handler. 109 * <p> 110 * The values for this property should begin with the name of an 111 * account status notification type followed by a colon and the 112 * subject that should be used for the associated notification 113 * message. If an email message is generated for an account status 114 * notification type for which no subject is defined, then that 115 * message is given a generic subject. 116 * 117 * @return Returns an unmodifiable set containing the values of the "message-subject" property. 118 */ 119 SortedSet<String> getMessageSubject(); 120 121 122 123 /** 124 * Gets the "message-template-file" property. 125 * <p> 126 * Specifies the path to the file containing the message template to 127 * generate the email notification messages. 128 * <p> 129 * The values for this property should begin with the name of an 130 * account status notification type followed by a colon and the path 131 * to the template file that should be used for that notification 132 * type. If an account status notification has a notification type 133 * that is not associated with a message template file, then no email 134 * message is generated for that notification. 135 * 136 * @return Returns an unmodifiable set containing the values of the "message-template-file" property. 137 */ 138 SortedSet<String> getMessageTemplateFile(); 139 140 141 142 /** 143 * Gets the "recipient-address" property. 144 * <p> 145 * Specifies an email address to which notification messages are 146 * sent, either instead of or in addition to the end user for whom 147 * the notification has been generated. 148 * <p> 149 * This may be used to ensure that server administrators also 150 * receive a copy of any notification messages that are generated. 151 * 152 * @return Returns an unmodifiable set containing the values of the "recipient-address" property. 153 */ 154 SortedSet<String> getRecipientAddress(); 155 156 157 158 /** 159 * Gets the "sender-address" property. 160 * <p> 161 * Specifies the email address from which the message is sent. Note 162 * that this does not necessarily have to be a legitimate email 163 * address. 164 * 165 * @return Returns the value of the "sender-address" property. 166 */ 167 String getSenderAddress(); 168 169 170 171 /** 172 * Gets the "send-message-without-end-user-address" property. 173 * <p> 174 * Indicates whether an email notification message should be 175 * generated and sent to the set of notification recipients even if 176 * the user entry does not contain any values for any of the email 177 * address attributes (that is, in cases when it is not be possible 178 * to notify the end user). 179 * <p> 180 * This is only applicable if both one or more email address 181 * attribute types and one or more additional recipient addresses are 182 * specified. 183 * 184 * @return Returns the value of the "send-message-without-end-user-address" property. 185 */ 186 boolean isSendMessageWithoutEndUserAddress(); 187 188}