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.client;
027
028
029
030import java.util.Collection;
031import java.util.SortedSet;
032import org.opends.server.admin.ConfigurationClient;
033import org.opends.server.admin.ManagedObjectDefinition;
034import org.opends.server.admin.PropertyException;
035import org.opends.server.admin.std.server.AlertHandlerCfg;
036
037
038
039/**
040 * A client-side interface for reading and modifying Alert Handler
041 * settings.
042 * <p>
043 * Alert Handlers are used to notify administrators of significant
044 * problems or notable events that occur in the OpenDJ directory
045 * server.
046 */
047public 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 PropertyException
090   *           If one or more of the new values are invalid.
091   */
092  void setDisabledAlertType(Collection<String> values) throws PropertyException;
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 PropertyException
114   *           If the new value is invalid.
115   */
116  void setEnabled(boolean value) throws PropertyException;
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 PropertyException
152   *           If one or more of the new values are invalid.
153   */
154  void setEnabledAlertType(Collection<String> values) throws PropertyException;
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 PropertyException
178   *           If the new value is invalid.
179   */
180  void setJavaClass(String value) throws PropertyException;
181
182}