You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2001/11/02 22:08:57 UTC

cvs commit: xml-xalan/test/java/src/org/apache/qetest/xslwrapper TransformWrapper.java TransformWrapperHelper.java

curcuru     01/11/02 13:08:57

  Modified:    test/java/src/org/apache/qetest/xslwrapper
                        TransformWrapper.java TransformWrapperHelper.java
  Log:
  Switch to implementing Configurable instead of doing set/getAttribute on our own
  
  Revision  Changes    Path
  1.3       +3 -61     xml-xalan/test/java/src/org/apache/qetest/xslwrapper/TransformWrapper.java
  
  Index: TransformWrapper.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xslwrapper/TransformWrapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransformWrapper.java	2001/06/25 14:35:20	1.2
  +++ TransformWrapper.java	2001/11/02 21:08:57	1.3
  @@ -56,6 +56,7 @@
    */
   package org.apache.qetest.xslwrapper;
   
  +import org.apache.qetest.Configurable;
   import java.util.Hashtable;
   import java.util.Properties;
   
  @@ -84,9 +85,9 @@
    * while updating to this new class.
    * 
    * @author Shane Curcuru
  - * @version $Id: TransformWrapper.java,v 1.2 2001/06/25 14:35:20 curcuru Exp $
  + * @version $Id: TransformWrapper.java,v 1.3 2001/11/02 21:08:57 curcuru Exp $
    */
  -public interface TransformWrapper
  +public interface TransformWrapper extends Configurable
   {
   
       /**
  @@ -263,15 +264,6 @@
   
   
       /**
  -     * Get a general description of this wrapper itself.
  -     *
  -     * @return a general description of this wrapper: roughly how 
  -     * it performs transforms (stream/SAX/DOM/etc) and what it times
  -     */
  -    public String getDescription();
  -
  -
  -    /**
        * Get a specific description of the wrappered processor.  
        *
        * @return specific description of the underlying processor or 
  @@ -302,56 +294,6 @@
        * by the actual implementation
        */
       public Object newProcessor(Hashtable options) throws Exception;
  -
  -
  -    /**
  -     * Allows the user to ask the wrapper to set specific 
  -     * attributes on the underlying implementation.  
  -     *
  -     * Attribute names that are recognized by the wrapper will 
  -     * be re-mapped to the appropriate API calls to the underlying 
  -     * processor.  Attribute names that are not recognized by the 
  -     * wrapper will be set directly into the underlying processor 
  -     * where the processor supports a similar setAttribute API.
  -     *
  -     * //@todo define behavior when the underlying processor throws 
  -     * an exception that's not an IllegalArgumentException.
  -     *
  -     * @param name The name of the attribute.
  -     * @param value The value of the attribute.
  -     * @throws IllegalArgumentException thrown if the underlying
  -     * implementation doesn't recognize the attribute.
  -     * 
  -     * @see #ATTRIBUTE_INDENT
  -     * @see #ATTRIBUTE_DIAGNOSTICS
  -     */
  -    public void setAttribute(String name, Object value)
  -        throws IllegalArgumentException;
  -
  -
  -    /**
  -     * Allows the user to retrieve specific attributes on the 
  -     * underlying implementation.  
  -     * 
  -     * Attribute names that are recognized by the wrapper will 
  -     * be re-mapped to the appropriate API calls to the underlying 
  -     * processor, or will simply return internal state values.  
  -     * Attribute names that are not recognized by the 
  -     * wrapper will be set directly into the underlying processor 
  -     * where the processor supports a similar getAttribute API.
  -     *
  -     * //@todo define behavior when the underlying processor throws 
  -     * an exception that's not an IllegalArgumentException.
  -     *
  -     * @param name The name of the attribute.
  -     * @return value The value of the attribute.
  -     * @throws IllegalArgumentException thrown if the underlying
  -     * implementation doesn't recognize the attribute.
  -     * 
  -     * @see #ATTRIBUTE_INDENT
  -     * @see #ATTRIBUTE_DIAGNOSTICS
  -     */
  -    public Object getAttribute(String name) throws IllegalArgumentException;
   
   
       /**
  
  
  
  1.2       +25 -1     xml-xalan/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperHelper.java
  
  Index: TransformWrapperHelper.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xslwrapper/TransformWrapperHelper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TransformWrapperHelper.java	2001/03/16 16:59:44	1.1
  +++ TransformWrapperHelper.java	2001/11/02 21:08:57	1.2
  @@ -58,6 +58,7 @@
   
   import java.util.Enumeration;
   import java.util.Hashtable;
  +import java.util.Properties;
   
   /**
    * A few default implementations of TransformWrapper methods.  
  @@ -68,7 +69,7 @@
    * free to extend this class to get some free code.
    * 
    * @author Shane Curcuru
  - * @version $Id: TransformWrapperHelper.java,v 1.1 2001/03/16 16:59:44 curcuru Exp $
  + * @version $Id: TransformWrapperHelper.java,v 1.2 2001/11/02 21:08:57 curcuru Exp $
    */
   public abstract class TransformWrapperHelper implements TransformWrapper
   {
  @@ -119,6 +120,29 @@
                   throw new IllegalArgumentException("setAttribute: bad value: " + value);
               }
           }
  +    }
  +
  +
  +    /**
  +     * Allows the user to set specific attributes on the testing 
  +     * utility or it's underlying product object under test.
  +     * 
  +     * This method should attempt to set any applicable attributes 
  +     * found in the given attrs onto itself, and will ignore any and 
  +     * all attributes it does not recognize.  It should never 
  +     * throw exceptions.  This method may overwrite any previous 
  +     * attributes that were set.  Currently since this takes a 
  +     * Properties block you may only be able to set objects that 
  +     * are Strings, although individual implementations may 
  +     * attempt to use Hashtable.get() on only the local part.
  +     * 
  +     * Currently unimplemented; no-op.
  +     *
  +     * @param attrs Props of various name, value attrs.
  +     */
  +    public void applyAttributes(Properties attrs)
  +    {
  +        /* no-op */;
       }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org