cvs commit: jakarta-commons/xdocs collections.xml
morgand 02/04/10 09:19:03 Modified:xdocscollections.xml Log: added link to 2.0 Revision ChangesPath 1.3 +3 -0 jakarta-commons/xdocs/collections.xml Index: collections.xml === RCS file: /home/cvs/jakarta-commons/xdocs/collections.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- collections.xml 11 Dec 2001 08:12:04 - 1.2 +++ collections.xml 10 Apr 2002 16:19:03 - 1.3 @@ -48,6 +48,9 @@ section name=Releases ul lia +href=http://jakarta.apache.org/builds/jakarta-commons/release/commons-collections/v2.0/;Version +2.0/a/li +lia href=http://jakarta.apache.org/builds/jakarta-commons/release/commons-collections/v1.0/;Version 1.0/a/li /ul -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/docs collections.html
morgand 02/04/10 09:19:16 Modified:docs collections.html Log: added link to 2.0 Revision ChangesPath 1.18 +2 -0 jakarta-commons/docs/collections.html Index: collections.html === RCS file: /home/cvs/jakarta-commons/docs/collections.html,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- collections.html 4 Mar 2002 04:27:26 - 1.17 +++ collections.html 10 Apr 2002 16:19:16 - 1.18 @@ -185,6 +185,8 @@ trtd blockquote ul +lia href=http://jakarta.apache.org/builds/jakarta-commons/release/commons-collections/v2.0/;Version +2.0/a/li lia href=http://jakarta.apache.org/builds/jakarta-commons/release/commons-collections/v1.0/;Version 1.0/a/li /ul -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/docs/collections/api/org/apache/commons/collections/comparators - New directory
morgand 02/04/10 09:21:45 jakarta-commons/docs/collections/api/org/apache/commons/collections/comparators - New directory -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/docs collections.html
morgand 02/04/10 09:30:30 Modified:docs collections.html Log: fixed link to status doc Revision ChangesPath 1.19 +1 -1 jakarta-commons/docs/collections.html Index: collections.html === RCS file: /home/cvs/jakarta-commons/docs/collections.html,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- collections.html 10 Apr 2002 16:19:16 - 1.18 +++ collections.html 10 Apr 2002 16:30:30 - 1.19 @@ -165,7 +165,7 @@ trtd blockquote p -An alphabetical list of the package can be found in the a href=http://cvs.apache.org/viewcvs/~checkout~/jakarta-commons/collections/STATUS.html?rev=1.7;collections +An alphabetical list of the package can be found in the a href=http://cvs.apache.org/viewcvs/~checkout~/jakarta-commons/collections/STATUS.html?rev=1.13;collections status document/a. /p p -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/docs/collections/api/org/apache/commons/collections IteratorChain.html ListIteratorWrapper.html UniqueFilterIterator.html
morgand 02/04/10 09:32:47 Removed: docs/collections/api/org/apache/commons/collections IteratorChain.html ListIteratorWrapper.html UniqueFilterIterator.html Log: removed post-2.0 collections -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections TestAll.java
morgand 02/04/10 09:33:23 Modified:collections/src/test/org/apache/commons/collections TestAll.java Log: new tests Revision ChangesPath 1.25 +7 -4 jakarta-commons/collections/src/test/org/apache/commons/collections/TestAll.java Index: TestAll.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestAll.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- TestAll.java 19 Mar 2002 04:34:18 - 1.24 +++ TestAll.java 10 Apr 2002 16:33:23 - 1.25 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestAll.java,v 1.24 2002/03/19 04:34:18 mas Exp $ - * $Revision: 1.24 $ - * $Date: 2002/03/19 04:34:18 $ + * $Header: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestAll.java,v 1.25 2002/04/10 16:33:23 morgand Exp $ + * $Revision: 1.25 $ + * $Date: 2002/04/10 16:33:23 $ * * * @@ -67,7 +67,7 @@ /** * Entry point for all Collections tests. * @author Rodney Waldhoff - * @version $Id: TestAll.java,v 1.24 2002/03/19 04:34:18 mas Exp $ + * @version $Id: TestAll.java,v 1.25 2002/04/10 16:33:23 morgand Exp $ */ public class TestAll extends TestCase { public TestAll(String testName) { @@ -96,12 +96,15 @@ suite.addTest(TestFilterIterator.suite()); suite.addTest(TestFilterListIterator.suite()); suite.addTest(TestHashBag.suite()); +suite.addTest(TestIteratorChain.suite()); +suite.addTest(TestListIteratorWrapper.suite()); suite.addTest(TestLRUMap.suite()); suite.addTest(TestMultiHashMap.suite()); suite.addTest(TestReverseComparator.suite()); suite.addTest(TestSequencedHashMap.suite()); suite.addTest(TestSingletonIterator.suite()); suite.addTest(TestTreeBag.suite()); +suite.addTest(TestUniqueFilterIterator.suite()); return suite; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/docs/collections/api/org/apache/commons/collections AbstractBag.html
morgand 02/04/10 09:36:24 Added: docs/collections/api/org/apache/commons/collections AbstractBag.html Log: no message Revision ChangesPath 1.1 jakarta-commons/docs/collections/api/org/apache/commons/collections/AbstractBag.html Index: AbstractBag.html === !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Frameset//ENhttp://www.w3.org/TR/REC-html40/frameset.dtd; !--NewPage-- HTML HEAD !-- Generated by javadoc on Wed Apr 10 11:34:12 CDT 2002 -- TITLE Jakarta Commons Collections Package: Class AbstractBag /TITLE LINK REL =stylesheet TYPE=text/css HREF=../../../../stylesheet.css TITLE=Style /HEAD BODY BGCOLOR=white !-- == START OF NAVBAR == -- A NAME=navbar_top!-- --/A TABLE BORDER=0 WIDTH=100% CELLPADDING=1 CELLSPACING=0 TR TD COLSPAN=2 BGCOLOR=#FF CLASS=NavBarCell1 A NAME=navbar_top_firstrow!-- --/A TABLE BORDER=0 CELLPADDING=0 CELLSPACING=3 TR ALIGN=center VALIGN=top TD BGCOLOR=#FF CLASS=NavBarCell1A HREF=../../../../overview-summary.htmlFONT CLASS=NavBarFont1BOverview/B/FONT/Anbsp;/TD TD BGCOLOR=#FF CLASS=NavBarCell1A HREF=package-summary.htmlFONT CLASS=NavBarFont1BPackage/B/FONT/Anbsp;/TD TD BGCOLOR=#FF CLASS=NavBarCell1Rev nbsp;FONT CLASS=NavBarFont1RevBClass/B/FONTnbsp;/TD TD BGCOLOR=#FF CLASS=NavBarCell1A HREF=../../../../index-all.htmlFONT CLASS=NavBarFont1BIndex/B/FONT/Anbsp;/TD /TR /TABLE /TD TD ALIGN=right VALIGN=top ROWSPAN=3EM /EM /TD /TR TR TD BGCOLOR=white CLASS=NavBarCell2FONT SIZE=-2 nbsp;PREV CLASSnbsp; nbsp;NEXT CLASS/FONT/TD TD BGCOLOR=white CLASS=NavBarCell2FONT SIZE=-2 A HREF=../../../../index.html TARGET=_topBFRAMES/B/A nbsp; nbsp;A HREF=AbstractBag.html TARGET=_topBNO FRAMES/B/A/FONT/TD /TR TR TD VALIGN=top CLASS=NavBarCell3FONT SIZE=-2 SUMMARY: nbsp;INNERnbsp;|nbsp;FIELDnbsp;|nbsp;A HREF=#constructor_summaryCONSTR/Anbsp;|nbsp;A HREF=#method_summaryMETHOD/A/FONT/TD TD VALIGN=top CLASS=NavBarCell3FONT SIZE=-2 DETAIL: nbsp;FIELDnbsp;|nbsp;A HREF=#constructor_detailCONSTR/Anbsp;|nbsp;A HREF=#method_detailMETHOD/A/FONT/TD /TR /TABLE !-- === END OF NAVBAR === -- HR !-- START OF CLASS DATA -- H2 FONT SIZE=-1 org.apache.commons.collections/FONT BR Class AbstractBag/H2 PRE A HREF=http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html;java.lang.Object/A | +--Borg.apache.commons.collections.AbstractBag/B /PRE DL DTBAll Implemented Interfaces:/B DDA HREF=../../../../org/apache/commons/collections/Bag.htmlBag/A, A HREF=http://java.sun.com/products/jdk/1.3/docs/api/java/util/Collection.html;Collection/A/DD /DL HR DL DTpublic abstract class BAbstractBag/BDTextends A HREF=http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html;Object/ADTimplements A HREF=../../../../org/apache/commons/collections/Bag.htmlBag/A/DL P This class provides a skeletal implementation of the A HREF=../../../../org/apache/commons/collections/Bag.htmlCODEBag/CODE/A interface to minimize the effort required for target implementations. Subclasses need only to call A HREF=../../../../org/apache/commons/collections/AbstractBag.html#setMap(java.util.Map)CODEsetMap(Map)/CODE/A in their constructor specifying a map instance that will be used to store the contents of the bag. P DL DTBAuthor: /BDDChuck Burdick, a href=[EMAIL PROTECTED]Michael A. Smith/a/DD /DL HR P !-- INNER CLASS SUMMARY -- !-- === FIELD SUMMARY === -- !-- CONSTRUCTOR SUMMARY -- A NAME=constructor_summary!-- --/A TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0 WIDTH=100% TR BGCOLOR=#FF CLASS=TableHeadingColor TD COLSPAN=2FONT SIZE=+2 BConstructor Summary/B/FONT/TD /TR TR BGCOLOR=white CLASS=TableRowColor TDCODEBA HREF=../../../../org/apache/commons/collections/AbstractBag.html#AbstractBag()AbstractBag/A/B()/CODE BR nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/TD /TR /TABLE nbsp; !-- == METHOD SUMMARY === -- A NAME=method_summary!-- --/A TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0 WIDTH=100% TR BGCOLOR=#FF CLASS=TableHeadingColor TD COLSPAN=2FONT SIZE=+2 BMethod Summary/B/FONT/TD /TR TR BGCOLOR=white CLASS=TableRowColor TD ALIGN=right VALIGN=top WIDTH=1%FONT SIZE=-1 CODEnbsp;boolean/CODE/FONT/TD TDCODEBA HREF=../../../../org/apache/commons/collections/AbstractBag.html#add(java.lang.Object)add/A/B(A HREF=http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html;Object/Anbsp;o)/CODE BR nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;Add the given object to the bag and keep a count./TD /TR TR BGCOLOR=white CLASS=TableRowColor TD
cvs commit: jakarta-commons/xdocs releases.xml
morgand 02/04/10 10:02:41 Modified:xdocsreleases.xml Log: fixed outdated hostnames and email addresses, also added more detail abot Collections builds Revision ChangesPath 1.4 +26 -7 jakarta-commons/xdocs/releases.xml Index: releases.xml === RCS file: /home/cvs/jakarta-commons/xdocs/releases.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- releases.xml 28 Mar 2002 18:42:07 - 1.3 +++ releases.xml 10 Apr 2002 17:02:41 - 1.4 @@ -36,12 +36,12 @@ ol liAnnounce your proposed release of a particular package to the - strong[EMAIL PROTECTED]/strong mailing list, + strong[EMAIL PROTECTED]/strong mailing list, and ask for a vote. Per the Commons Project charter, votes of committers on the particular package in question (as listed in the codeSTATUS.html/code file) are binding.br/br//li - liLog on to daedalus (via SSH) and create a new subdirectory for the + liLog on to jakarta.apache.org (via SSH) and create a new subdirectory for the release you are about to create. For example: pre cd /www/jakarta.apache.org/builds/jakarta-commons/release/commons-foo/ @@ -90,9 +90,9 @@ [EMAIL PROTECTED]:/www/jakarta.apache.org/builds/jakarta-commons/release/commons-foo/v1.2/ /pre/li - liLog in to daedalus and create the source distributions, based on the + liLog in to cvs.apache.org and create the source distributions, based on the tag specified earlier, and move these files to the distribution - directory as well. For example, + directory as well. For example (where xyz is your login), pre mkdir temp cd temp @@ -101,8 +101,8 @@ tar zcvf commons-foo-1.2-src.tar.gz commons-foo-1.2-src zip -r commons-foo-1.2-src.zip commons-foo-1.2-src rm -rf commons-foo-1.2-src -mv commons-foo-1.2-src.* \ - /www/jakarta.apache.org/builds/jakarta-commons/release/commons-foo/v1.2/ +scp commons-foo-1.2-src.* \ + [EMAIL PROTECTED]:/www/jakarta.apache.org/builds/jakarta-commons/release/commons-foo/v1.2/ /pre/li liFollow standard procedures to update the Jakarta web site (stored in @@ -126,7 +126,7 @@ ul li[EMAIL PROTECTED]/li li[EMAIL PROTECTED]/li - li[EMAIL PROTECTED]/li + li[EMAIL PROTECTED]/li /ulbr/br//li /ol @@ -166,6 +166,25 @@ scp RELEASE-NOTES-1.2.html \ [EMAIL PROTECTED]:/www/jakarta.apache.org/builds/jakarta-commons/release/commons-foo/v1.2/ /pre/li + + liUpdate the codecomponents.xml/code and the codecollections.xml/code + (including the link to the codeSTATUS.html/code) files. Run the + codeant/code command at the root of the codejakarta-commons/code + module, which will build HTML versions of those documents in the + codedocs/code directory. Check in the generated docs./li + + liCopy the API docs from the Collections build to the + codejakarta-commons/docs/collections/api/code directory in CVS. + Be sure to iremove/i Javadocs for any Collections that have been + permanently deleted./li + + liLog onto jakarta.apache.org and perform a CVS update to grab the new + site documentation: + +pre +cd /www/jakarta.apache.org/commons/ +cvs update +/pre/li liFollow steps 10-11 above./li -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 7929] New: - PropertyUtils.gerProperty fails on a class named Component
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7929. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7929 PropertyUtils.gerProperty fails on a class named Component Summary: PropertyUtils.gerProperty fails on a class named Component Product: Commons Version: Nightly Builds Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Bean Utilities AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] I have a test case that fails when I think it should pass. Let's say, for testing purposes, I have a little bean class called org.apache.commons.beanutils.Component, which has one read only property: myName. getMyName() simply returns NAME. The following test case fails: public void testGetMyName() throws Exception { org.apache.commons.beanutils.Component comp = new org.apache.commons.beanutils.Component(); try { PropertyUtils.getProperty(comp, myName); } catch (Exception e) { fail(Fail on getProperty for comp: + e); } } It fails with a: java.lang.NoSuchMethodException: Unknown property 'myName' If I change the name of Component to Component_2, the test passes. Changing the name to Color, it fails. Changing the name to Color_2, it passes. Is PropertyUtils confusing the org.apache.commons.beanutils.Component class with java.awt.Component? Will Jaynes My Component class: package org.apache.commons.beanutils; public class Component implements java.io.Serializable { public Component() {} public String getMyName() { return NAME; } } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Further thoughts on FastArrayList, FastHashMap, FastTreeMap
Can we generalize? It seems that FastHashMap could just as easily accept any Map implementation in its constructor. In other words, it could work just as well with java.util.IdentityHashMap or java.util.WeakHashMap or org.apache.commons.collections.DoubleOrderedMap: public class FastMap implements Map { public FastMap(Map m) { //... } } //... } The implementation would be more or less the same, but would allow you to use specialized maps in a fast thread-safe manner. Seems users could benefit from a composition model here. Similar for FastArrayList and FastTreeMap. In fact we could create fast wrapper classes for all the basic Java collection types and the commons' Bag: FastBag FastCollection FastList FastMap FastSet FastSortedSet FastSortedMap Would be very useful, IMHO. Sort of pollutes the package though (seven new classes!). I'd be happy to code them up since I sort of have to do some of it anyway for a project I'm working on, so if everyone thinks it's a good idea I'll do it. Thoughts? -Paul Paul Jack Database Administrator San Francisco AIDS Foundation [EMAIL PROTECTED] (415)487-3075 As far as we can discern, the sole purpose of human existence is to kindle a light of meaning in the darkness of mere being. --Carl Jung -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka AbstractReporter.java HtmlPrettyPrintWriter.java
dion02/04/10 15:36:12 Modified:latka/src/java/org/apache/commons/latka/http CredentialsImpl.java ParametersImpl.java Credentials.java Parameters.java latka/src/java/org/apache/commons/latka AbstractReporter.java HtmlPrettyPrintWriter.java Log: Fixed javadocs Revision ChangesPath 1.4 +15 -7 jakarta-commons/latka/src/java/org/apache/commons/latka/http/CredentialsImpl.java Index: CredentialsImpl.java === RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/http/CredentialsImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CredentialsImpl.java 22 Jan 2002 07:48:36 - 1.3 +++ CredentialsImpl.java 10 Apr 2002 22:36:12 - 1.4 @@ -1,9 +1,13 @@ /* + * + * + * + * * * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999 The Apache Software Foundation. All rights + * Copyright (c) 1999-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,7 +15,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. + *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in @@ -19,15 +23,15 @@ *distribution. * * 3. The end-user documentation included with the redistribution, if - *any, must include the following acknowlegement: - * This product includes software developed by the + *any, must include the following acknowlegement: + * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * - * 4. The names The Jakarta Project, Tomcat, and Apache Software + * 4. The names The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived - *from this software without prior written permission. For written + *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache @@ -55,11 +59,15 @@ * * [Additional notices, if required by prior licensing conditions] * - */ + */ package org.apache.commons.latka.http; /** Concrete Implementation of * {@link org.apache.commons.latka.http.Credentials Credentials} + * + * @author Morgan Delagrange + * @author a href=mailto:[EMAIL PROTECTED];dIon Gillard/a + * @version $Id: CredentialsImpl.java,v 1.4 2002/04/10 22:36:12 dion Exp $ * @see org.apache.commons.latka.http.Credentials */ public class CredentialsImpl implements Credentials { 1.3 +49 -26 jakarta-commons/latka/src/java/org/apache/commons/latka/http/ParametersImpl.java Index: ParametersImpl.java === RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/http/ParametersImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ParametersImpl.java 20 Jan 2002 00:03:41 - 1.2 +++ ParametersImpl.java 10 Apr 2002 22:36:12 - 1.3 @@ -1,9 +1,13 @@ /* + * + * + * + * * * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999 The Apache Software Foundation. All rights + * Copyright (c) 1999-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,7 +15,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. + *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in @@ -19,15 +23,15 @@ *distribution. * * 3. The end-user documentation included with the redistribution, if - *any, must include the following acknowlegement: - * This product includes software developed by
cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka/event LatkaEventPublisher.java RequestEvent.java RequestSkippedEvent.java RequestFailedEvent.java SuiteCompletedEvent.java SuiteEvent.java RequestSucceededEvent.java RequestErrorEvent.java
dion02/04/10 15:36:39 Modified:latka/src/java/org/apache/commons/latka/event LatkaEventPublisher.java RequestEvent.java RequestSkippedEvent.java RequestFailedEvent.java SuiteCompletedEvent.java SuiteEvent.java RequestSucceededEvent.java RequestErrorEvent.java Log: Fixed javadocs Revision ChangesPath 1.6 +101 -55 jakarta-commons/latka/src/java/org/apache/commons/latka/event/LatkaEventPublisher.java Index: LatkaEventPublisher.java === RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/event/LatkaEventPublisher.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LatkaEventPublisher.java 12 Sep 2001 16:51:22 - 1.5 +++ LatkaEventPublisher.java 10 Apr 2002 22:36:39 - 1.6 @@ -1,9 +1,13 @@ /* + * + * + * + * * * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999 The Apache Software Foundation. All rights + * Copyright (c) 1999-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,7 +15,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. + *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in @@ -19,15 +23,15 @@ *distribution. * * 3. The end-user documentation included with the redistribution, if - *any, must include the following acknowlegement: - * This product includes software developed by the + *any, must include the following acknowlegement: + * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * - * 4. The names The Jakarta Project, Tomcat, and Apache Software + * 4. The names The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived - *from this software without prior written permission. For written + *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache @@ -55,7 +59,7 @@ * * [Additional notices, if required by prior licensing conditions] * - */ + */ package org.apache.commons.latka.event; @@ -63,53 +67,95 @@ import java.util.Iterator; import java.util.List; +/** + * A {@link LatkaEventListener} that publishes the incoming events to other + * listeners + * + * @author Morgan Delagrange + * @author a href=mailto:[EMAIL PROTECTED];dIon Gillard/a + * @version $Id: LatkaEventPublisher.java,v 1.6 2002/04/10 22:36:39 dion Exp $ + */ public class LatkaEventPublisher implements LatkaEventListener { - - protected List _list = new ArrayList(); - - public void addListener(LatkaEventListener listener) { - _list.add(listener); - } - - public void broadcastEvent(LatkaEvent event) { - Iterator iter = _list.iterator(); - while(iter.hasNext()) { - broadcastEvent(event,(LatkaEventListener)iter.next()); - } - } - - protected void broadcastEvent(LatkaEvent event, LatkaEventListener listener) { - if(event instanceof RequestSucceededEvent) { - listener.requestSucceeded((RequestEvent)event); - } else if(event instanceof RequestFailedEvent) { - listener.requestFailed((RequestEvent)event); - } else if(event instanceof RequestSkippedEvent) { - listener.requestSkipped((RequestEvent)event); - } else if(event instanceof RequestErrorEvent) { - listener.requestError((RequestEvent)event); - } else if(event instanceof SuiteCompletedEvent) { - listener.suiteCompleted((SuiteEvent)event); - } - } - - public void requestSucceeded(RequestEvent event) { - broadcastEvent(event); - } - - public void requestFailed(RequestEvent event) { - broadcastEvent(event); - } - - public void requestSkipped(RequestEvent event) { - broadcastEvent(event); - } - - public void requestError(RequestEvent event) { - broadcastEvent(event); - } - - public void suiteCompleted(SuiteEvent
Re: [Question] Betwix JAXB
Hi James, Thanks for the detailed response. Yes, choice is healthy. I will hope however that the coices stay limited to 1 or 2 alternatives. More than that, it will almost sound like waste of brain. I am very happy with JXPath and therefore I would think that Betwix is the tool I'd use for marshaling in future. What I really appreciate about JXPath is that it is quite smart about auto handling mapping for various types. An inconvenience of Castor is that it's virtually useless without explicit mapping. If Betwix is going to be a lot more transparent and not require mapping for most cases, I'd certainly enjoy it. BTW, when mapping is not provided, how does betwix handle circular references during marshaling? Xlink? Cheers, Ivelin - Original Message - From: James Strachan [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Monday, April 08, 2002 10:32 PM Subject: Re: [Question] Betwix JAXB Hi Ivelin From: Ivelin Ivanov [EMAIL PROTECTED] Is there a rundown available on the reasons why Betwix is developing in paralel with JAXB? Good question :-) I've used Castor for quite some time and have been happy with its performance. JAXB takes the approach that a DTD (and one day an XML schema) is used to generate beans that can parse/output the XML, then you can derive from them to add behaviour. Betwixt takes a different approach, that starting with any bean, it already has a default XML representation; then betwixt can be customized with just the differences you want (moving elements around, adding arbitrary extra XML nestings, renaming elements/attributes etc). Then betwixt can parse XML (using Digester, it essentially defaults digester rules) or output XML straight away, then customize to make it esthetically nicer XML later. On the list of things planned are SAX reader/writers and a DOM implementation using betwixt's mappings, then XSLT can be used on beans (like the Maven project does). Also I should finally get around to using Betwixt to add a bean Navigator to the Jaxen XPath engine. Betwixt essentially mirrors the Introspector / BeanInfo classes from java.beans but for mapping information of beans to XML, so there's an XMLIntrospector and XMLBeanInfo etc. Both the JAXB betwixt approaches are equally valid; JAXB is useful if you want some beans generated from some kind of XML 'schema', betwixt is better if you already have the beans and want to customize what the XML looks like, or to automatically default digester rules for you, then maybe customize things later. So if you're starting from beans and want nice XML then betwixt is a good tool for the job; if you're starting with a DTD and want to write some beans, then look at JAXB. Castor is kinda in the middle between them with a bit more complexity thrown in for good measure but its got some good stuff in there. Though I always get the impression Castor is trying to do too much together at the same time rather than just doing one thing well, but maybe thats just me. I can't help think of the phrase 'jack of all trades and master of none'. e.g. Castor is JDO-like without being compliant, its kind of an O/R mapping tool, its a reasonable O/XML mapping tool and a kinda OQL engine all thrown in together. An impressive body of work though. As an aside, betwixt focusses on the mapping metadata of how beans should map to XML, so betwixt could maybe be used to generate Castor java - XML bindings - though I'm not sure why you'd want to do that ;-) Apache Axis build their own JavaBean-XML mapping and Betwix is yet another development in the area. Its on my list to investigate using Betwixt in Axis. SOAP supports various different encodings, 1 of which (usually called the 'soap encoding') is a well defined mapping of SOAP to java objects, so Axis probably implements that spec. However for some of the other encodings (such as none where you just get XML), then maybe betwixt could be used to map a SOAP schema to some implementation beans. i.e. to have a flexible, customizable mapping. I'd certainly like try out a Betwixt based serializer/deserializer for Axis and see if it works neatly. James _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka/http RequestHeaders.java Request.java RequestHeadersImpl.java
dion02/04/10 19:34:54 Modified:latka/src/java/org/apache/commons/latka/http RequestHeaders.java Request.java RequestHeadersImpl.java Log: Javadoc cleanup Revision ChangesPath 1.3 +21 -12 jakarta-commons/latka/src/java/org/apache/commons/latka/http/RequestHeaders.java Index: RequestHeaders.java === RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/http/RequestHeaders.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- RequestHeaders.java 20 Jan 2002 00:03:41 - 1.2 +++ RequestHeaders.java 11 Apr 2002 02:34:53 - 1.3 @@ -1,9 +1,13 @@ /* + * + * + * + * * * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999 The Apache Software Foundation. All rights + * Copyright (c) 1999-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,7 +15,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. + *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in @@ -19,15 +23,15 @@ *distribution. * * 3. The end-user documentation included with the redistribution, if - *any, must include the following acknowlegement: - * This product includes software developed by the + *any, must include the following acknowlegement: + * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * - * 4. The names The Jakarta Project, Tomcat, and Apache Software + * 4. The names The Jakarta Project, Commons, and Apache Software *Foundation must not be used to endorse or promote products derived - *from this software without prior written permission. For written + *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache @@ -55,27 +59,32 @@ * * [Additional notices, if required by prior licensing conditions] * - */ + */ package org.apache.commons.latka.http; import java.util.List; +/** + * Manage a set of http request headers + * + * @author Morgan Delagrange + * @author dIon Gillard + * @version $Id: RequestHeaders.java,v 1.3 2002/04/11 02:34:53 dion Exp $ + */ public interface RequestHeaders { /** * Add a header to the request - * * @param headerName header name - * @param headerValue - * header value, or null for an empty value + * @param headerValue header value, or null for an empty value */ public void addHeader(String headerName, String headerValue); + /** - * Returns a list of all the headers for the request. + * Return a list of all the headers for the request. * Elements of the list are a String array with the * headerName as the first value and the header value * as the second (can be null). - * * @return all headers for the request */ public List getHeaders(); 1.12 +11 -7 jakarta-commons/latka/src/java/org/apache/commons/latka/http/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/http/Request.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Request.java 2 Feb 2002 12:56:21 - 1.11 +++ Request.java 11 Apr 2002 02:34:53 - 1.12 @@ -1,9 +1,13 @@ /* + * + * + * + * * * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999 The Apache Software Foundation. All rights + * Copyright (c) 1999-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,7 +15,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. + *notice, this list of conditions and the following
cvs commit: jakarta-commons/jxpath/src/test/org/apache/commons/jxpath Vendor.xml JXPathTestCase.java Test.properties
dmitri 02/04/10 19:57:41 Modified:jxpath/src/test/org/apache/commons/jxpath JXPathTestCase.java Added: jxpath/src/test/org/apache/commons/jxpath Vendor.xml Removed: jxpath/src/test/org/apache/commons/jxpath Test.properties Log: Made test more readable Revision ChangesPath 1.11 +60 -60 jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/JXPathTestCase.java Index: JXPathTestCase.java === RCS file: /home/cvs/jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/JXPathTestCase.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- JXPathTestCase.java 10 Apr 2002 03:40:21 - 1.10 +++ JXPathTestCase.java 11 Apr 2002 02:57:41 - 1.11 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/JXPathTestCase.java,v 1.10 2002/04/10 03:40:21 dmitri Exp $ - * $Revision: 1.10 $ - * $Date: 2002/04/10 03:40:21 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/JXPathTestCase.java,v 1.11 2002/04/11 02:57:41 dmitri Exp $ + * $Revision: 1.11 $ + * $Date: 2002/04/11 02:57:41 $ * * * The Apache Software License, Version 1.1 @@ -93,7 +93,7 @@ * /p * * @author Dmitri Plotnikov - * @version $Revision: 1.10 $ $Date: 2002/04/10 03:40:21 $ + * @version $Revision: 1.11 $ $Date: 2002/04/11 02:57:41 $ */ public class JXPathTestCase extends TestCase @@ -1004,7 +1004,7 @@ System.setProperty(JXPathContextFactory.FACTORY_NAME_PROPERTY, org.apache.commons.jxpath.ri.JXPathContextFactoryReferenceImpl); try { -XMLDocumentContainer docCtr = new XMLDocumentContainer(getClass().getResource(Test.properties)); +XMLDocumentContainer docCtr = new XMLDocumentContainer(getClass().getResource(Vendor.xml)); Document doc = (Document)docCtr.getValue(); JXPathContext ctx = JXPathContextFactory.newInstance().newContext(null, doc); ctx.setLocale(Locale.US); @@ -1022,7 +1022,7 @@ } private TestBeanWithDOM createTestBeanWithDOM(){ -XMLDocumentContainer docCtr = new XMLDocumentContainer(getClass().getResource(Test.properties)); +XMLDocumentContainer docCtr = new XMLDocumentContainer(getClass().getResource(Vendor.xml)); Document doc = (Document)docCtr.getValue(); TestBeanWithDOM tbwdom = new TestBeanWithDOM(); tbwdom.setVendor(doc.getDocumentElement()); @@ -1031,14 +1031,14 @@ } static final XP[] dom_tests = new XP[]{ -test(vendor/location/address/street, Some street), -test(vendor/location[2]/address/street, Other street), -test(//street, Some street), +test(vendor/location/address/street, Orchard Road), +test(vendor/location[2]/address/street, Tangerine Drive), +test(//street, Orchard Road), test(local-name(//street/..), address), test(number(vendor/location/employeeCount), new Double(10)), test(vendor/location/employeeCount + 1, new Double(11)), test(vendor/location/employeeCount and true(), Boolean.TRUE), -test(vendor/location[.//employeeCount = 10]/following-sibling::location//street, Other street), +test(vendor/location[.//employeeCount = 10]/following-sibling::location//street, Tangerine Drive), testPath(vendor/location[.//employeeCount = 10]/following-sibling::location//street, /vendor[1]/location[2]/address[1]/street[1]), testPath(//location[2]/preceding-sibling::location//street, @@ -1046,61 +1046,61 @@ test(vendor/location/@id, 100), testPath(vendor/location/@id, /vendor[1]/location[1]/@id), testEval(vendor/location/@id, list(100, 101)), -test(vendor/nsnode/foo:bar, BAR), -test(namespace-uri(vendor/nsnode/foo:bar), foonamespace), -test(local-name(vendor/nsnode/foo:bar), bar), -test(name(vendor/nsnode/foo:bar), foonamespace:bar), -test(vendor/nsnode/baz, BAZ), -test(vendor/nsnode/baz/namespace::foo, foonamespace), -testPath(vendor/nsnode/baz/namespace::foo, /vendor[1]/nsnode[1]/baz[1]/namespace::foo), -test(count(vendor/nsnode/namespace::*), new Double(3)), -test(name(vendor/nsnode/baz/namespace::foo), foonamespace:foo), -test(local-name(vendor/nsnode/baz/namespace::foo), foo), -test(vendor/nsnode/foo:bar/@foo:attr, A), -test(vendor/nsnode/zoo:bar/@zoo:attr, A), -test(namespace-uri(vendor/nsnode/foo:bar/@foo:attr), foonamespace), -test(local-name(vendor/nsnode/foo:bar/@foo:attr),
cvs commit: jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/functions PackageFunctions.java
dmitri 02/04/10 19:58:38 Removed: jxpath/src/java/org/apache/commons/jxpath/functions PackageFunctions.java Log: Moved the file -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/pointers DOMNodePointer.java
dmitri 02/04/10 19:59:42 Modified:jxpath/src/java/org/apache/commons/jxpath/ri/pointers DOMNodePointer.java Log: Cleaner string comparison Revision ChangesPath 1.5 +10 -5 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/pointers/DOMNodePointer.java Index: DOMNodePointer.java === RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/pointers/DOMNodePointer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DOMNodePointer.java 10 Apr 2002 03:40:20 - 1.4 +++ DOMNodePointer.java 11 Apr 2002 02:59:42 - 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/pointers/DOMNodePointer.java,v 1.4 2002/04/10 03:40:20 dmitri Exp $ - * $Revision: 1.4 $ - * $Date: 2002/04/10 03:40:20 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/pointers/DOMNodePointer.java,v 1.5 2002/04/11 02:59:42 dmitri Exp $ + * $Revision: 1.5 $ + * $Date: 2002/04/11 02:59:42 $ * * * The Apache Software License, Version 1.1 @@ -74,7 +74,7 @@ * A Pointer that points to a DOM node. * * @author Dmitri Plotnikov - * @version $Revision: 1.4 $ $Date: 2002/04/10 03:40:20 $ + * @version $Revision: 1.5 $ $Date: 2002/04/11 02:59:42 $ */ public class DOMNodePointer extends NodePointer { private Node node; @@ -150,9 +150,14 @@ if (s1 == null s2 != null){ return false; } -if (s1 != null !s1.equals(s2)){ +if (s1 != null s2 == null){ return false; } + +if (s1 != null !s1.trim().equals(s2.trim())){ +return false; +} + return true; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons/jxpath/xdocs users-guide.xml
dmitri 02/04/10 20:00:32 Modified:jxpath/xdocs users-guide.xml Log: Added more text Revision ChangesPath 1.2 +182 -74 jakarta-commons/jxpath/xdocs/users-guide.xml Index: users-guide.xml === RCS file: /home/cvs/jakarta-commons/jxpath/xdocs/users-guide.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- users-guide.xml 10 Apr 2002 03:40:21 - 1.1 +++ users-guide.xml 11 Apr 2002 03:00:31 - 1.2 @@ -19,14 +19,17 @@ p If you are not familiar with the XPath syntax, start with a href=http://www.w3schools.com/xpath;XPath Tutorial by W3Schools/a.br/ - Also see a href=http://www.w3.org/TR/xpath;XML Path Language (XPath) Version 1.0 /a + Also see a href=http://www.w3.org/TR/xpath;XML Path Language (XPath) Version 1.0 /a - + that's the official standard. /p p - You can read and write properties - of JavaBeans, get and set elements of arrays, collections, - maps, DOM documents, transparent containers, various context objects - in Servlets etc. + XPath is the official expression language of XSLT. In XSLT you mostly use + XPath to access various elements of XML documents. You can do that with + JXPath as well. In addition, you can read and write properties of JavaBeans, get and set + elements of arrays, collections, maps, transparent containers, various context objects + in Servlets etc. In other words, JXPath applies the concepts of XPath + to alternate object models. /p p @@ -46,8 +49,9 @@ properties. /p p - The interpretation of the xpath syntax in the context of Java object graphs - is quite intuitive: the child axis of XPath is mapped to JavaBean properties. + The interpretation of the XPath syntax in the context of Java object graphs + is quite intuitive: the codechild/code axis of XPath is mapped to + JavaBean properties. /p subsection name=JavaBean Property Access @@ -71,11 +75,19 @@ p In this example, we are using JXPath to access a property of the codeemp/code bean. - In this simple case the invocation of JXPath is equivalent to invocation of getFirstName() - on the bean. + In this simple case the invocation of JXPath is equivalent to invocation of + codegetFirstName()/code on the bean. /p /subsection +subsection name=Lenient Mode +p +The codecontext.getValue(xpath)/code method throws an exception if the +supplied xpath does not map to an existing property. This +constraint can be relaxed by calling codecontext.setLenient(true)/code. +In the lenient mode the method merely returns null if the path maps to nothing. +/p +/subsection subsection name=Nested Bean Property Access p @@ -104,7 +116,7 @@ In this case XPath is used to access a property of a nested bean. /p p - A property identified by the xpath does not have to be a leaf property. + A property identified by the XPath does not have to be a leaf property. For instance, we can extract the whole Address object in above example: /p source @@ -139,6 +151,30 @@ /p /subsection +subsection name=Retrieving Multiple Results + p + JXPath can retrieve multiple objects from a graph. Note that the method + called in this case is not codegetValue/code, but codeeval/code. + /p + source + #xA0; + public class Author { +public Book[] getBooks(){ + ... +} + } + + Author auth = new Author(); + ... + + JXPathContext context = JXPathContext.newContext(auth); + List threeBooks = (List)context.eval(books[position() lt; 4]); + /source + p + This returns a list of at most three books from the array of all books + written by the author. + /p +/subsection subsection name=Map Element Access p @@ -147,21 +183,19 @@ source #xA0; public class Employee { -public Map getAddresses(){ - return addressMap; +private Map addressMap = new HashMap(); +{ +addressMap.put(home, new Address(...)); +addressMap.put(office, new Address(...)); } -public void addAddress(String key, Address address){ - addressMap.put(key, address); +public Map getAddresses(){ + return addressMap; } ... } Employee emp = new Employee(); - emp.addAddress(home, new Address(...)); - emp.addAddress(office, new Address(...)); - ... - JXPathContext context = JXPathContext.newContext(emp); String homeZipCode = (String)context.getValue(addresses/home/zipCode); @@ -177,11 +211,14
cvs commit: jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload FileItem.java
jmcnally02/04/10 22:54:55 Modified:fileupload/src/java/org/apache/commons/fileupload FileItem.java Log: removed a method that is only meant for internal use. Revision ChangesPath 1.2 +1 -12 jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload/FileItem.java Index: FileItem.java === RCS file: /home/cvs/jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload/FileItem.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FileItem.java 24 Mar 2002 07:05:13 - 1.1 +++ FileItem.java 11 Apr 2002 05:54:55 - 1.2 @@ -83,7 +83,7 @@ * @author a href=mailto:[EMAIL PROTECTED];Rafal Krzewski/a * @author a href=mailto:[EMAIL PROTECTED];Sean Legassick/a * @author a href=mailto:[EMAIL PROTECTED];Jason van Zyl/a - * @version $Id: FileItem.java,v 1.1 2002/03/24 07:05:13 jmcnally Exp $ + * @version $Id: FileItem.java,v 1.2 2002/04/11 05:54:55 jmcnally Exp $ */ public interface FileItem extends DataSource @@ -193,17 +193,6 @@ * @return A File. */ public File getStoreLocation(); - -/** - * Returns an {@link java.io.OutputStream OutputStream} that can - * be used for storing the contents of the file. - * (implements DataSource method) - * - * @return an {@link java.io.OutputStream OutputStream} that can be - * used for storing the contensts of the file. - * @exception IOException. - */ -public OutputStream getOutputStream() throws IOException; /** * A convenience method to write an uploaded -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload FileUpload.java
jmcnally02/04/10 22:57:37 Modified:fileupload/src/java/org/apache/commons/fileupload FileUpload.java Log: javadoc changes allow negative max size to indicate unlimited upload size. Revision ChangesPath 1.2 +19 -12 jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload/FileUpload.java Index: FileUpload.java === RCS file: /home/cvs/jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload/FileUpload.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FileUpload.java 24 Mar 2002 07:05:13 - 1.1 +++ FileUpload.java 11 Apr 2002 05:57:37 - 1.2 @@ -68,23 +68,26 @@ import javax.servlet.http.HttpServletRequest; /** - * p Files will be stored in temporary disk storage on in memory, - * depending on request size, and will be available as {@link - * org.apache.commons.fileupload.FileItem}s. + * pHigh level api for processing file uploads. * * pThis class handles multiple * files per single html widget, sent using multipar/mixed encoding - * type, as specified by RFC 1867. Use {@link + * type, as specified by + * a href=http://www.ietf.org/rfc/rfc1867.txt;RFC 1867/a. Use {@link * #parseRequest(HttpServletRequest, String)} to * acquire a list of {@link * org.apache.commons.fileupload.FileItem}s associated with given * html widget. * + * p Files will be stored in temporary disk storage on in memory, + * depending on request size, and will be available as {@link + * org.apache.commons.fileupload.FileItem}s. + * * @author a href=mailto:[EMAIL PROTECTED];Rafal Krzewski/a * @author a href=mailto:[EMAIL PROTECTED];Daniel Rall/a * @author a href=mailto:[EMAIL PROTECTED];Jason van Zyl/a * @author a href=mailto:[EMAIL PROTECTED];John McNally/a - * @version $Id: FileUpload.java,v 1.1 2002/03/24 07:05:13 jmcnally Exp $ + * @version $Id: FileUpload.java,v 1.2 2002/04/11 05:57:37 jmcnally Exp $ */ public class FileUpload { @@ -131,7 +134,7 @@ /** - * p Processes an a href=http://rf.cx/rfc1867.html;RFC 1867/a + * p Processes an a href=http://www.ietf.org/rfc/rfc1867.txt;RFC 1867/a * compliant codemultipart/form-data/code stream. if files are * stored on disk, the path is given by getRepository() * @@ -146,7 +149,7 @@ } /** - * p Processes an a href=http://rf.cx/rfc1867.html;RFC 1867/a + * p Processes an a href=http://www.ietf.org/rfc/rfc1867.txt;RFC 1867/a * compliant codemultipart/form-data/code stream. * * @param req The servlet request to be parsed. @@ -173,7 +176,7 @@ it's size is unknown); } -if(requestSize getSizeMax()) +if(getSizeMax() = 0 requestSize getSizeMax()) { throw new FileUploadException(the request was rejected because + it's size exceeds allowed range); @@ -212,7 +215,8 @@ { FileItem item = createItem(path, headers, requestSize); -OutputStream os = item.getOutputStream(); +OutputStream os = +((DefaultFileItem)item).getOutputStream(); try { multi.readBodyData(os); @@ -241,7 +245,8 @@ // A single file. FileItem item = createItem(path, headers, requestSize); -OutputStream os = item.getOutputStream(); +OutputStream os = +((DefaultFileItem)item).getOutputStream(); try { multi.readBodyData(os); @@ -258,7 +263,8 @@ // A form field. FileItem item = createItem(path, headers, requestSize); -OutputStream os = item.getOutputStream(); +OutputStream os = +((DefaultFileItem)item).getOutputStream(); try { multi.readBodyData(os); @@ -450,7 +456,8 @@ } /** - * The maximum allowed upload size + * The maximum allowed upload size. If negative there is no + * maximum. */ public
cvs commit: jakarta-commons-sandbox/fileupload PROPOSAL.html STATUS.html
jmcnally02/04/10 23:04:08 Modified:fileupload PROPOSAL.html STATUS.html Log: added jason as a committer. Revision ChangesPath 1.2 +1 -0 jakarta-commons-sandbox/fileupload/PROPOSAL.html Index: PROPOSAL.html === RCS file: /home/cvs/jakarta-commons-sandbox/fileupload/PROPOSAL.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PROPOSAL.html 24 Mar 2002 07:05:13 - 1.1 +++ PROPOSAL.html 11 Apr 2002 06:04:08 - 1.2 @@ -62,6 +62,7 @@ ul liJohn McNally (jmcnally)/li liDaniel Rall (dlr)/li +liJason van Zyl (jvanzyl)/li !-- Add your real name and user name here -- /ul /p 1.2 +4 -3 jakarta-commons-sandbox/fileupload/STATUS.html Index: STATUS.html === RCS file: /home/cvs/jakarta-commons-sandbox/fileupload/STATUS.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- STATUS.html 24 Mar 2002 07:05:13 - 1.1 +++ STATUS.html 11 Apr 2002 06:04:08 - 1.2 @@ -7,7 +7,7 @@ div align=center h1The Jakarta Commons emFileUpload/em Component/h1 -$Id: STATUS.html,v 1.1 2002/03/24 07:05:13 jmcnally Exp $br / +$Id: STATUS.html,v 1.2 2002/04/11 06:04:08 jmcnally Exp $br / a href=#Introduction[Introduction]/a a href=#Dependencies[Dependencies]/a a href=#Release Info[Release Info]/a @@ -78,8 +78,9 @@ projects are encouraged to collaborate on the future development of this component to ensure that it continues to meet a variety of needs./p ul -lia href=mailto:[EMAIL PROTECTED];John McNally/a/li -lia href=mailto:[EMAIL PROTECTED];Daniel Rall/a/li +lia href=mailto:jmcnally at apache.orgJohn McNally/a/li +lia href=mailto:dlr at apache.orgDaniel Rall/a/li +lia href=mailto:jvanzyl at apache.orgJason van Zyl/a/li /ul /body -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]