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