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.ConfigurationClient;
034    import org.opends.server.admin.IllegalPropertyValueException;
035    import org.opends.server.admin.ManagedObjectDefinition;
036    import org.opends.server.admin.std.server.AlertHandlerCfg;
037    
038    
039    
040    /**
041     * A client-side interface for reading and modifying Alert Handler
042     * settings.
043     * <p>
044     * Alert Handlers are used to notify administrators of significant
045     * problems or notable events that occur in the Directory Server.
046     */
047    public interface AlertHandlerCfgClient extends ConfigurationClient {
048    
049      /**
050       * Get the configuration definition associated with this Alert Handler.
051       *
052       * @return Returns the configuration definition associated with this Alert Handler.
053       */
054      ManagedObjectDefinition<? extends AlertHandlerCfgClient, ? extends AlertHandlerCfg> definition();
055    
056    
057    
058      /**
059       * Gets the "disabled-alert-type" property.
060       * <p>
061       * Specifies the names of the alert types that are disabled for this
062       * alert handler.
063       * <p>
064       * If there are any values for this attribute, then no alerts with
065       * any of the specified types are allowed. If there are no values for
066       * this attribute, then only alerts with a type included in the set
067       * of enabled alert types are allowed, or if there are no values for
068       * the enabled alert types option, then all alert types are allowed.
069       *
070       * @return Returns the values of the "disabled-alert-type" property.
071       */
072      SortedSet<String> getDisabledAlertType();
073    
074    
075    
076      /**
077       * Sets the "disabled-alert-type" property.
078       * <p>
079       * Specifies the names of the alert types that are disabled for this
080       * alert handler.
081       * <p>
082       * If there are any values for this attribute, then no alerts with
083       * any of the specified types are allowed. If there are no values for
084       * this attribute, then only alerts with a type included in the set
085       * of enabled alert types are allowed, or if there are no values for
086       * the enabled alert types option, then all alert types are allowed.
087       *
088       * @param values The values of the "disabled-alert-type" property.
089       * @throws IllegalPropertyValueException
090       *           If one or more of the new values are invalid.
091       */
092      void setDisabledAlertType(Collection<String> values) throws IllegalPropertyValueException;
093    
094    
095    
096      /**
097       * Gets the "enabled" property.
098       * <p>
099       * Indicates whether the Alert Handler is enabled.
100       *
101       * @return Returns the value of the "enabled" property.
102       */
103      Boolean isEnabled();
104    
105    
106    
107      /**
108       * Sets the "enabled" property.
109       * <p>
110       * Indicates whether the Alert Handler is enabled.
111       *
112       * @param value The value of the "enabled" property.
113       * @throws IllegalPropertyValueException
114       *           If the new value is invalid.
115       */
116      void setEnabled(boolean value) throws IllegalPropertyValueException;
117    
118    
119    
120      /**
121       * Gets the "enabled-alert-type" property.
122       * <p>
123       * Specifies the names of the alert types that are enabled for this
124       * alert handler.
125       * <p>
126       * If there are any values for this attribute, then only alerts with
127       * one of the specified types are allowed (unless they are also
128       * included in the disabled alert types). If there are no values for
129       * this attribute, then any alert with a type not included in the
130       * list of disabled alert types is allowed.
131       *
132       * @return Returns the values of the "enabled-alert-type" property.
133       */
134      SortedSet<String> getEnabledAlertType();
135    
136    
137    
138      /**
139       * Sets the "enabled-alert-type" property.
140       * <p>
141       * Specifies the names of the alert types that are enabled for this
142       * alert handler.
143       * <p>
144       * If there are any values for this attribute, then only alerts with
145       * one of the specified types are allowed (unless they are also
146       * included in the disabled alert types). If there are no values for
147       * this attribute, then any alert with a type not included in the
148       * list of disabled alert types is allowed.
149       *
150       * @param values The values of the "enabled-alert-type" property.
151       * @throws IllegalPropertyValueException
152       *           If one or more of the new values are invalid.
153       */
154      void setEnabledAlertType(Collection<String> values) throws IllegalPropertyValueException;
155    
156    
157    
158      /**
159       * Gets the "java-class" property.
160       * <p>
161       * Specifies the fully-qualified name of the Java class that
162       * provides the Alert Handler implementation.
163       *
164       * @return Returns the value of the "java-class" property.
165       */
166      String getJavaClass();
167    
168    
169    
170      /**
171       * Sets the "java-class" property.
172       * <p>
173       * Specifies the fully-qualified name of the Java class that
174       * provides the Alert Handler implementation.
175       *
176       * @param value The value of the "java-class" property.
177       * @throws IllegalPropertyValueException
178       *           If the new value is invalid.
179       */
180      void setJavaClass(String value) throws IllegalPropertyValueException;
181    
182    }