commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators ByteLengthTag.java CookieTag.java MaxResponseTimeTag.java RegexpTag.java ResponseHeaderTag.java StatusCodeTag.java StatusTextTag.java ValidatorTag.java
Date Sun, 14 Jul 2002 12:38:23 GMT
dion        2002/07/14 05:38:23

  Modified:    latka/src/java/org/apache/commons/latka/jelly BodyTag.java
                        DeleteTag.java GetTag.java HeadTag.java
                        HeaderTag.java OptionsTag.java ParameterTag.java
                        PostTag.java PutTag.java README.html
                        SessionTag.java
               latka/src/java/org/apache/commons/latka/jelly/validators
                        ByteLengthTag.java CookieTag.java
                        MaxResponseTimeTag.java RegexpTag.java
                        ResponseHeaderTag.java StatusCodeTag.java
                        StatusTextTag.java
  Removed:     latka/src/java/org/apache/commons/latka/jelly HttpTag.java
                        LatkaTag.java LatkaTagLibrary.java SuiteTag.java
               latka/src/java/org/apache/commons/latka/jelly/validators
                        ValidatorTag.java
  Log:
  Rework of tag library to fit in with jelly norms
  
  Revision  Changes    Path
  1.2       +8 -7      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/BodyTag.java
  
  Index: BodyTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/BodyTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BodyTag.java	7 Jul 2002 17:23:24 -0000	1.1
  +++ BodyTag.java	14 Jul 2002 12:38:22 -0000	1.2
  @@ -64,6 +64,7 @@
   import org.apache.commons.httpclient.HttpUrlMethod;
   import org.apache.commons.httpclient.methods.UrlPostMethod;
   import org.apache.commons.httpclient.methods.UrlPutMethod;
  +import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
   
   /**
  @@ -72,7 +73,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class BodyTag extends LatkaTag {
  +public class BodyTag extends TagSupport {
       
       /** Creates a new instance of BodyTag */
       public BodyTag() {
  @@ -87,10 +88,10 @@
        * @throws Exception when any error occurs
        */
       public void doTag(XMLOutput xmlOutput) throws Exception {
  -        HttpTag httpTag = (HttpTag) findAncestorWithClass(HttpTag.class);
  +        HttpTagSupport httpTag = (HttpTagSupport) findAncestorWithClass(
  +            HttpTagSupport.class);
           HttpUrlMethod httpMethod = httpTag.getHttpUrlMethod();
           String bodyText = getBodyText();
  -        System.err.println("Body text is: " + bodyText);
           if (httpMethod instanceof UrlPostMethod) {
               UrlPostMethod postMethod = (UrlPostMethod) httpMethod;
               postMethod.setRequestBody(bodyText);
  
  
  
  1.2       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/DeleteTag.java
  
  Index: DeleteTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/DeleteTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeleteTag.java	7 Jul 2002 14:46:59 -0000	1.1
  +++ DeleteTag.java	14 Jul 2002 12:38:22 -0000	1.2
  @@ -72,7 +72,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class DeleteTag extends HttpTag {
  +public class DeleteTag extends HttpTagSupport {
       
       /** the delete method */
       private UrlDeleteMethod _deleteMethod;
  
  
  
  1.3       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/GetTag.java
  
  Index: GetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/GetTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetTag.java	6 Jul 2002 14:32:03 -0000	1.2
  +++ GetTag.java	14 Jul 2002 12:38:22 -0000	1.3
  @@ -72,7 +72,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class GetTag extends HttpTag {
  +public class GetTag extends HttpTagSupport {
       
       /** the get method */
       private UrlGetMethod _getMethod;
  
  
  
  1.2       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/HeadTag.java
  
  Index: HeadTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/HeadTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HeadTag.java	7 Jul 2002 14:53:06 -0000	1.1
  +++ HeadTag.java	14 Jul 2002 12:38:22 -0000	1.2
  @@ -72,7 +72,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class HeadTag extends HttpTag {
  +public class HeadTag extends HttpTagSupport {
       
       /** the head method */
       private UrlHeadMethod _headMethod;
  
  
  
  1.3       +8 -6      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/HeaderTag.java
  
  Index: HeaderTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/HeaderTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HeaderTag.java	9 Jul 2002 17:43:02 -0000	1.2
  +++ HeaderTag.java	14 Jul 2002 12:38:22 -0000	1.3
  @@ -61,6 +61,7 @@
   
   package org.apache.commons.latka.jelly;
   
  +import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
   
   /**
  @@ -69,7 +70,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class HeaderTag extends LatkaTag {
  +public class HeaderTag extends TagSupport {
       /** parameter name */
       private String _name;
       /** parameter value */
  @@ -86,7 +87,8 @@
        * @throws Exception when an error occurs
        */
       public void doTag(XMLOutput xmlOutput) throws Exception {
  -        HttpTag http = (HttpTag) findAncestorWithClass(HttpTag.class);
  +        HttpTagSupport http = (HttpTagSupport) findAncestorWithClass(
  +            HttpTagSupport.class);
           http.addRequestHeader(getName(), getValue());
           invokeBody(xmlOutput);
       }
  
  
  
  1.2       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/OptionsTag.java
  
  Index: OptionsTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/OptionsTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OptionsTag.java	7 Jul 2002 15:06:49 -0000	1.1
  +++ OptionsTag.java	14 Jul 2002 12:38:22 -0000	1.2
  @@ -72,7 +72,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class OptionsTag extends HttpTag {
  +public class OptionsTag extends HttpTagSupport {
       
       /** the options method */
       private UrlOptionsMethod _optionsMethod;
  
  
  
  1.3       +8 -6      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/ParameterTag.java
  
  Index: ParameterTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/ParameterTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParameterTag.java	9 Jul 2002 17:43:02 -0000	1.2
  +++ ParameterTag.java	14 Jul 2002 12:38:22 -0000	1.3
  @@ -61,6 +61,7 @@
   
   package org.apache.commons.latka.jelly;
   
  +import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
   
   /**
  @@ -69,7 +70,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class ParameterTag extends LatkaTag {
  +public class ParameterTag extends TagSupport {
       /** parameter name */
       private String _name;
       /** parameter value */
  @@ -86,7 +87,8 @@
        * @throws Exception when an error occurs
        */
       public void doTag(XMLOutput xmlOutput) throws Exception {
  -        HttpTag http = (HttpTag) findAncestorWithClass(HttpTag.class);
  +        HttpTagSupport http = (HttpTagSupport) findAncestorWithClass(
  +            HttpTagSupport.class);
           http.addParameter(getName(), getValue());
           invokeBody(xmlOutput);
       }
  
  
  
  1.3       +4 -4      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/PostTag.java
  
  Index: PostTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/PostTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PostTag.java	9 Jul 2002 17:43:02 -0000	1.2
  +++ PostTag.java	14 Jul 2002 12:38:22 -0000	1.3
  @@ -72,7 +72,7 @@
    *
    * @author  dion
    */
  -public class PostTag extends HttpTag {
  +public class PostTag extends HttpTagSupport {
       
       /** the post method */
       private UrlPostMethod _postMethod;
  
  
  
  1.3       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/PutTag.java
  
  Index: PutTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/PutTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PutTag.java	9 Jul 2002 17:43:02 -0000	1.2
  +++ PutTag.java	14 Jul 2002 12:38:22 -0000	1.3
  @@ -72,7 +72,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class PutTag extends HttpTag {
  +public class PutTag extends HttpTagSupport {
       
       /** the put method */
       private UrlPutMethod _putMethod;
  
  
  
  1.3       +1 -1      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/README.html
  
  Index: README.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/README.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- README.html	30 Jun 2002 15:24:43 -0000	1.2
  +++ README.html	14 Jul 2002 12:38:22 -0000	1.3
  @@ -5,7 +5,7 @@
       <TITLE></TITLE>
     </HEAD>
     <BODY>
  -    <h1>Jelly-Latka implementation</h1>
  +    <H1>Jelly-Latka implementation</H1>
   
       <h2>Unresolved issues</h2>
       <p>Is it up to the tag to 'evaluate' it's body - Yes (invokeBody)</p>
  
  
  
  1.8       +6 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/SessionTag.java
  
  Index: SessionTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/SessionTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SessionTag.java	12 Jul 2002 04:04:42 -0000	1.7
  +++ SessionTag.java	14 Jul 2002 12:38:22 -0000	1.8
  @@ -62,8 +62,9 @@
   package org.apache.commons.latka.jelly;
   
   import org.apache.commons.httpclient.HttpMultiClient;
  -import org.apache.commons.latka.http.Proxy;
  +import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
  +import org.apache.commons.latka.http.Proxy;
   
   /**
    * A http session. This is the container for data shared across requests
  @@ -71,7 +72,7 @@
    *
    * @author dion
    */
  -public class SessionTag extends LatkaTag {
  +public class SessionTag extends TagSupport {
       
       /** default host for requests */
       private String _host;
  
  
  
  1.3       +4 -4      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/ByteLengthTag.java
  
  Index: ByteLengthTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/ByteLengthTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ByteLengthTag.java	9 Jul 2002 17:22:39 -0000	1.2
  +++ ByteLengthTag.java	14 Jul 2002 12:38:22 -0000	1.3
  @@ -68,7 +68,7 @@
    *
    * @author  dion
    */
  -public class ByteLengthTag extends ValidatorTag {
  +public class ByteLengthTag extends HttpValidatorTagSupport {
       
       /** Constant to mean no max specified */
       private static final int NO_MAX = -1;
  
  
  
  1.3       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/CookieTag.java
  
  Index: CookieTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/CookieTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CookieTag.java	9 Jul 2002 17:43:02 -0000	1.2
  +++ CookieTag.java	14 Jul 2002 12:38:22 -0000	1.3
  @@ -72,7 +72,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class CookieTag extends ValidatorTag {
  +public class CookieTag extends HttpValidatorTagSupport {
       
       /** name of the cookie */
       private String _name;
  
  
  
  1.3       +6 -6      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/MaxResponseTimeTag.java
  
  Index: MaxResponseTimeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/MaxResponseTimeTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MaxResponseTimeTag.java	11 Jul 2002 12:30:59 -0000	1.2
  +++ MaxResponseTimeTag.java	14 Jul 2002 12:38:22 -0000	1.3
  @@ -70,7 +70,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class MaxResponseTimeTag extends ValidatorTag {
  +public class MaxResponseTimeTag extends HttpValidatorTagSupport {
       
       /** maximum time for a request */
       private int _limit = 30000; // 30 seconds
  @@ -87,7 +87,7 @@
        */
       public void doTag(XMLOutput xmlOutput) throws Exception {
           super.doTag(xmlOutput);
  -        String varName = getRequestId() + ".responseTime";
  +        String varName = getVar() + ".responseTime";
           String responseTime = (String) getContext().getVariable(varName);
           if (responseTime != null) {
               long time = Integer.parseInt(responseTime);
  
  
  
  1.2       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/RegexpTag.java
  
  Index: RegexpTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/RegexpTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RegexpTag.java	11 Jul 2002 14:15:49 -0000	1.1
  +++ RegexpTag.java	14 Jul 2002 12:38:22 -0000	1.2
  @@ -72,7 +72,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class RegexpTag extends ValidatorTag {
  +public class RegexpTag extends HttpValidatorTagSupport {
       
       /** the regular expression pattern to match with */
       private String _pattern;
  
  
  
  1.2       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/ResponseHeaderTag.java
  
  Index: ResponseHeaderTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/ResponseHeaderTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResponseHeaderTag.java	13 Jul 2002 02:15:52 -0000	1.1
  +++ ResponseHeaderTag.java	14 Jul 2002 12:38:22 -0000	1.2
  @@ -71,7 +71,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class ResponseHeaderTag extends ValidatorTag {
  +public class ResponseHeaderTag extends HttpValidatorTagSupport {
       
       /** name of the cookie */
       private String _name;
  
  
  
  1.3       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/StatusCodeTag.java
  
  Index: StatusCodeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/StatusCodeTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StatusCodeTag.java	13 Jul 2002 07:18:58 -0000	1.2
  +++ StatusCodeTag.java	14 Jul 2002 12:38:22 -0000	1.3
  @@ -71,7 +71,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class StatusCodeTag extends ValidatorTag {
  +public class StatusCodeTag extends HttpValidatorTagSupport {
       
       /** status code to check against - defaults to OK */
       private int _value = HttpStatus.SC_OK;
  
  
  
  1.2       +5 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/StatusTextTag.java
  
  Index: StatusTextTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/jelly/validators/StatusTextTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StatusTextTag.java	13 Jul 2002 08:01:33 -0000	1.1
  +++ StatusTextTag.java	14 Jul 2002 12:38:22 -0000	1.2
  @@ -71,7 +71,7 @@
    * @author  dion
    * @version $Id$
    */
  -public class StatusTextTag extends ValidatorTag {
  +public class StatusTextTag extends HttpValidatorTagSupport {
       
       /** value to check against */
       private String _value;
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message