001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016package org.forgerock.opendj.server.config.client;
017
018
019
020import org.forgerock.opendj.config.ConfigurationClient;
021import org.forgerock.opendj.config.ManagedObjectDefinition;
022import org.forgerock.opendj.config.PropertyException;
023import org.forgerock.opendj.server.config.server.DebugTargetCfg;
024
025
026
027/**
028 * A client-side interface for reading and modifying Debug Target
029 * settings.
030 * <p>
031 * Debug Targets define the types of messages logged by the debug
032 * logPublisher.
033 */
034public interface DebugTargetCfgClient extends ConfigurationClient {
035
036  /**
037   * Get the configuration definition associated with this Debug Target.
038   *
039   * @return Returns the configuration definition associated with this Debug Target.
040   */
041  ManagedObjectDefinition<? extends DebugTargetCfgClient, ? extends DebugTargetCfg> definition();
042
043
044
045  /**
046   * Gets the "debug-exceptions-only" property.
047   * <p>
048   * Indicates whether only logs with exception should be logged.
049   *
050   * @return Returns the value of the "debug-exceptions-only" property.
051   */
052  boolean isDebugExceptionsOnly();
053
054
055
056  /**
057   * Sets the "debug-exceptions-only" property.
058   * <p>
059   * Indicates whether only logs with exception should be logged.
060   *
061   * @param value The value of the "debug-exceptions-only" property.
062   * @throws PropertyException
063   *           If the new value is invalid.
064   */
065  void setDebugExceptionsOnly(Boolean value) throws PropertyException;
066
067
068
069  /**
070   * Gets the "debug-scope" property.
071   * <p>
072   * Specifies the fully-qualified OpenDJ Java package, class, or
073   * method affected by the settings in this target definition. Use the
074   * number character (#) to separate the class name and the method
075   * name (that is, org.opends.server.core.DirectoryServer#startUp).
076   *
077   * @return Returns the value of the "debug-scope" property.
078   */
079  String getDebugScope();
080
081
082
083  /**
084   * Sets the "debug-scope" property.
085   * <p>
086   * Specifies the fully-qualified OpenDJ Java package, class, or
087   * method affected by the settings in this target definition. Use the
088   * number character (#) to separate the class name and the method
089   * name (that is, org.opends.server.core.DirectoryServer#startUp).
090   * <p>
091   * This property is read-only and can only be modified during
092   * creation of a Debug Target.
093   *
094   * @param value The value of the "debug-scope" property.
095   * @throws PropertyException
096   *           If the new value is invalid.
097   * @throws PropertyException
098   *           If this Debug Target is not being initialized.
099   */
100  void setDebugScope(String value) throws PropertyException, PropertyException;
101
102
103
104  /**
105   * Gets the "enabled" property.
106   * <p>
107   * Indicates whether the Debug Target is enabled.
108   *
109   * @return Returns the value of the "enabled" property.
110   */
111  Boolean isEnabled();
112
113
114
115  /**
116   * Sets the "enabled" property.
117   * <p>
118   * Indicates whether the Debug Target is enabled.
119   *
120   * @param value The value of the "enabled" property.
121   * @throws PropertyException
122   *           If the new value is invalid.
123   */
124  void setEnabled(boolean value) throws PropertyException;
125
126
127
128  /**
129   * Gets the "include-throwable-cause" property.
130   * <p>
131   * Specifies the property to indicate whether to include the cause
132   * of exceptions in exception thrown and caught messages.
133   *
134   * @return Returns the value of the "include-throwable-cause" property.
135   */
136  boolean isIncludeThrowableCause();
137
138
139
140  /**
141   * Sets the "include-throwable-cause" property.
142   * <p>
143   * Specifies the property to indicate whether to include the cause
144   * of exceptions in exception thrown and caught messages.
145   *
146   * @param value The value of the "include-throwable-cause" property.
147   * @throws PropertyException
148   *           If the new value is invalid.
149   */
150  void setIncludeThrowableCause(Boolean value) throws PropertyException;
151
152
153
154  /**
155   * Gets the "omit-method-entry-arguments" property.
156   * <p>
157   * Specifies the property to indicate whether to include method
158   * arguments in debug messages.
159   *
160   * @return Returns the value of the "omit-method-entry-arguments" property.
161   */
162  boolean isOmitMethodEntryArguments();
163
164
165
166  /**
167   * Sets the "omit-method-entry-arguments" property.
168   * <p>
169   * Specifies the property to indicate whether to include method
170   * arguments in debug messages.
171   *
172   * @param value The value of the "omit-method-entry-arguments" property.
173   * @throws PropertyException
174   *           If the new value is invalid.
175   */
176  void setOmitMethodEntryArguments(Boolean value) throws PropertyException;
177
178
179
180  /**
181   * Gets the "omit-method-return-value" property.
182   * <p>
183   * Specifies the property to indicate whether to include the return
184   * value in debug messages.
185   *
186   * @return Returns the value of the "omit-method-return-value" property.
187   */
188  boolean isOmitMethodReturnValue();
189
190
191
192  /**
193   * Sets the "omit-method-return-value" property.
194   * <p>
195   * Specifies the property to indicate whether to include the return
196   * value in debug messages.
197   *
198   * @param value The value of the "omit-method-return-value" property.
199   * @throws PropertyException
200   *           If the new value is invalid.
201   */
202  void setOmitMethodReturnValue(Boolean value) throws PropertyException;
203
204
205
206  /**
207   * Gets the "throwable-stack-frames" property.
208   * <p>
209   * Specifies the property to indicate the number of stack frames to
210   * include in the stack trace for method entry and exception thrown
211   * messages.
212   *
213   * @return Returns the value of the "throwable-stack-frames" property.
214   */
215  int getThrowableStackFrames();
216
217
218
219  /**
220   * Sets the "throwable-stack-frames" property.
221   * <p>
222   * Specifies the property to indicate the number of stack frames to
223   * include in the stack trace for method entry and exception thrown
224   * messages.
225   *
226   * @param value The value of the "throwable-stack-frames" property.
227   * @throws PropertyException
228   *           If the new value is invalid.
229   */
230  void setThrowableStackFrames(Integer value) throws PropertyException;
231
232}