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.client; 028 029 030 031 import java.util.Collection; 032 import java.util.SortedSet; 033 import org.opends.server.admin.IllegalPropertyValueException; 034 import org.opends.server.admin.ManagedObjectDefinition; 035 import org.opends.server.admin.std.server.SMTPAccountStatusNotificationHandlerCfg; 036 import org.opends.server.types.AttributeType; 037 038 039 040 /** 041 * A client-side interface for reading and modifying SMTP Account 042 * Status Notification Handler settings. 043 * <p> 044 * The SMTP Account Status Notification Handler is a notification 045 * handler that sends email messages to end users and/or administrators 046 * whenever an account status notification is generated. 047 */ 048 public interface SMTPAccountStatusNotificationHandlerCfgClient extends AccountStatusNotificationHandlerCfgClient { 049 050 /** 051 * Get the configuration definition associated with this SMTP Account Status Notification Handler. 052 * 053 * @return Returns the configuration definition associated with this SMTP Account Status Notification Handler. 054 */ 055 ManagedObjectDefinition<? extends SMTPAccountStatusNotificationHandlerCfgClient, ? extends SMTPAccountStatusNotificationHandlerCfg> definition(); 056 057 058 059 /** 060 * Gets the "email-address-attribute-type" property. 061 * <p> 062 * Specifies which attribute in the user's entries may be used to 063 * obtain the email address when notifying the end user. 064 * <p> 065 * You can specify more than one email address as separate values. 066 * In this case, the OpenDS server sends a notification to all email 067 * addresses identified. 068 * 069 * @return Returns the values of the "email-address-attribute-type" property. 070 */ 071 SortedSet<AttributeType> getEmailAddressAttributeType(); 072 073 074 075 /** 076 * Sets 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 OpenDS server sends a notification to all email 083 * addresses identified. 084 * 085 * @param values The values of the "email-address-attribute-type" property. 086 * @throws IllegalPropertyValueException 087 * If one or more of the new values are invalid. 088 */ 089 void setEmailAddressAttributeType(Collection<AttributeType> values) throws IllegalPropertyValueException; 090 091 092 093 /** 094 * Gets the "java-class" property. 095 * <p> 096 * Specifies the fully-qualified name of the Java class that 097 * provides the SMTP Account Status Notification Handler 098 * implementation. 099 * 100 * @return Returns the value of the "java-class" property. 101 */ 102 String getJavaClass(); 103 104 105 106 /** 107 * Sets the "java-class" property. 108 * <p> 109 * Specifies the fully-qualified name of the Java class that 110 * provides the SMTP Account Status Notification Handler 111 * implementation. 112 * 113 * @param value The value of the "java-class" property. 114 * @throws IllegalPropertyValueException 115 * If the new value is invalid. 116 */ 117 void setJavaClass(String value) throws IllegalPropertyValueException; 118 119 120 121 /** 122 * Gets the "message-subject" property. 123 * <p> 124 * Specifies the subject that should be used for email messages 125 * generated by this account status notification handler. 126 * <p> 127 * The values for this property should begin with the name of an 128 * account status notification type followed by a colon and the 129 * subject that should be used for the associated notification 130 * message. If an email message is generated for an account status 131 * notification type for which no subject is defined, then that 132 * message is given a generic subject. 133 * 134 * @return Returns the values of the "message-subject" property. 135 */ 136 SortedSet<String> getMessageSubject(); 137 138 139 140 /** 141 * Sets the "message-subject" property. 142 * <p> 143 * Specifies the subject that should be used for email messages 144 * generated by this account status notification handler. 145 * <p> 146 * The values for this property should begin with the name of an 147 * account status notification type followed by a colon and the 148 * subject that should be used for the associated notification 149 * message. If an email message is generated for an account status 150 * notification type for which no subject is defined, then that 151 * message is given a generic subject. 152 * 153 * @param values The values of the "message-subject" property. 154 * @throws IllegalPropertyValueException 155 * If one or more of the new values are invalid. 156 */ 157 void setMessageSubject(Collection<String> values) throws IllegalPropertyValueException; 158 159 160 161 /** 162 * Gets the "message-template-file" property. 163 * <p> 164 * Specifies the path to the file containing the message template to 165 * generate the email notification messages. 166 * <p> 167 * The values for this property should begin with the name of an 168 * account status notification type followed by a colon and the path 169 * to the template file that should be used for that notification 170 * type. If an account status notification has a notification type 171 * that is not associated with a message template file, then no email 172 * message is generated for that notification. 173 * 174 * @return Returns the values of the "message-template-file" property. 175 */ 176 SortedSet<String> getMessageTemplateFile(); 177 178 179 180 /** 181 * Sets the "message-template-file" property. 182 * <p> 183 * Specifies the path to the file containing the message template to 184 * generate the email notification messages. 185 * <p> 186 * The values for this property should begin with the name of an 187 * account status notification type followed by a colon and the path 188 * to the template file that should be used for that notification 189 * type. If an account status notification has a notification type 190 * that is not associated with a message template file, then no email 191 * message is generated for that notification. 192 * 193 * @param values The values of the "message-template-file" property. 194 * @throws IllegalPropertyValueException 195 * If one or more of the new values are invalid. 196 */ 197 void setMessageTemplateFile(Collection<String> values) throws IllegalPropertyValueException; 198 199 200 201 /** 202 * Gets the "recipient-address" property. 203 * <p> 204 * Specifies an email address to which notification messages are 205 * sent, either instead of or in addition to the end user for whom 206 * the notification has been generated. 207 * <p> 208 * This may be used to ensure that server administrators also 209 * receive a copy of any notification messages that are generated. 210 * 211 * @return Returns the values of the "recipient-address" property. 212 */ 213 SortedSet<String> getRecipientAddress(); 214 215 216 217 /** 218 * Sets the "recipient-address" property. 219 * <p> 220 * Specifies an email address to which notification messages are 221 * sent, either instead of or in addition to the end user for whom 222 * the notification has been generated. 223 * <p> 224 * This may be used to ensure that server administrators also 225 * receive a copy of any notification messages that are generated. 226 * 227 * @param values The values of the "recipient-address" property. 228 * @throws IllegalPropertyValueException 229 * If one or more of the new values are invalid. 230 */ 231 void setRecipientAddress(Collection<String> values) throws IllegalPropertyValueException; 232 233 234 235 /** 236 * Gets the "sender-address" property. 237 * <p> 238 * Specifies the email address from which the message is sent. Note 239 * that this does not necessarily have to be a legitimate email 240 * address. 241 * 242 * @return Returns the value of the "sender-address" property. 243 */ 244 String getSenderAddress(); 245 246 247 248 /** 249 * Sets the "sender-address" property. 250 * <p> 251 * Specifies the email address from which the message is sent. Note 252 * that this does not necessarily have to be a legitimate email 253 * address. 254 * 255 * @param value The value of the "sender-address" property. 256 * @throws IllegalPropertyValueException 257 * If the new value is invalid. 258 */ 259 void setSenderAddress(String value) throws IllegalPropertyValueException; 260 261 262 263 /** 264 * Gets the "send-message-without-end-user-address" property. 265 * <p> 266 * Indicates whether an email notification message should be 267 * generated and sent to the set of notification recipients even if 268 * the user entry does not contain any values for any of the email 269 * address attributes (that is, in cases when it is not be possible 270 * to notify the end user). 271 * <p> 272 * This is only applicable if both one or more email address 273 * attribute types and one or more additional recipient addresses are 274 * specified. 275 * 276 * @return Returns the value of the "send-message-without-end-user-address" property. 277 */ 278 boolean isSendMessageWithoutEndUserAddress(); 279 280 281 282 /** 283 * Sets the "send-message-without-end-user-address" property. 284 * <p> 285 * Indicates whether an email notification message should be 286 * generated and sent to the set of notification recipients even if 287 * the user entry does not contain any values for any of the email 288 * address attributes (that is, in cases when it is not be possible 289 * to notify the end user). 290 * <p> 291 * This is only applicable if both one or more email address 292 * attribute types and one or more additional recipient addresses are 293 * specified. 294 * 295 * @param value The value of the "send-message-without-end-user-address" property. 296 * @throws IllegalPropertyValueException 297 * If the new value is invalid. 298 */ 299 void setSendMessageWithoutEndUserAddress(boolean value) throws IllegalPropertyValueException; 300 301 }