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.PropertyIsReadOnlyException;
037    import org.opends.server.admin.std.meta.DebugTargetCfgDefn.DebugCategory;
038    import org.opends.server.admin.std.meta.DebugTargetCfgDefn.DebugLevel;
039    import org.opends.server.admin.std.server.DebugTargetCfg;
040    
041    
042    
043    /**
044     * A client-side interface for reading and modifying Debug Target
045     * settings.
046     * <p>
047     * Debug Targets define the types of messages logged by the debug
048     * logPublisher.
049     */
050    public interface DebugTargetCfgClient extends ConfigurationClient {
051    
052      /**
053       * Get the configuration definition associated with this Debug Target.
054       *
055       * @return Returns the configuration definition associated with this Debug Target.
056       */
057      ManagedObjectDefinition<? extends DebugTargetCfgClient, ? extends DebugTargetCfg> definition();
058    
059    
060    
061      /**
062       * Gets the "debug-category" property.
063       * <p>
064       * Specifies the debug message categories to be logged.
065       *
066       * @return Returns the values of the "debug-category" property.
067       */
068      SortedSet<DebugCategory> getDebugCategory();
069    
070    
071    
072      /**
073       * Sets the "debug-category" property.
074       * <p>
075       * Specifies the debug message categories to be logged.
076       *
077       * @param values The values of the "debug-category" property.
078       * @throws IllegalPropertyValueException
079       *           If one or more of the new values are invalid.
080       */
081      void setDebugCategory(Collection<DebugCategory> values) throws IllegalPropertyValueException;
082    
083    
084    
085      /**
086       * Gets the "debug-level" property.
087       * <p>
088       * Specifies the lowest severity level of debug messages to log.
089       *
090       * @return Returns the value of the "debug-level" property.
091       */
092      DebugLevel getDebugLevel();
093    
094    
095    
096      /**
097       * Sets the "debug-level" property.
098       * <p>
099       * Specifies the lowest severity level of debug messages to log.
100       *
101       * @param value The value of the "debug-level" property.
102       * @throws IllegalPropertyValueException
103       *           If the new value is invalid.
104       */
105      void setDebugLevel(DebugLevel value) throws IllegalPropertyValueException;
106    
107    
108    
109      /**
110       * Gets the "debug-scope" property.
111       * <p>
112       * Specifies the fully-qualified OpenDS Java package, class, or
113       * method affected by the settings in this target definition. Use the
114       * number character (#) to separate the class name and the method
115       * name (that is, org.opends.server.core.DirectoryServer#startUp).
116       *
117       * @return Returns the value of the "debug-scope" property.
118       */
119      String getDebugScope();
120    
121    
122    
123      /**
124       * Sets the "debug-scope" property.
125       * <p>
126       * Specifies the fully-qualified OpenDS Java package, class, or
127       * method affected by the settings in this target definition. Use the
128       * number character (#) to separate the class name and the method
129       * name (that is, org.opends.server.core.DirectoryServer#startUp).
130       * <p>
131       * This property is read-only and can only be modified during
132       * creation of a Debug Target.
133       *
134       * @param value The value of the "debug-scope" property.
135       * @throws IllegalPropertyValueException
136       *           If the new value is invalid.
137       * @throws PropertyIsReadOnlyException
138       *           If this Debug Target is not being initialized.
139       */
140      void setDebugScope(String value) throws IllegalPropertyValueException, PropertyIsReadOnlyException;
141    
142    
143    
144      /**
145       * Gets the "include-throwable-cause" property.
146       * <p>
147       * Specifies the property to indicate whether to include the cause
148       * of exceptions in exception thrown and caught messages.
149       *
150       * @return Returns the value of the "include-throwable-cause" property.
151       */
152      boolean isIncludeThrowableCause();
153    
154    
155    
156      /**
157       * Sets the "include-throwable-cause" property.
158       * <p>
159       * Specifies the property to indicate whether to include the cause
160       * of exceptions in exception thrown and caught messages.
161       *
162       * @param value The value of the "include-throwable-cause" property.
163       * @throws IllegalPropertyValueException
164       *           If the new value is invalid.
165       */
166      void setIncludeThrowableCause(Boolean value) throws IllegalPropertyValueException;
167    
168    
169    
170      /**
171       * Gets the "omit-method-entry-arguments" property.
172       * <p>
173       * Specifies the property to indicate whether to include method
174       * arguments in debug messages.
175       *
176       * @return Returns the value of the "omit-method-entry-arguments" property.
177       */
178      boolean isOmitMethodEntryArguments();
179    
180    
181    
182      /**
183       * Sets the "omit-method-entry-arguments" property.
184       * <p>
185       * Specifies the property to indicate whether to include method
186       * arguments in debug messages.
187       *
188       * @param value The value of the "omit-method-entry-arguments" property.
189       * @throws IllegalPropertyValueException
190       *           If the new value is invalid.
191       */
192      void setOmitMethodEntryArguments(Boolean value) throws IllegalPropertyValueException;
193    
194    
195    
196      /**
197       * Gets the "omit-method-return-value" property.
198       * <p>
199       * Specifies the property to indicate whether to include the return
200       * value in debug messages.
201       *
202       * @return Returns the value of the "omit-method-return-value" property.
203       */
204      boolean isOmitMethodReturnValue();
205    
206    
207    
208      /**
209       * Sets the "omit-method-return-value" property.
210       * <p>
211       * Specifies the property to indicate whether to include the return
212       * value in debug messages.
213       *
214       * @param value The value of the "omit-method-return-value" property.
215       * @throws IllegalPropertyValueException
216       *           If the new value is invalid.
217       */
218      void setOmitMethodReturnValue(Boolean value) throws IllegalPropertyValueException;
219    
220    
221    
222      /**
223       * Gets the "throwable-stack-frames" property.
224       * <p>
225       * Specifies the property to indicate the number of stack frames to
226       * include in the stack trace for method entry and exception thrown
227       * messages.
228       *
229       * @return Returns the value of the "throwable-stack-frames" property.
230       */
231      int getThrowableStackFrames();
232    
233    
234    
235      /**
236       * Sets the "throwable-stack-frames" property.
237       * <p>
238       * Specifies the property to indicate the number of stack frames to
239       * include in the stack trace for method entry and exception thrown
240       * messages.
241       *
242       * @param value The value of the "throwable-stack-frames" property.
243       * @throws IllegalPropertyValueException
244       *           If the new value is invalid.
245       */
246      void setThrowableStackFrames(Integer value) throws IllegalPropertyValueException;
247    
248    }