/**
* Process the beginning of this element.
*
- * @param attributes The attribute list of this element
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
+ * @param attributes The attribute list for this element
*/
- public void begin(Attributes attributes) throws Exception {
+ public void begin(String namespace, String name, Attributes attributes)
+ throws Exception {
Service svc = (Service)digester.peek();
Executor ex = null;
if ( attributes.getValue("executor")!=null ) {
/**
* Process the end of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
*/
- public void end() throws Exception {
+ public void end(String namespace, String name) throws Exception {
Object top = digester.pop();
}
/**
* Process the end of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
*/
- public void end() throws Exception {
+ public void end(String namespace, String name) throws Exception {
// Identify the objects to be used
Object child = digester.peek(0);
this.multiParamIndex = multiParamIndex;
}
- public void end() throws Exception {
+ /**
+ * Process the end of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
+ */
+ public void end(String namespace, String name) throws Exception {
// Retrieve or construct the parameter values array
Object parameters[] = null;
public SoapHeaderRule() {
}
- public void body(String text)
- throws Exception {
+ /**
+ * Process the body text of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
+ * @param bodyText The body text of this element
+ */
+ public void body(String namespace, String name, String text)
+ throws Exception {
String namespaceuri = null;
String localpart = text;
int colon = text.indexOf(':');
public ServiceQnameRule() {
}
- public void body(String text)
- throws Exception {
+ /**
+ * Process the body text of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
+ * @param bodyText The body text of this element
+ */
+ public void body(String namespace, String name, String text)
+ throws Exception {
String namespaceuri = null;
String localpart = text;
int colon = text.indexOf(':');
* in the order originally registered through the <code>add()</code>
* method.
*
- * @param pattern Nesting pattern to be matched
- *
- * @deprecated Call match(namespaceURI,pattern) instead.
- */
- public List<Rule> match(String pattern) {
- return match(namespaceURI, pattern);
- }
-
-
- /**
- * Return a List of all registered Rule instances that match the specified
- * nesting pattern, or a zero-length List if there are no matches. If more
- * than one Rule instance matches, they <strong>must</strong> be returned
- * in the order originally registered through the <code>add()</code>
- * method.
- *
* @param namespaceURI Namespace URI for which to select matching rules,
* or <code>null</code> to match regardless of namespace URI
* @param pattern Nesting pattern to be matched
// ----------------------------------------------------------- Constructors
-
- /**
- * Construct a "call method" rule with the specified method name. The
- * parameter types (if any) default to java.lang.String.
- *
- * @param digester The associated Digester
- * @param methodName Method name of the parent method to call
- * @param paramCount The number of parameters to collect, or
- * zero for a single argument from the body of this element.
- *
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #CallMethodRule(String methodName,int paramCount)} instead.
- */
- public CallMethodRule(Digester digester, String methodName,
- int paramCount) {
-
- this(methodName, paramCount);
-
- }
-
-
- /**
- * Construct a "call method" rule with the specified method name.
- *
- * @param digester The associated Digester
- * @param methodName Method name of the parent method to call
- * @param paramCount The number of parameters to collect, or
- * zero for a single argument from the body of ths element
- * @param paramTypes The Java class names of the arguments
- * (if you wish to use a primitive type, specify the corresonding
- * Java wrapper class instead, such as <code>java.lang.Boolean</code>
- * for a <code>boolean</code> parameter)
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #CallMethodRule(String methodName,int paramCount, String [] paramTypes)} instead.
- */
- public CallMethodRule(Digester digester, String methodName,
- int paramCount, String paramTypes[]) {
-
- this(methodName, paramCount, paramTypes);
-
- }
-
-
- /**
- * Construct a "call method" rule with the specified method name.
- *
- * @param digester The associated Digester
- * @param methodName Method name of the parent method to call
- * @param paramCount The number of parameters to collect, or
- * zero for a single argument from the body of ths element
- * @param paramTypes The Java classes that represent the
- * parameter types of the method arguments
- * (if you wish to use a primitive type, specify the corresonding
- * Java wrapper class instead, such as <code>java.lang.Boolean.TYPE</code>
- * for a <code>boolean</code> parameter)
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #CallMethodRule(String methodName,int paramCount, Class [] paramTypes)} instead.
- */
- public CallMethodRule(Digester digester, String methodName,
- int paramCount, Class<?> paramTypes[]) {
-
- this(methodName, paramCount, paramTypes);
- }
-
-
/**
* Construct a "call method" rule with the specified method name. The
* parameter types (if any) default to java.lang.String.
/**
* Process the start of this element.
*
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
* @param attributes The attribute list for this element
*/
- public void begin(Attributes attributes) throws Exception {
+ public void begin(String namespace, String name, Attributes attributes)
+ throws Exception {
// Push an array to capture the parameter values if necessary
if (paramCount > 0) {
/**
* Process the body text of this element.
*
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
* @param bodyText The body text of this element
*/
- public void body(String bodyText) throws Exception {
+ public void body(String namespace, String name, String bodyText)
+ throws Exception {
if (paramCount == 0) {
this.bodyText = bodyText.trim();
/**
* Process the end of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
*/
- public void end() throws Exception {
+ public void end(String namespace, String name) throws Exception {
// Retrieve or construct the parameter values array
Object parameters[] = null;
// ----------------------------------------------------------- Constructors
-
- /**
- * Construct a "call parameter" rule that will save the body text of this
- * element as the parameter value.
- *
- * @param digester The associated Digester
- * @param paramIndex The zero-relative parameter number
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #CallParamRule(int paramIndex)} instead.
- */
- public CallParamRule(Digester digester, int paramIndex) {
-
- this(paramIndex);
-
- }
-
-
- /**
- * Construct a "call parameter" rule that will save the value of the
- * specified attribute as the parameter value.
- *
- * @param digester The associated Digester
- * @param paramIndex The zero-relative parameter number
- * @param attributeName The name of the attribute to save
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #CallParamRule(int paramIndex, String attributeName)} instead.
- */
- public CallParamRule(Digester digester, int paramIndex,
- String attributeName) {
-
- this(paramIndex, attributeName);
-
- }
-
/**
* Construct a "call parameter" rule that will save the body text of this
* element as the parameter value.
/**
* Process the start of this element.
*
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
* @param attributes The attribute list for this element
*/
- public void begin(Attributes attributes) throws Exception {
+ public void begin(String namespace, String name, Attributes attributes)
+ throws Exception {
Object param = null;
/**
* Process the body text of this element.
*
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
* @param bodyText The body text of this element
*/
- public void body(String bodyText) throws Exception {
+ public void body(String namespace, String name, String bodyText)
+ throws Exception {
if (attributeName == null && !fromStack) {
// We must wait to set the parameter until end
protected SAXParserFactory factory = null;
/**
- * @deprecated This is now managed by {@link ParserFeatureSetterFactory}
- */
- protected String JAXP_SCHEMA_LANGUAGE =
- "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
-
-
- /**
* The Locator associated with our parser.
*/
protected Locator locator = null;
/**
- * Return the debugging detail level of our currently enabled logger.
- *
- * @deprecated This method now always returns 0. Digester uses the apache
- * jakarta commons-logging library; see the documentation for that library
- * for more information.
- */
- public int getDebug() {
-
- return (0);
-
- }
-
-
- /**
- * Set the debugging detail level of our currently enabled logger.
- *
- * @param debug New debugging detail level (0=off, increasing integers
- * for more detail)
- *
- * @deprecated This method now has no effect at all. Digester uses
- * the apache jakarta comons-logging library; see the documentation
- * for that library for more information.
- */
- public void setDebug(int debug) {
-
- ; // No action is taken
-
- }
-
-
- /**
* Return the error handler for this Digester.
*/
public ErrorHandler getErrorHandler() {
/**
- * By setting the reader in the constructor, you can bypass JAXP and
- * be able to use digester in Weblogic 6.0.
- *
- * @deprecated Use getXMLReader() instead, which can throw a
- * SAXException if the reader cannot be instantiated
- */
- public XMLReader getReader() {
-
- try {
- return (getXMLReader());
- } catch (SAXException e) {
- log.error("Cannot get XMLReader", e);
- return (null);
- }
-
- }
-
-
- /**
* Return the <code>Rules</code> implementation object containing our
* rules collection and associated matching policy. If none has been
* established, a default implementation will be created and returned.
// ------------------------------------------------------- Public Methods
-
- /**
- * Log a message to our associated logger.
- *
- * @param message The message to be logged
- * @deprecated Call getLogger() and use it's logging methods
- */
- public void log(String message) {
-
- log.info(message);
-
- }
-
-
- /**
- * Log a message and exception to our associated logger.
- *
- * @param message The message to be logged
- * @deprecated Call getLogger() and use it's logging methods
- */
- public void log(String message, Throwable exception) {
-
- log.error(message, exception);
-
- }
-
-
/**
* Parse the content of the specified file using this Digester. Returns
* the root element from the object stack (if any).
/**
- * Return the set of rules that apply to the specified match position.
- * The selected rules are those that match exactly, or those rules
- * that specify a suffix match and the tail of the rule matches the
- * current match position. Exact matches have precedence over
- * suffix matches, then (among suffix matches) the longest match
- * is preferred.
- *
- * @param match The current match position
- *
- * @deprecated Call <code>match()</code> on the <code>Rules</code>
- * implementation returned by <code>getRules()</code>
- */
- List<Rule> getRules(String match) {
-
- return (getRules().match(match));
-
- }
-
-
- /**
* <p>Return the top object on the parameters stack without removing it. If there are
* no objects on the stack, return <code>null</code>.</p>
*
/**
- * Construct a factory create rule that will use the specified
- * class name to create an {@link ObjectCreationFactory} which will
- * then be used to create an object and push it on the stack.
- *
- * @param digester The associated Digester
- * @param className Java class name of the object creation factory class
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #FactoryCreateRule(String className)} instead.
- */
- public FactoryCreateRule(Digester digester, String className) {
-
- this(className);
-
- }
-
-
- /**
- * Construct a factory create rule that will use the specified
- * class to create an {@link ObjectCreationFactory} which will
- * then be used to create an object and push it on the stack.
- *
- * @param digester The associated Digester
- * @param clazz Java class name of the object creation factory class
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #FactoryCreateRule(Class clazz)} instead.
- */
- public FactoryCreateRule(Digester digester, Class<?> clazz) {
-
- this(clazz);
-
- }
-
-
- /**
- * Construct a factory create rule that will use the specified
- * class name (possibly overridden by the specified attribute if present)
- * to create an {@link ObjectCreationFactory}, which will then be used
- * to instantiate an object instance and push it onto the stack.
- *
- * @param digester The associated Digester
- * @param className Default Java class name of the factory class
- * @param attributeName Attribute name which, if present, contains an
- * override of the class name of the object creation factory to create.
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #FactoryCreateRule(String className, String attributeName)} instead.
- */
- public FactoryCreateRule(Digester digester,
- String className, String attributeName) {
-
- this(className, attributeName);
-
- }
-
-
- /**
- * Construct a factory create rule that will use the specified
- * class (possibly overridden by the specified attribute if present)
- * to create an {@link ObjectCreationFactory}, which will then be used
- * to instantiate an object instance and push it onto the stack.
- *
- * @param digester The associated Digester
- * @param clazz Default Java class name of the factory class
- * @param attributeName Attribute name which, if present, contains an
- * override of the class name of the object creation factory to create.
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #FactoryCreateRule(Class clazz, String attributeName)} instead.
- */
- public FactoryCreateRule(Digester digester,
- Class<?> clazz, String attributeName) {
-
- this(clazz, attributeName);
-
- }
-
-
- /**
- * Construct a factory create rule using the given, already instantiated,
- * {@link ObjectCreationFactory}.
- *
- * @param digester The associated Digester
- * @param creationFactory called on to create the object.
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #FactoryCreateRule(ObjectCreationFactory creationFactory)} instead.
- */
- public FactoryCreateRule(Digester digester,
- ObjectCreationFactory creationFactory) {
-
- this(creationFactory);
-
- }
-
- /**
* <p>Construct a factory create rule that will use the specified
* class name to create an {@link ObjectCreationFactory} which will
* then be used to create an object and push it on the stack.</p>
/**
* Pop the Node off the top of the stack.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
*/
- public void end() throws Exception {
+ public void end(String namespace, String name) throws Exception {
Object top = digester.pop();
/**
* Construct an object create rule with the specified class name.
*
- * @param digester The associated Digester
- * @param className Java class name of the object to be created
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #ObjectCreateRule(String className)} instead.
- */
- public ObjectCreateRule(Digester digester, String className) {
-
- this(className);
-
- }
-
-
- /**
- * Construct an object create rule with the specified class.
- *
- * @param digester The associated Digester
- * @param clazz Java class name of the object to be created
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #ObjectCreateRule(Class clazz)} instead.
- */
- public ObjectCreateRule(Digester digester, Class<?> clazz) {
-
- this(clazz);
-
- }
-
-
- /**
- * Construct an object create rule with the specified class name and an
- * optional attribute name containing an override.
- *
- * @param digester The associated Digester
- * @param className Java class name of the object to be created
- * @param attributeName Attribute name which, if present, contains an
- * override of the class name to create
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #ObjectCreateRule(String className, String attributeName)} instead.
- */
- public ObjectCreateRule(Digester digester, String className,
- String attributeName) {
-
- this (className, attributeName);
-
- }
-
-
- /**
- * Construct an object create rule with the specified class and an
- * optional attribute name containing an override.
- *
- * @param digester The associated Digester
- * @param attributeName Attribute name which, if present, contains an
- * @param clazz Java class name of the object to be created
- * override of the class name to create
- *
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method.
- * Use {@link #ObjectCreateRule(String attributeName, Class clazz)} instead.
- */
- public ObjectCreateRule(Digester digester,
- String attributeName,
- Class<?> clazz) {
-
- this(attributeName, clazz);
-
- }
-
- /**
- * Construct an object create rule with the specified class name.
- *
* @param className Java class name of the object to be created
*/
public ObjectCreateRule(String className) {
/**
* Process the beginning of this element.
*
- * @param attributes The attribute list of this element
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
+ * @param attributes The attribute list for this element
*/
- public void begin(Attributes attributes) throws Exception {
+ public void begin(String namespace, String name, Attributes attributes)
+ throws Exception {
// Identify the name of the class to instantiate
String realClassName = className;
/**
* Process the end of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
*/
- public void end() throws Exception {
+ public void end(String namespace, String name) throws Exception {
Object top = digester.pop();
if (digester.log.isDebugEnabled()) {
/**
- * Constructor sets the associated Digester.
- *
- * @param digester The digester with which this rule is associated
- * @deprecated The digester instance is now set in the {@link Digester#addRule} method. Use {@link #Rule()} instead.
- */
- public Rule(Digester digester) {
-
- super();
- setDigester(digester);
-
- }
-
- /**
* <p>Base constructor.
* Now the digester will be set when the rule is added.</p>
*/
* in the order originally registered through the <code>add()</code>
* method.
*
- * @param pattern Nesting pattern to be matched
- *
- * @deprecated Call match(namespaceURI,pattern) instead.
- */
- public List<Rule> match(String pattern);
-
-
- /**
- * Return a List of all registered Rule instances that match the specified
- * nesting pattern, or a zero-length List if there are no matches. If more
- * than one Rule instance matches, they <strong>must</strong> be returned
- * in the order originally registered through the <code>add()</code>
- * method.
- *
* @param namespaceURI Namespace URI for which to select matching rules,
* or <code>null</code> to match regardless of namespace URI
* @param pattern Nesting pattern to be matched
/**
* Process the end of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
*/
- public void end() throws Exception {
+ public void end(String namespace, String name) throws Exception {
// Identify the objects to be used
Object child = digester.peek(0);
/**
* Process the beginning of this element.
*
- * @param attributes The attribute list of this element
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
+ * @param attributes The attribute list for this element
*/
- public void begin(Attributes attributes) throws Exception {
+ public void begin(String namespace, String theName, Attributes attributes)
+ throws Exception {
// Populate the corresponding properties of the top object
Object top = digester.peek();
/**
* Process the beginning of this element.
*
- * @param attributes The attribute list of this element
- *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
+ * @param attributes The attribute list for this element
+ *
* @exception NoSuchMethodException if the bean does not
* have a writeable property of the specified name
*/
- public void begin(Attributes attributes) throws Exception {
+ public void begin(String namespace, String theName, Attributes attributes)
+ throws Exception {
// Identify the actual property name and value to be used
String actualName = null;
/**
* Process the end of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
*/
- public void end() throws Exception {
+ public void end(String namespace, String name) throws Exception {
// Identify the objects to be used
Object child = digester.peek(0);
/**
* Process the end of this element.
+ *
+ * @param namespace the namespace URI of the matching element, or an
+ * empty string if the parser is not namespace aware or the element has
+ * no namespace
+ * @param name the local name if the parser is namespace aware, or just
+ * the element name otherwise
*/
- public void end() throws Exception {
+ public void end(String namespace, String name) throws Exception {
// Identify the objects to be used
Object child = digester.peek(0);
// --------------------------------------------------------- Public Methods
- public List<Rule> match(String pattern) {
- return match("", pattern);
- }
-
/**
* Return list of rules matching given pattern.
* If wrapped implementation returns any matches return those.
<changelog>
<fix>
Numerous code clean-up changes including the use of generics and
- removing unused imports, fields, parameters and methods.
+ removing unused imports, fields, parameters and methods. (markt)
+ </fix>
+ <fix>
+ All deprecated internal code has been removed. <b>Warning:</b> If you
+ have custom components for a previous Tomcat version that extend
+ internal Tomcat classes and override deprecated methods it is highly
+ likely that they will no longer work. (markt)
</fix>
<update>
Parameterize version number throughout build scripts and source. (rjung)