You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by mp...@apache.org on 2003/11/12 20:37:08 UTC

cvs commit: jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake Intake.java

mpoeschl    2003/11/12 11:37:08

  Modified:    .        Tag: PRE_AVALON_BRANCH turbine-schema.xml
                        project.xml project.properties maven.xml build.xml
               src/java/org/apache/fulcrum/schedule Tag: PRE_AVALON_BRANCH
                        JobEntry.java
               src/java/org/apache/fulcrum/intake/model Tag:
                        PRE_AVALON_BRANCH IntegerField.java
                        FieldFactory.java
               src/java/org/apache/fulcrum/template Tag: PRE_AVALON_BRANCH
                        TemplateEmail.java
               src/java/org/apache/fulcrum/intake Tag: PRE_AVALON_BRANCH
                        Intake.java
  Added:       src/java/org/apache/fulcrum/intake/model Tag:
                        PRE_AVALON_BRANCH LongField.java
               src/java/org/apache/fulcrum/intake/validator Tag:
                        PRE_AVALON_BRANCH LongValidator.java
  Log:
  sync with version from scarab
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.1   +2 -2      jakarta-turbine-fulcrum/Attic/turbine-schema.xml
  
  Index: turbine-schema.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/Attic/turbine-schema.xml,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- turbine-schema.xml	13 Nov 2001 05:35:43 -0000	1.2
  +++ turbine-schema.xml	12 Nov 2003 19:37:07 -0000	1.2.2.1
  @@ -16,7 +16,7 @@
   <!-- @version $Id$     -->
   <!-- ==================================================================== -->
   
  -<database name="@DATABASE_DEFAULT@">
  +<database name="@DATABASE_DEFAULT@" defaultJavaType="@DATABASE_JAVATYPE@">
     
     <table name="TURBINE_PERMISSION" idMethod="idbroker">
       <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER"/>
  
  
  
  1.52.2.1  +6 -13     jakarta-turbine-fulcrum/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/project.xml,v
  retrieving revision 1.52
  retrieving revision 1.52.2.1
  diff -u -r1.52 -r1.52.2.1
  --- project.xml	16 Oct 2002 11:51:26 -0000	1.52
  +++ project.xml	12 Nov 2003 19:37:07 -0000	1.52.2.1
  @@ -124,7 +124,7 @@
       </dependency>
       <dependency>
         <id>commons-lang</id>
  -      <version>1.0</version>
  +      <version>2.0-dev</version>
         <url>http://jakarta.apache.org/commons/</url>
       </dependency>
       <dependency>
  @@ -159,7 +159,7 @@
       </dependency>
       <dependency>
         <id>junit</id>
  -      <version>3.8.1</version>
  +      <version>3.7</version>
       </dependency>
       <dependency>
         <id>log4j</id>
  @@ -167,7 +167,7 @@
       </dependency>
       <dependency>
         <id>javamail</id>
  -      <version>1.2</version>
  +      <version>1.3</version>
         <url>http://java.sun.com/products/javamail/</url>
       </dependency>
       <dependency>
  @@ -186,7 +186,7 @@
       </dependency>
       <dependency>
         <id>torque</id>
  -      <version>SNAPSHOT</version>
  +      <version>3.0</version>
         <url>http://jakarta.apache.org/turbine/torque/</url>
       </dependency>
       <dependency>
  @@ -210,15 +210,8 @@
       </dependency>
       <dependency>
         <id>xerces</id>
  -      <type>required</type>
  -      <version>2.0.2</version>
  -      <jar>xercesImpl-2.0.2.jar</jar>
  -      <url>http://xml.apache.org/xerces2-j/index.html</url>
  -    </dependency>
  -    <dependency>
  -      <id>xml-apis</id>
  -      <type>required</type>
  -      <version>2.0.2</version>
  +      <version>1.4.4</version>
  +      <jar>xerces-1.4.4.jar</jar>
         <url>http://xml.apache.org/xerces2-j/index.html</url>
       </dependency>
       <dependency>
  
  
  
  1.5.2.1   +5 -3      jakarta-turbine-fulcrum/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/project.properties,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- project.properties	27 Sep 2002 05:31:24 -0000	1.5
  +++ project.properties	12 Nov 2003 19:37:07 -0000	1.5.2.1
  @@ -31,8 +31,9 @@
   addGetByNameMethod=true
   complexObjectModel=true
   addIntakeRetrievable=true
  +retrievableInterface=org.apache.fulcrum.intake.Retrievable
   basePrefix=Base
  -torque.saveException = Exception
  +saveException = Exception
   
   schemaDirectory=.
   
  @@ -50,6 +51,7 @@
   
   securityPackage=org.apache.fulcrum.security.impl.db.entity
   schedulerPackage=org.apache.fulcrum.schedule
  -security.database.name = default
  -scheduler.database.name = default
  +security.database.name = scarab
  +security.database.javatype = object
  +scheduler.database.name = scarab
   security.extra.user.columns=
  
  
  
  1.7.2.1   +1 -0      jakarta-turbine-fulcrum/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/maven.xml,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- maven.xml	11 Oct 2002 03:52:44 -0000	1.7
  +++ maven.xml	12 Nov 2003 19:37:07 -0000	1.7.2.1
  @@ -86,6 +86,7 @@
   </echo>
   
       <filter token="DATABASE_DEFAULT" value="${security.database.name}"/>
  +    <filter token="DATABASE_JAVATYPE" value="${security.database.javatype}"/>
       <!-- is there a way to load this from an xml file? -->
       <filter token="EXTRA_USER_COLUMNS" value="${security.extra.user.columns}"/>
       <copy
  
  
  
  1.57.2.1  +2 -0      jakarta-turbine-fulcrum/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/build.xml,v
  retrieving revision 1.57
  retrieving revision 1.57.2.1
  diff -u -r1.57 -r1.57.2.1
  --- build.xml	1 Aug 2002 16:48:21 -0000	1.57
  +++ build.xml	12 Nov 2003 19:37:07 -0000	1.57.2.1
  @@ -176,8 +176,10 @@
     <target
       name="security-om"
       depends="init">
  +<echo message="asd;lkfja;sldkfjasdlkfja;sdflkja;lskdjf"/>
   
       <filter token="DATABASE_DEFAULT" value="${security.database.name}"/>
  +    <filter token="DATABASE_JAVATYPE" value="${security.database.javatype}"/>
       <!-- is there a way to load this from an xml file? -->
       <filter token="EXTRA_USER_COLUMNS" value="${security.extra.user.columns}"/>
       <copy
  
  
  
  No                   revision
  No                   revision
  1.1.1.1.2.1 +2 -4      jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/schedule/JobEntry.java
  
  Index: JobEntry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/schedule/JobEntry.java,v
  retrieving revision 1.1.1.1
  retrieving revision 1.1.1.1.2.1
  diff -u -r1.1.1.1 -r1.1.1.1.2.1
  --- JobEntry.java	30 May 2002 02:27:27 -0000	1.1.1.1
  +++ JobEntry.java	12 Nov 2003 19:37:07 -0000	1.1.1.1.2.1
  @@ -155,9 +155,7 @@
           int result = -1;
           if (je instanceof JobEntry)
           {
  -            result = getJobId().getBigDecimal()
  -            .compareTo(
  -                ((JobEntry)je).getJobId().getBigDecimal());
  +            result = new Integer(getJobId()).compareTo( new Integer(((JobEntry)je).getJobId()) );
           }
           return result;
       }
  
  
  
  No                   revision
  No                   revision
  1.2.2.1   +21 -6     jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/model/IntegerField.java
  
  Index: IntegerField.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/model/IntegerField.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- IntegerField.java	1 Aug 2002 17:04:11 -0000	1.2
  +++ IntegerField.java	12 Nov 2003 19:37:08 -0000	1.2.2.1
  @@ -120,15 +120,30 @@
           if ( isMultiValued  )
           {
               String[] ss = pp.getStrings(getKey());
  -            int[] ival = new int[ss.length];
  -            for (int i=0; i<ss.length; i++)
  +            try 
  +            {            
  +                Integer[] values = new Integer[ss.length];
  +                for (int i=0; i<ss.length; i++)
  +                {
  +                    if (ss[i] != null && ss[i].length() > 0) 
  +                    {
  +                        values[i] = new Integer(ss[i]);
  +                    }
  +                }
  +                setTestValue(values);
  +            }
  +            catch (ClassCastException e)
               {
  -                if (ss[i] != null && ss[i].length() > 0) 
  +                int[] ival = new int[ss.length];
  +                for (int i=0; i<ss.length; i++)
                   {
  -                    ival[i] = Integer.parseInt(ss[i]);
  +                    if (ss[i] != null && ss[i].length() > 0) 
  +                    {
  +                        ival[i] = Integer.parseInt(ss[i]);
  +                    }
                   }
  +                setTestValue(ival);
               }
  -            setTestValue(ival);
           }
           else
           {
  
  
  
  1.1.1.1.2.1 +10 -1     jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/model/FieldFactory.java
  
  Index: FieldFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/model/FieldFactory.java,v
  retrieving revision 1.1.1.1
  retrieving revision 1.1.1.1.2.1
  diff -u -r1.1.1.1 -r1.1.1.1.2.1
  --- FieldFactory.java	30 May 2002 02:27:18 -0000	1.1.1.1
  +++ FieldFactory.java	12 Nov 2003 19:37:08 -0000	1.1.1.1.2.1
  @@ -100,6 +100,15 @@
                   }
               }
                          );
  +        fieldCtors.put("long", new FieldFactory.FieldCtor()
  +            {
  +                public Field getInstance(XmlField f, Group g)
  +                    throws Exception
  +                {
  +                    return new LongField(f, g);
  +                }
  +            }
  +                       );
           fieldCtors.put("BigDecimal", new FieldFactory.FieldCtor()
               {
                   public Field getInstance(XmlField f, Group g)
  
  
  
  No                   revision
  
  Index: FieldFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/model/FieldFactory.java,v
  retrieving revision 1.1.1.1
  retrieving revision 1.1.1.1.2.1
  diff -u -r1.1.1.1 -r1.1.1.1.2.1
  --- FieldFactory.java	30 May 2002 02:27:18 -0000	1.1.1.1
  +++ FieldFactory.java	12 Nov 2003 19:37:08 -0000	1.1.1.1.2.1
  @@ -100,6 +100,15 @@
                   }
               }
                          );
  +        fieldCtors.put("long", new FieldFactory.FieldCtor()
  +            {
  +                public Field getInstance(XmlField f, Group g)
  +                    throws Exception
  +                {
  +                    return new LongField(f, g);
  +                }
  +            }
  +                       );
           fieldCtors.put("BigDecimal", new FieldFactory.FieldCtor()
               {
                   public Field getInstance(XmlField f, Group g)
  
  
  
  No                   revision
  
  Index: FieldFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/model/FieldFactory.java,v
  retrieving revision 1.1.1.1
  retrieving revision 1.1.1.1.2.1
  diff -u -r1.1.1.1 -r1.1.1.1.2.1
  --- FieldFactory.java	30 May 2002 02:27:18 -0000	1.1.1.1
  +++ FieldFactory.java	12 Nov 2003 19:37:08 -0000	1.1.1.1.2.1
  @@ -100,6 +100,15 @@
                   }
               }
                          );
  +        fieldCtors.put("long", new FieldFactory.FieldCtor()
  +            {
  +                public Field getInstance(XmlField f, Group g)
  +                    throws Exception
  +                {
  +                    return new LongField(f, g);
  +                }
  +            }
  +                       );
           fieldCtors.put("BigDecimal", new FieldFactory.FieldCtor()
               {
                   public Field getInstance(XmlField f, Group g)
  
  
  
  1.1.2.1   +161 -0    jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/model/Attic/LongField.java
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +199 -0    jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/validator/Attic/LongValidator.java
  
  
  
  
  No                   revision
  No                   revision
  1.4.2.1   +110 -47   jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/template/TemplateEmail.java
  
  Index: TemplateEmail.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/template/TemplateEmail.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- TemplateEmail.java	17 Sep 2002 22:44:10 -0000	1.4
  +++ TemplateEmail.java	12 Nov 2003 19:37:08 -0000	1.4.2.1
  @@ -61,7 +61,8 @@
   import javax.mail.internet.InternetAddress;
   import org.apache.commons.mail.SimpleEmail;
   import org.apache.commons.lang.StringUtils;
  -import org.apache.commons.util.WordWrapper;
  +import org.apache.commons.lang.WordWrapUtils;
  +import org.apache.fulcrum.ServiceException;
   
   /**
    * This is a simple class for sending email from within the TemplateService.
  @@ -164,6 +165,8 @@
       /** The cc list. */
       private List replyToList = null;
   
  +    private List headersList;
  +
       /** The column to word-wrap at.  <code>0</code> indicates no wrap. */
       private int wordWrap = 0;
   
  @@ -199,6 +202,76 @@
           this.context = context;
       }
   
  +    public String getCharSet()
  +    {
  +        return charset;
  +    }
  +
  +    public String getTemplate()
  +    {
  +        return template;
  +    }
  +
  +    public int getWordWrap()
  +    {
  +        return wordWrap;
  +    }
  +
  +    public List getToList()
  +    {
  +        return toList == null ? toList = new ArrayList() : toList;
  +    }
  +
  +    public void setToList(List v)
  +    {
  +        toList = v;
  +    }
  +
  +    public List getCCList()
  +    {
  +        return ccList == null ? ccList = new ArrayList() : ccList;
  +    }
  +
  +    public List getReplyToList()
  +    {
  +        return replyToList == null ? replyToList = new ArrayList(3) : replyToList;
  +    }
  +
  +    public List getHeadersList()
  +    {
  +        return headersList == null ? headersList = new ArrayList(3) : headersList;
  +    }
  +
  +    public String getToName()
  +    {
  +        return toName;
  +    }
  +
  +    public String getToEmail()
  +    {
  +        return toEmail;
  +    }
  +
  +    public String getFromName()
  +    {
  +        return fromName;
  +    }
  +
  +    public String getFromEmail()
  +    {
  +        return fromEmail;
  +    }
  +
  +    public String getCCName()
  +    {
  +        return ccName;
  +    }
  +
  +    public String getCCEmail()
  +    {
  +        return ccEmail;
  +    }
  +
       /** Add a recipient TO to the email.
        *
        * @param email A String.
  @@ -214,12 +287,7 @@
                   name = email;
               }
   
  -            if (toList == null)
  -            {
  -                toList = new ArrayList();
  -            }
  -
  -            toList.add(new InternetAddress(email, name));
  +            getToList().add(new InternetAddress(email, name));
           }
           catch (Exception e)
           {
  @@ -243,12 +311,7 @@
                   name = email;
               }
   
  -            if (ccList == null)
  -            {
  -                ccList = new ArrayList();
  -            }
  -
  -            ccList.add(new InternetAddress(email, name));
  +            getCCList().add(new InternetAddress(email, name));
           }
           catch (Exception e)
           {
  @@ -327,28 +390,24 @@
           String[] emailName = new String[2];
           emailName[0] = email;
           emailName[1] = name;
  -        if (replyToList == null) 
  -        {
  -            replyToList = new ArrayList(3);
  -        }        
  -        replyToList.add(emailName);
  +        getReplyToList().add(emailName);
           return this;
       }
   
  -    private List headersList;
       public TemplateEmail addHeader(String name, String value)
       {
           String[] pair = new String[2];
           pair[0] = name;
           pair[1] = value;
  -        if (headersList == null) 
  -        {
  -            headersList = new ArrayList(3);
  -        }        
  -        headersList.add(pair);
  +        getHeadersList().add(pair);
           return this;
       }
   
  +    public String getSubject()
  +    {
  +        return this.subject;
  +    }
  +
       /**
        * Subject.
        *
  @@ -429,61 +488,66 @@
       public void send()
           throws Exception
       {
  -        if (toEmail == null || toName == null)
  +        if (getToEmail() == null || getToName() == null)
           {
               throw new Exception ("Must set a To:");
           }
   
           // this method is only supposed to send to one user (additional cc:
           // users are ok.)
  -        toList = null;
  +        setToList(null);
           addTo(toEmail, toName);
           sendMultiple();
       }
   
  +    protected String handleRequest()
  +        throws ServiceException
  +    {
  +        StringWriter sw = new StringWriter();
  +        TurbineTemplate.handleRequest(getContext(),getTemplate(),sw);
  +        return sw.toString();
  +    }
  +
       /**
        * This method sends the email to multiple addresses.
        */
       public void sendMultiple()
           throws Exception
       {
  -        if (toList == null || toList.isEmpty())
  +        if (getToList() == null || getToList().isEmpty())
           {
               throw new Exception ("Must set a To:");
           }
   
           // Process the template.
  -        StringWriter sw = new StringWriter();
  -        TurbineTemplate.handleRequest(context,template, sw);
  -        String body = sw.toString();
  +        String body = handleRequest();
   
           // If the caller desires word-wrapping, do it here
  -        if (wordWrap > 0)
  +        if (getWordWrap() > 0)
           {
  -            body = WordWrapper.wrapText (body,
  +            body = WordWrapUtils.wrapText (body,
                                        System.getProperty("line.separator"),
  -                                     wordWrap);
  +                                     getWordWrap());
           }
   
           SimpleEmail se = new SimpleEmail();
  -        se.setFrom(fromEmail, fromName);
  -        se.setTo(toList);
  -        if (ccList != null && !ccList.isEmpty())
  +        se.setFrom(getFromEmail(), getFromName());
  +        se.setTo(getToList());
  +        if (getCCList() != null && !getCCList().isEmpty())
           {
  -            se.setCc(ccList);
  +            se.setCc(getCCList());
           }
           addReplyTo(se);
  -        if (charset != null) 
  +        if (getCharSet() != null) 
           {
  -            se.setCharset(charset);            
  +            se.setCharset(getCharSet());            
           }
  -        se.setSubject(subject);
  +        se.setSubject(getSubject());
           se.setMsg(body);
   
  -        if (headersList != null) 
  +        if (getHeadersList() != null) 
           {
  -            Iterator i = headersList.iterator();
  -            while (i.hasNext()) 
  +            for (Iterator i = getHeadersList().iterator();i.hasNext();) 
               {
                   String[] pair = (String[])i.next();
                   se.addHeader(pair[0], pair[1]);
  @@ -502,10 +566,9 @@
       private void addReplyTo(SimpleEmail se)
           throws Exception
       {
  -        if (replyToList != null) 
  +        if (getReplyToList() != null) 
           {
  -            Iterator i = replyToList.iterator();
  -            while (i.hasNext()) 
  +            for (Iterator i = getReplyToList().iterator();i.hasNext();) 
               {
                   String[] emailName = (String[])i.next();
                   se.addReplyTo(emailName[0], emailName[1]);
  
  
  
  No                   revision
  No                   revision
  1.1.1.1.2.1 +3 -3      jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/Intake.java
  
  Index: Intake.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/Intake.java,v
  retrieving revision 1.1.1.1
  retrieving revision 1.1.1.1.2.1
  diff -u -r1.1.1.1 -r1.1.1.1.2.1
  --- Intake.java	30 May 2002 02:27:17 -0000	1.1.1.1
  +++ Intake.java	12 Nov 2003 19:37:08 -0000	1.1.1.1.2.1
  @@ -145,7 +145,7 @@
               }
               catch(Exception e)
               {
  -                category.error(e);
  +                category.error("", e);
               }
           }
       }
  @@ -291,7 +291,7 @@
               }
               catch(Exception e)
               {
  -                category.error(e);
  +                category.error("", e);
               }
   
               return null;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: [VOTE] Add dependency on commons-http?

Posted by Martin Poeschl <mp...@marmot.at>.
Eric Pugh wrote:

>Hi all,
>
>A post on the user list from Jeff Painter made me go look at the HttpUtils
>class..  It had a bug in the date format for HTTPUtils.  And low and behold,
>it is deprecated and to be removed in 2.3.  However, it is another commons-
>jar, and in the sandbox as well[1].  Since we have plenty of dependencies on
>commons- stuff in sandbox, I don't know if it is a big deal or not.  But, I
>either want to un deprecate the code and fix it in the Turbine code base, or
>delete it, and fix the bug in the commons-http code base.
>
>This also applies to the BrowserDetector class as well.
>
>[x] Yes, delete the deprecated code and add a dependency on commons-http
>[ ] No, fix the deprecated code, and undeprecate it.
>  
>
martin



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: [VOTE RESULTS] Add dependency on commons-http?

Posted by Peter Courcoux <pe...@courcoux.biz>.
I am also concerned with lack of interest in commons components. I
submitted a patch to commons-dev in June to add support for upload
progress reporting and despite reminders and occasional 'I'll get to it
as soon as I can' responses the code has neither been accepted nor
rejected.

I'd like to see a patched version of the file-upload code in fulcrum as
an option for users.

Regards,

Peter

On Fri, 2003-11-21 at 19:31, Eric Pugh wrote:
> Hi all,
> 
> Well, the results where somewhat inconclusive..  There where 3 +1's, but two
> comments that depending on code with questionable support can be bad.  And I
> kinda want to change my vote to a -1!
> 
> I'd like to change my vote to a -1, as I know this code will NEVER EVER
> leave sandbox, and adding yet another dependency doesn't make sense.  It's
> three little classes that aren't rocket science.  I am going to fix the code
> in turbine 2.4, and I'd like someone to convince me why we should depend on
> it.  The code entered sandbox when lots of good parts of Turbine where
> pulled out (like the basis for commons-lang).
> 
> Eric
> 
> > -----Original Message-----
> > From: Stephen McConnell [mailto:mcconnell@apache.org]
> > Sent: Friday, November 14, 2003 3:59 AM
> > To: Turbine Developers List
> > Subject: Re: [VOTE] Add dependency on commons-http?
> >
> >
> >
> >
> > Scott Eade wrote:
> >
> > >
> > >> [x] Yes, delete the deprecated code and add a dependency
> > on commons-http
> > >> [ ] No, fix the deprecated code, and undeprecate it.
> > >>
> > > BUT: commons-http is not being maintained by anyone at present - it
> > > doesn't even appear on the commons components page and the
> > last commit
> > > was 7 months ago.
> > > I use commons-http in my application so as to avoid the deprecation
> > > warning from BrowserDetector, but commons-http needs to be
> > patched in
> > > order to do what I want (public access to the constants),
> > but due to
> > > the low level of attention commons-http gets my patch was
> > lost in the
> > > massive flow of traffic that is commons-dev:
> > >
> > >
> > http://nagoya.apache.org/eyebrowse/ReadMsg?listName=commons-de
> v@jakarta.apache.org&msgNo=32393
> >
> >
> > commons-http is a really small component - I agree that it should be
> > fixed and then released.  If there is not enough interest in releasing
> > it then I think it should be rolled it back into turbine.
> 
> 
> My first reaction would be to roll-it-back.  Depending on something that
> has a questionable communiy/backing is bit a good idea.
> 
> Stephen.
> 
> >
> >
> > Scott
> >
> 
> --
> 
> Stephen J. McConnell
> mailto:mcconnell@apache.org
> 
> |------------------------------------------------|
> | Magic by Merlin                                |
> | Production by Avalon                           |
> |                                                |
> | http://avalon.apache.org/merlin                |
> | http://dpml.net/                               |
> |------------------------------------------------|
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
-- 
Peter Courcoux <pe...@courcoux.biz>

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


[VOTE RESULTS] Add dependency on commons-http?

Posted by Eric Pugh <ep...@upstate.com>.
Hi all,

Well, the results where somewhat inconclusive..  There where 3 +1's, but two
comments that depending on code with questionable support can be bad.  And I
kinda want to change my vote to a -1!

I'd like to change my vote to a -1, as I know this code will NEVER EVER
leave sandbox, and adding yet another dependency doesn't make sense.  It's
three little classes that aren't rocket science.  I am going to fix the code
in turbine 2.4, and I'd like someone to convince me why we should depend on
it.  The code entered sandbox when lots of good parts of Turbine where
pulled out (like the basis for commons-lang).

Eric

> -----Original Message-----
> From: Stephen McConnell [mailto:mcconnell@apache.org]
> Sent: Friday, November 14, 2003 3:59 AM
> To: Turbine Developers List
> Subject: Re: [VOTE] Add dependency on commons-http?
>
>
>
>
> Scott Eade wrote:
>
> >
> >> [x] Yes, delete the deprecated code and add a dependency
> on commons-http
> >> [ ] No, fix the deprecated code, and undeprecate it.
> >>
> > BUT: commons-http is not being maintained by anyone at present - it
> > doesn't even appear on the commons components page and the
> last commit
> > was 7 months ago.
> > I use commons-http in my application so as to avoid the deprecation
> > warning from BrowserDetector, but commons-http needs to be
> patched in
> > order to do what I want (public access to the constants),
> but due to
> > the low level of attention commons-http gets my patch was
> lost in the
> > massive flow of traffic that is commons-dev:
> >
> >
> http://nagoya.apache.org/eyebrowse/ReadMsg?listName=commons-de
v@jakarta.apache.org&msgNo=32393
>
>
> commons-http is a really small component - I agree that it should be
> fixed and then released.  If there is not enough interest in releasing
> it then I think it should be rolled it back into turbine.


My first reaction would be to roll-it-back.  Depending on something that
has a questionable communiy/backing is bit a good idea.

Stephen.

>
>
> Scott
>

--

Stephen J. McConnell
mailto:mcconnell@apache.org

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/                               |
|------------------------------------------------|





---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: [VOTE] Add dependency on commons-http?

Posted by Stephen McConnell <mc...@apache.org>.

Scott Eade wrote:

>
>> [x] Yes, delete the deprecated code and add a dependency on commons-http
>> [ ] No, fix the deprecated code, and undeprecate it.
>>
> BUT: commons-http is not being maintained by anyone at present - it 
> doesn't even appear on the commons components page and the last commit 
> was 7 months ago.
> I use commons-http in my application so as to avoid the deprecation 
> warning from BrowserDetector, but commons-http needs to be patched in 
> order to do what I want (public access to the constants), but due to 
> the low level of attention commons-http gets my patch was lost in the 
> massive flow of traffic that is commons-dev:
>
> http://nagoya.apache.org/eyebrowse/ReadMsg?listName=commons-dev@jakarta.apache.org&msgNo=32393 
>
>
> commons-http is a really small component - I agree that it should be 
> fixed and then released.  If there is not enough interest in releasing 
> it then I think it should be rolled it back into turbine. 


My first reaction would be to roll-it-back.  Depending on something that 
has a questionable communiy/backing is bit a good idea.

Stephen.

>
>
> Scott
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/                               |
|------------------------------------------------|





---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: [VOTE] Add dependency on commons-http?

Posted by Scott Eade <se...@backstagetech.com.au>.
>[x] Yes, delete the deprecated code and add a dependency on commons-http
>[ ] No, fix the deprecated code, and undeprecate it.
>
BUT: commons-http is not being maintained by anyone at present - it 
doesn't even appear on the commons components page and the last commit 
was 7 months ago.
I use commons-http in my application so as to avoid the deprecation 
warning from BrowserDetector, but commons-http needs to be patched in 
order to do what I want (public access to the constants), but due to the 
low level of attention commons-http gets my patch was lost in the 
massive flow of traffic that is commons-dev:

http://nagoya.apache.org/eyebrowse/ReadMsg?listName=commons-dev@jakarta.apache.org&msgNo=32393

commons-http is a really small component - I agree that it should be 
fixed and then released.  If there is not enough interest in releasing 
it then I think it should be rolled it back into turbine.

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au





---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


RE: [VOTE] Add dependency on commons-http?

Posted by Eric Pugh <ep...@upstate.com>.
Here is my vote:

 [X ] Yes, delete the deprecated code and add a dependency on 
 commons-http
 [ ] No, fix the deprecated code, and undeprecate it.

Eric

> -----Original Message-----
> From: Eric Pugh [mailto:epugh@upstate.com]
> Sent: Thursday, November 13, 2003 11:50 AM
> To: 'Turbine Developers List'
> Subject: [VOTE] Add dependency on commons-http?
> 
> 
> Hi all,
> 
> A post on the user list from Jeff Painter made me go look at 
> the HttpUtils
> class..  It had a bug in the date format for HTTPUtils.  And 
> low and behold,
> it is deprecated and to be removed in 2.3.  However, it is 
> another commons-
> jar, and in the sandbox as well[1].  Since we have plenty of 
> dependencies on
> commons- stuff in sandbox, I don't know if it is a big deal 
> or not.  But, I
> either want to un deprecate the code and fix it in the 
> Turbine code base, or
> delete it, and fix the bug in the commons-http code base.
> 
> This also applies to the BrowserDetector class as well.
> 
> [ ] Yes, delete the deprecated code and add a dependency on 
> commons-http
> [ ] No, fix the deprecated code, and undeprecate it.
> 
> 
> [1]
> http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/http/src
> /java/org/apac
> he/commons/http/HttpUtils.java?rev=1.1&content-type=text/vnd.v
> iewcvs-markup
> 
> 
> Eric Pugh
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


[VOTE] Add dependency on commons-http?

Posted by Eric Pugh <ep...@upstate.com>.
Hi all,

A post on the user list from Jeff Painter made me go look at the HttpUtils
class..  It had a bug in the date format for HTTPUtils.  And low and behold,
it is deprecated and to be removed in 2.3.  However, it is another commons-
jar, and in the sandbox as well[1].  Since we have plenty of dependencies on
commons- stuff in sandbox, I don't know if it is a big deal or not.  But, I
either want to un deprecate the code and fix it in the Turbine code base, or
delete it, and fix the bug in the commons-http code base.

This also applies to the BrowserDetector class as well.

[ ] Yes, delete the deprecated code and add a dependency on commons-http
[ ] No, fix the deprecated code, and undeprecate it.


[1]
http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/http/src/java/org/apac
he/commons/http/HttpUtils.java?rev=1.1&content-type=text/vnd.viewcvs-markup


Eric Pugh


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


RE: cvs commit: jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake Intake.java

Posted by Eric Pugh <ep...@upstate.com>.
Martin,

Is this change to the intake stuff also apply to the intake in CVS head?  I
want to try and keep the avalonized intake as much up to date as possible so
using it in Scarab (someday!) won't regress any thing..  I expect the
/template and /schedule changes to be redone from the source, so I'm not
worried about them...

Not sure if I am quite reading the cvs thing right.

Eric

> -----Original Message-----
> From: mpoeschl@apache.org [mailto:mpoeschl@apache.org]
> Sent: Wednesday, November 12, 2003 8:37 PM
> To: jakarta-turbine-fulcrum-cvs@apache.org
> Subject: cvs commit:
> jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake Intake.java
>
>
> mpoeschl    2003/11/12 11:37:08
>
>   Modified:    .        Tag: PRE_AVALON_BRANCH turbine-schema.xml
>                         project.xml project.properties
> maven.xml build.xml
>                src/java/org/apache/fulcrum/schedule Tag:
> PRE_AVALON_BRANCH
>                         JobEntry.java
>                src/java/org/apache/fulcrum/intake/model Tag:
>                         PRE_AVALON_BRANCH IntegerField.java
>                         FieldFactory.java
>                src/java/org/apache/fulcrum/template Tag:
> PRE_AVALON_BRANCH
>                         TemplateEmail.java
>                src/java/org/apache/fulcrum/intake Tag:
> PRE_AVALON_BRANCH
>                         Intake.java
>   Added:       src/java/org/apache/fulcrum/intake/model Tag:
>                         PRE_AVALON_BRANCH LongField.java
>                src/java/org/apache/fulcrum/intake/validator Tag:
>                         PRE_AVALON_BRANCH LongValidator.java
>   Log:
>   sync with version from scarab
>
>   Revision  Changes    Path
>   No                   revision
>   No                   revision
>   1.2.2.1   +2 -2
> jakarta-turbine-fulcrum/Attic/turbine-schema.xml
>
>   Index: turbine-schema.xml
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-turbine-fulcrum/Attic/turbine-schema.xml,v
>   retrieving revision 1.2
>   retrieving revision 1.2.2.1
>   diff -u -r1.2 -r1.2.2.1
>   --- turbine-schema.xml	13 Nov 2001 05:35:43 -0000	1.2
>   +++ turbine-schema.xml	12 Nov 2003 19:37:07 -0000	1.2.2.1
>   @@ -16,7 +16,7 @@
>    <!-- @version $Id$     -->
>    <!--
> ==============================================================
> ====== -->
>
>   -<database name="@DATABASE_DEFAULT@">
>   +<database name="@DATABASE_DEFAULT@"
> defaultJavaType="@DATABASE_JAVATYPE@">
>
>      <table name="TURBINE_PERMISSION" idMethod="idbroker">
>        <column name="PERMISSION_ID" required="true"
> primaryKey="true" type="INTEGER"/>
>
>
>
>   1.52.2.1  +6 -13     jakarta-turbine-fulcrum/project.xml
>
>   Index: project.xml
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-fulcrum/project.xml,v
>   retrieving revision 1.52
>   retrieving revision 1.52.2.1
>   diff -u -r1.52 -r1.52.2.1
>   --- project.xml	16 Oct 2002 11:51:26 -0000	1.52
>   +++ project.xml	12 Nov 2003 19:37:07 -0000	1.52.2.1
>   @@ -124,7 +124,7 @@
>        </dependency>
>        <dependency>
>          <id>commons-lang</id>
>   -      <version>1.0</version>
>   +      <version>2.0-dev</version>
>          <url>http://jakarta.apache.org/commons/</url>
>        </dependency>
>        <dependency>
>   @@ -159,7 +159,7 @@
>        </dependency>
>        <dependency>
>          <id>junit</id>
>   -      <version>3.8.1</version>
>   +      <version>3.7</version>
>        </dependency>
>        <dependency>
>          <id>log4j</id>
>   @@ -167,7 +167,7 @@
>        </dependency>
>        <dependency>
>          <id>javamail</id>
>   -      <version>1.2</version>
>   +      <version>1.3</version>
>          <url>http://java.sun.com/products/javamail/</url>
>        </dependency>
>        <dependency>
>   @@ -186,7 +186,7 @@
>        </dependency>
>        <dependency>
>          <id>torque</id>
>   -      <version>SNAPSHOT</version>
>   +      <version>3.0</version>
>          <url>http://jakarta.apache.org/turbine/torque/</url>
>        </dependency>
>        <dependency>
>   @@ -210,15 +210,8 @@
>        </dependency>
>        <dependency>
>          <id>xerces</id>
>   -      <type>required</type>
>   -      <version>2.0.2</version>
>   -      <jar>xercesImpl-2.0.2.jar</jar>
>   -      <url>http://xml.apache.org/xerces2-j/index.html</url>
>   -    </dependency>
>   -    <dependency>
>   -      <id>xml-apis</id>
>   -      <type>required</type>
>   -      <version>2.0.2</version>
>   +      <version>1.4.4</version>
>   +      <jar>xerces-1.4.4.jar</jar>
>          <url>http://xml.apache.org/xerces2-j/index.html</url>
>        </dependency>
>        <dependency>
>
>
>
>   1.5.2.1   +5 -3      jakarta-turbine-fulcrum/project.properties
>
>   Index: project.properties
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-fulcrum/project.properties,v
>   retrieving revision 1.5
>   retrieving revision 1.5.2.1
>   diff -u -r1.5 -r1.5.2.1
>   --- project.properties	27 Sep 2002 05:31:24 -0000	1.5
>   +++ project.properties	12 Nov 2003 19:37:07 -0000	1.5.2.1
>   @@ -31,8 +31,9 @@
>    addGetByNameMethod=true
>    complexObjectModel=true
>    addIntakeRetrievable=true
>   +retrievableInterface=org.apache.fulcrum.intake.Retrievable
>    basePrefix=Base
>   -torque.saveException = Exception
>   +saveException = Exception
>
>    schemaDirectory=.
>
>   @@ -50,6 +51,7 @@
>
>    securityPackage=org.apache.fulcrum.security.impl.db.entity
>    schedulerPackage=org.apache.fulcrum.schedule
>   -security.database.name = default
>   -scheduler.database.name = default
>   +security.database.name = scarab
>   +security.database.javatype = object
>   +scheduler.database.name = scarab
>    security.extra.user.columns=
>
>
>
>   1.7.2.1   +1 -0      jakarta-turbine-fulcrum/maven.xml
>
>   Index: maven.xml
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-fulcrum/maven.xml,v
>   retrieving revision 1.7
>   retrieving revision 1.7.2.1
>   diff -u -r1.7 -r1.7.2.1
>   --- maven.xml	11 Oct 2002 03:52:44 -0000	1.7
>   +++ maven.xml	12 Nov 2003 19:37:07 -0000	1.7.2.1
>   @@ -86,6 +86,7 @@
>    </echo>
>
>        <filter token="DATABASE_DEFAULT"
> value="${security.database.name}"/>
>   +    <filter token="DATABASE_JAVATYPE"
> value="${security.database.javatype}"/>
>        <!-- is there a way to load this from an xml file? -->
>        <filter token="EXTRA_USER_COLUMNS"
> value="${security.extra.user.columns}"/>
>        <copy
>
>
>
>   1.57.2.1  +2 -0      jakarta-turbine-fulcrum/build.xml
>
>   Index: build.xml
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-fulcrum/build.xml,v
>   retrieving revision 1.57
>   retrieving revision 1.57.2.1
>   diff -u -r1.57 -r1.57.2.1
>   --- build.xml	1 Aug 2002 16:48:21 -0000	1.57
>   +++ build.xml	12 Nov 2003 19:37:07 -0000	1.57.2.1
>   @@ -176,8 +176,10 @@
>      <target
>        name="security-om"
>        depends="init">
>   +<echo message="asd;lkfja;sldkfjasdlkfja;sdflkja;lskdjf"/>
>
>        <filter token="DATABASE_DEFAULT"
> value="${security.database.name}"/>
>   +    <filter token="DATABASE_JAVATYPE"
> value="${security.database.javatype}"/>
>        <!-- is there a way to load this from an xml file? -->
>        <filter token="EXTRA_USER_COLUMNS"
> value="${security.extra.user.columns}"/>
>        <copy
>
>
>
>   No                   revision
>   No                   revision
>   1.1.1.1.2.1 +2 -4
> jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/schedule/J
> obEntry.java
>
>   Index: JobEntry.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/
> schedule/JobEntry.java,v
>   retrieving revision 1.1.1.1
>   retrieving revision 1.1.1.1.2.1
>   diff -u -r1.1.1.1 -r1.1.1.1.2.1
>   --- JobEntry.java	30 May 2002 02:27:27 -0000	1.1.1.1
>   +++ JobEntry.java	12 Nov 2003 19:37:07 -0000	1.1.1.1.2.1
>   @@ -155,9 +155,7 @@
>            int result = -1;
>            if (je instanceof JobEntry)
>            {
>   -            result = getJobId().getBigDecimal()
>   -            .compareTo(
>   -                ((JobEntry)je).getJobId().getBigDecimal());
>   +            result = new Integer(getJobId()).compareTo(
> new Integer(((JobEntry)je).getJobId()) );
>            }
>            return result;
>        }
>
>
>
>   No                   revision
>   No                   revision
>   1.2.2.1   +21 -6
> jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/mod
> el/IntegerField.java
>
>   Index: IntegerField.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/
> intake/model/IntegerField.java,v
>   retrieving revision 1.2
>   retrieving revision 1.2.2.1
>   diff -u -r1.2 -r1.2.2.1
>   --- IntegerField.java	1 Aug 2002 17:04:11 -0000	1.2
>   +++ IntegerField.java	12 Nov 2003 19:37:08 -0000	1.2.2.1
>   @@ -120,15 +120,30 @@
>            if ( isMultiValued  )
>            {
>                String[] ss = pp.getStrings(getKey());
>   -            int[] ival = new int[ss.length];
>   -            for (int i=0; i<ss.length; i++)
>   +            try
>   +            {
>   +                Integer[] values = new Integer[ss.length];
>   +                for (int i=0; i<ss.length; i++)
>   +                {
>   +                    if (ss[i] != null && ss[i].length() > 0)
>   +                    {
>   +                        values[i] = new Integer(ss[i]);
>   +                    }
>   +                }
>   +                setTestValue(values);
>   +            }
>   +            catch (ClassCastException e)
>                {
>   -                if (ss[i] != null && ss[i].length() > 0)
>   +                int[] ival = new int[ss.length];
>   +                for (int i=0; i<ss.length; i++)
>                    {
>   -                    ival[i] = Integer.parseInt(ss[i]);
>   +                    if (ss[i] != null && ss[i].length() > 0)
>   +                    {
>   +                        ival[i] = Integer.parseInt(ss[i]);
>   +                    }
>                    }
>   +                setTestValue(ival);
>                }
>   -            setTestValue(ival);
>            }
>            else
>            {
>
>
>
>   1.1.1.1.2.1 +10 -1
> jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/mod
> el/FieldFactory.java
>
>   Index: FieldFactory.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/
> intake/model/FieldFactory.java,v
>   retrieving revision 1.1.1.1
>   retrieving revision 1.1.1.1.2.1
>   diff -u -r1.1.1.1 -r1.1.1.1.2.1
>   --- FieldFactory.java	30 May 2002 02:27:18 -0000	1.1.1.1
>   +++ FieldFactory.java	12 Nov 2003 19:37:08 -0000
> 1.1.1.1.2.1
>   @@ -100,6 +100,15 @@
>                    }
>                }
>                           );
>   +        fieldCtors.put("long", new FieldFactory.FieldCtor()
>   +            {
>   +                public Field getInstance(XmlField f, Group g)
>   +                    throws Exception
>   +                {
>   +                    return new LongField(f, g);
>   +                }
>   +            }
>   +                       );
>            fieldCtors.put("BigDecimal", new FieldFactory.FieldCtor()
>                {
>                    public Field getInstance(XmlField f, Group g)
>
>
>
>   No                   revision
>
>   Index: FieldFactory.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/
> intake/model/FieldFactory.java,v
>   retrieving revision 1.1.1.1
>   retrieving revision 1.1.1.1.2.1
>   diff -u -r1.1.1.1 -r1.1.1.1.2.1
>   --- FieldFactory.java	30 May 2002 02:27:18 -0000	1.1.1.1
>   +++ FieldFactory.java	12 Nov 2003 19:37:08 -0000
> 1.1.1.1.2.1
>   @@ -100,6 +100,15 @@
>                    }
>                }
>                           );
>   +        fieldCtors.put("long", new FieldFactory.FieldCtor()
>   +            {
>   +                public Field getInstance(XmlField f, Group g)
>   +                    throws Exception
>   +                {
>   +                    return new LongField(f, g);
>   +                }
>   +            }
>   +                       );
>            fieldCtors.put("BigDecimal", new FieldFactory.FieldCtor()
>                {
>                    public Field getInstance(XmlField f, Group g)
>
>
>
>   No                   revision
>
>   Index: FieldFactory.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/
> intake/model/FieldFactory.java,v
>   retrieving revision 1.1.1.1
>   retrieving revision 1.1.1.1.2.1
>   diff -u -r1.1.1.1 -r1.1.1.1.2.1
>   --- FieldFactory.java	30 May 2002 02:27:18 -0000	1.1.1.1
>   +++ FieldFactory.java	12 Nov 2003 19:37:08 -0000
> 1.1.1.1.2.1
>   @@ -100,6 +100,15 @@
>                    }
>                }
>                           );
>   +        fieldCtors.put("long", new FieldFactory.FieldCtor()
>   +            {
>   +                public Field getInstance(XmlField f, Group g)
>   +                    throws Exception
>   +                {
>   +                    return new LongField(f, g);
>   +                }
>   +            }
>   +                       );
>            fieldCtors.put("BigDecimal", new FieldFactory.FieldCtor()
>                {
>                    public Field getInstance(XmlField f, Group g)
>
>
>
>   1.1.2.1   +161 -0
> jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/mod
> el/Attic/LongField.java
>
>
>
>
>   No                   revision
>   No                   revision
>   1.1.2.1   +199 -0
> jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/val
> idator/Attic/LongValidator.java
>
>
>
>
>   No                   revision
>   No                   revision
>   1.4.2.1   +110 -47
> jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/template/T
> emplateEmail.java
>
>   Index: TemplateEmail.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/
> template/TemplateEmail.java,v
>   retrieving revision 1.4
>   retrieving revision 1.4.2.1
>   diff -u -r1.4 -r1.4.2.1
>   --- TemplateEmail.java	17 Sep 2002 22:44:10 -0000	1.4
>   +++ TemplateEmail.java	12 Nov 2003 19:37:08 -0000	1.4.2.1
>   @@ -61,7 +61,8 @@
>    import javax.mail.internet.InternetAddress;
>    import org.apache.commons.mail.SimpleEmail;
>    import org.apache.commons.lang.StringUtils;
>   -import org.apache.commons.util.WordWrapper;
>   +import org.apache.commons.lang.WordWrapUtils;
>   +import org.apache.fulcrum.ServiceException;
>
>    /**
>     * This is a simple class for sending email from within
> the TemplateService.
>   @@ -164,6 +165,8 @@
>        /** The cc list. */
>        private List replyToList = null;
>
>   +    private List headersList;
>   +
>        /** The column to word-wrap at.  <code>0</code>
> indicates no wrap. */
>        private int wordWrap = 0;
>
>   @@ -199,6 +202,76 @@
>            this.context = context;
>        }
>
>   +    public String getCharSet()
>   +    {
>   +        return charset;
>   +    }
>   +
>   +    public String getTemplate()
>   +    {
>   +        return template;
>   +    }
>   +
>   +    public int getWordWrap()
>   +    {
>   +        return wordWrap;
>   +    }
>   +
>   +    public List getToList()
>   +    {
>   +        return toList == null ? toList = new ArrayList() : toList;
>   +    }
>   +
>   +    public void setToList(List v)
>   +    {
>   +        toList = v;
>   +    }
>   +
>   +    public List getCCList()
>   +    {
>   +        return ccList == null ? ccList = new ArrayList() : ccList;
>   +    }
>   +
>   +    public List getReplyToList()
>   +    {
>   +        return replyToList == null ? replyToList = new
> ArrayList(3) : replyToList;
>   +    }
>   +
>   +    public List getHeadersList()
>   +    {
>   +        return headersList == null ? headersList = new
> ArrayList(3) : headersList;
>   +    }
>   +
>   +    public String getToName()
>   +    {
>   +        return toName;
>   +    }
>   +
>   +    public String getToEmail()
>   +    {
>   +        return toEmail;
>   +    }
>   +
>   +    public String getFromName()
>   +    {
>   +        return fromName;
>   +    }
>   +
>   +    public String getFromEmail()
>   +    {
>   +        return fromEmail;
>   +    }
>   +
>   +    public String getCCName()
>   +    {
>   +        return ccName;
>   +    }
>   +
>   +    public String getCCEmail()
>   +    {
>   +        return ccEmail;
>   +    }
>   +
>        /** Add a recipient TO to the email.
>         *
>         * @param email A String.
>   @@ -214,12 +287,7 @@
>                    name = email;
>                }
>
>   -            if (toList == null)
>   -            {
>   -                toList = new ArrayList();
>   -            }
>   -
>   -            toList.add(new InternetAddress(email, name));
>   +            getToList().add(new InternetAddress(email, name));
>            }
>            catch (Exception e)
>            {
>   @@ -243,12 +311,7 @@
>                    name = email;
>                }
>
>   -            if (ccList == null)
>   -            {
>   -                ccList = new ArrayList();
>   -            }
>   -
>   -            ccList.add(new InternetAddress(email, name));
>   +            getCCList().add(new InternetAddress(email, name));
>            }
>            catch (Exception e)
>            {
>   @@ -327,28 +390,24 @@
>            String[] emailName = new String[2];
>            emailName[0] = email;
>            emailName[1] = name;
>   -        if (replyToList == null)
>   -        {
>   -            replyToList = new ArrayList(3);
>   -        }
>   -        replyToList.add(emailName);
>   +        getReplyToList().add(emailName);
>            return this;
>        }
>
>   -    private List headersList;
>        public TemplateEmail addHeader(String name, String value)
>        {
>            String[] pair = new String[2];
>            pair[0] = name;
>            pair[1] = value;
>   -        if (headersList == null)
>   -        {
>   -            headersList = new ArrayList(3);
>   -        }
>   -        headersList.add(pair);
>   +        getHeadersList().add(pair);
>            return this;
>        }
>
>   +    public String getSubject()
>   +    {
>   +        return this.subject;
>   +    }
>   +
>        /**
>         * Subject.
>         *
>   @@ -429,61 +488,66 @@
>        public void send()
>            throws Exception
>        {
>   -        if (toEmail == null || toName == null)
>   +        if (getToEmail() == null || getToName() == null)
>            {
>                throw new Exception ("Must set a To:");
>            }
>
>            // this method is only supposed to send to one
> user (additional cc:
>            // users are ok.)
>   -        toList = null;
>   +        setToList(null);
>            addTo(toEmail, toName);
>            sendMultiple();
>        }
>
>   +    protected String handleRequest()
>   +        throws ServiceException
>   +    {
>   +        StringWriter sw = new StringWriter();
>   +
> TurbineTemplate.handleRequest(getContext(),getTemplate(),sw);
>   +        return sw.toString();
>   +    }
>   +
>        /**
>         * This method sends the email to multiple addresses.
>         */
>        public void sendMultiple()
>            throws Exception
>        {
>   -        if (toList == null || toList.isEmpty())
>   +        if (getToList() == null || getToList().isEmpty())
>            {
>                throw new Exception ("Must set a To:");
>            }
>
>            // Process the template.
>   -        StringWriter sw = new StringWriter();
>   -        TurbineTemplate.handleRequest(context,template, sw);
>   -        String body = sw.toString();
>   +        String body = handleRequest();
>
>            // If the caller desires word-wrapping, do it here
>   -        if (wordWrap > 0)
>   +        if (getWordWrap() > 0)
>            {
>   -            body = WordWrapper.wrapText (body,
>   +            body = WordWrapUtils.wrapText (body,
>
> System.getProperty("line.separator"),
>   -                                     wordWrap);
>   +                                     getWordWrap());
>            }
>
>            SimpleEmail se = new SimpleEmail();
>   -        se.setFrom(fromEmail, fromName);
>   -        se.setTo(toList);
>   -        if (ccList != null && !ccList.isEmpty())
>   +        se.setFrom(getFromEmail(), getFromName());
>   +        se.setTo(getToList());
>   +        if (getCCList() != null && !getCCList().isEmpty())
>            {
>   -            se.setCc(ccList);
>   +            se.setCc(getCCList());
>            }
>            addReplyTo(se);
>   -        if (charset != null)
>   +        if (getCharSet() != null)
>            {
>   -            se.setCharset(charset);
>   +            se.setCharset(getCharSet());
>            }
>   -        se.setSubject(subject);
>   +        se.setSubject(getSubject());
>            se.setMsg(body);
>
>   -        if (headersList != null)
>   +        if (getHeadersList() != null)
>            {
>   -            Iterator i = headersList.iterator();
>   -            while (i.hasNext())
>   +            for (Iterator i =
> getHeadersList().iterator();i.hasNext();)
>                {
>                    String[] pair = (String[])i.next();
>                    se.addHeader(pair[0], pair[1]);
>   @@ -502,10 +566,9 @@
>        private void addReplyTo(SimpleEmail se)
>            throws Exception
>        {
>   -        if (replyToList != null)
>   +        if (getReplyToList() != null)
>            {
>   -            Iterator i = replyToList.iterator();
>   -            while (i.hasNext())
>   +            for (Iterator i =
> getReplyToList().iterator();i.hasNext();)
>                {
>                    String[] emailName = (String[])i.next();
>                    se.addReplyTo(emailName[0], emailName[1]);
>
>
>
>   No                   revision
>   No                   revision
>   1.1.1.1.2.1 +3 -3
> jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/intake/Intake.java
>
>   Index: Intake.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/
> intake/Intake.java,v
>   retrieving revision 1.1.1.1
>   retrieving revision 1.1.1.1.2.1
>   diff -u -r1.1.1.1 -r1.1.1.1.2.1
>   --- Intake.java	30 May 2002 02:27:17 -0000	1.1.1.1
>   +++ Intake.java	12 Nov 2003 19:37:08 -0000	1.1.1.1.2.1
>   @@ -145,7 +145,7 @@
>                }
>                catch(Exception e)
>                {
>   -                category.error(e);
>   +                category.error("", e);
>                }
>            }
>        }
>   @@ -291,7 +291,7 @@
>                }
>                catch(Exception e)
>                {
>   -                category.error(e);
>   +                category.error("", e);
>                }
>
>                return null;
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org