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.SMTPAlertHandlerCfg;
036
037
038
039 /**
040 * A client-side interface for reading and modifying SMTP Alert
041 * Handler settings.
042 * <p>
043 * The SMTP Alert Handler may be used to send e-mail messages to
044 * notify administrators of significant events that occur within the
045 * server.
046 */
047 public interface SMTPAlertHandlerCfgClient extends AlertHandlerCfgClient {
048
049 /**
050 * Get the configuration definition associated with this SMTP Alert Handler.
051 *
052 * @return Returns the configuration definition associated with this SMTP Alert Handler.
053 */
054 ManagedObjectDefinition<? extends SMTPAlertHandlerCfgClient, ? extends SMTPAlertHandlerCfg> definition();
055
056
057
058 /**
059 * Gets the "java-class" property.
060 * <p>
061 * Specifies the fully-qualified name of the Java class that
062 * provides the SMTP Alert Handler implementation.
063 *
064 * @return Returns the value of the "java-class" property.
065 */
066 String getJavaClass();
067
068
069
070 /**
071 * Sets the "java-class" property.
072 * <p>
073 * Specifies the fully-qualified name of the Java class that
074 * provides the SMTP Alert Handler implementation.
075 *
076 * @param value The value of the "java-class" property.
077 * @throws IllegalPropertyValueException
078 * If the new value is invalid.
079 */
080 void setJavaClass(String value) throws IllegalPropertyValueException;
081
082
083
084 /**
085 * Gets the "message-body" property.
086 * <p>
087 * Specifies the body that should be used for email messages
088 * generated by this alert handler.
089 * <p>
090 * The token "%%%%alert-type%%%%" is dynamically replaced with the
091 * alert type string. The token "%%%%alert-id%%%%" is dynamically
092 * replaced with the alert ID value. The token
093 * "%%%%alert-message%%%%" is dynamically replaced with the alert
094 * message. The token "\\n" is replaced with an end-of-line marker.
095 *
096 * @return Returns the value of the "message-body" property.
097 */
098 String getMessageBody();
099
100
101
102 /**
103 * Sets the "message-body" property.
104 * <p>
105 * Specifies the body that should be used for email messages
106 * generated by this alert handler.
107 * <p>
108 * The token "%%%%alert-type%%%%" is dynamically replaced with the
109 * alert type string. The token "%%%%alert-id%%%%" is dynamically
110 * replaced with the alert ID value. The token
111 * "%%%%alert-message%%%%" is dynamically replaced with the alert
112 * message. The token "\\n" is replaced with an end-of-line marker.
113 *
114 * @param value The value of the "message-body" property.
115 * @throws IllegalPropertyValueException
116 * If the new value is invalid.
117 */
118 void setMessageBody(String value) throws IllegalPropertyValueException;
119
120
121
122 /**
123 * Gets the "message-subject" property.
124 * <p>
125 * Specifies the subject that should be used for email messages
126 * generated by this alert handler.
127 * <p>
128 * The token "%%%%alert-type%%%%" is dynamically replaced with the
129 * alert type string. The token "%%%%alert-id%%%%" is dynamically
130 * replaced with the alert ID value. The token
131 * "%%%%alert-message%%%%" is dynamically replaced with the alert
132 * message. The token "\\n" is replaced with an end-of-line marker.
133 *
134 * @return Returns the value of the "message-subject" property.
135 */
136 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 alert handler.
145 * <p>
146 * The token "%%%%alert-type%%%%" is dynamically replaced with the
147 * alert type string. The token "%%%%alert-id%%%%" is dynamically
148 * replaced with the alert ID value. The token
149 * "%%%%alert-message%%%%" is dynamically replaced with the alert
150 * message. The token "\\n" is replaced with an end-of-line marker.
151 *
152 * @param value The value of the "message-subject" property.
153 * @throws IllegalPropertyValueException
154 * If the new value is invalid.
155 */
156 void setMessageSubject(String value) throws IllegalPropertyValueException;
157
158
159
160 /**
161 * Gets the "recipient-address" property.
162 * <p>
163 * Specifies an email address to which the messages should be sent.
164 * <p>
165 * Multiple values may be provided if there should be more than one
166 * recipient.
167 *
168 * @return Returns the values of the "recipient-address" property.
169 */
170 SortedSet<String> getRecipientAddress();
171
172
173
174 /**
175 * Sets the "recipient-address" property.
176 * <p>
177 * Specifies an email address to which the messages should be sent.
178 * <p>
179 * Multiple values may be provided if there should be more than one
180 * recipient.
181 *
182 * @param values The values of the "recipient-address" property.
183 * @throws IllegalPropertyValueException
184 * If one or more of the new values are invalid.
185 */
186 void setRecipientAddress(Collection<String> values) throws IllegalPropertyValueException;
187
188
189
190 /**
191 * Gets the "sender-address" property.
192 * <p>
193 * Specifies the email address to use as the sender for messages
194 * generated by this alert handler.
195 *
196 * @return Returns the value of the "sender-address" property.
197 */
198 String getSenderAddress();
199
200
201
202 /**
203 * Sets the "sender-address" property.
204 * <p>
205 * Specifies the email address to use as the sender for messages
206 * generated by this alert handler.
207 *
208 * @param value The value of the "sender-address" property.
209 * @throws IllegalPropertyValueException
210 * If the new value is invalid.
211 */
212 void setSenderAddress(String value) throws IllegalPropertyValueException;
213
214 }