You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by ep...@apache.org on 2004/02/14 15:29:13 UTC
cvs commit: jakarta-turbine-fulcrum/upload/xdocs index.xml
epugh 2004/02/14 06:29:13
Modified: xslt/xdocs index.xml
xdocs navigation.xml building.xml
upload/xdocs index.xml
Added: xdocs/sites crypto.xml localization.xml security.xml
dvsl.xml pool.xml mimetype.xml factory.xml
osworkflow.xml
Removed: xdocs/howto upload-service.xml xslt-service.xml
localization-service.xml mimetype-service.xml
scheduler-service.xml naming-service.xml
factory-service.xml pool-service.xml
Log:
Improving docs
Revision Changes Path
1.1 jakarta-turbine-fulcrum/xdocs/sites/crypto.xml
Index: crypto.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Crypto Component</title>
<author email="epugh@OpensourceConnections.com">Eric Pugh</author>
</properties>
<body>
<section name="Crypto Component">
<p>
<ul>
<li><a href="../fulcrum-crypto-api/index.html">API</a></li>
<li><a href="../fulcrum-crypto-impl/index.html">Implementation</a></li>
</ul>
</p>
</section>
</body>
</document>
1.1 jakarta-turbine-fulcrum/xdocs/sites/localization.xml
Index: localization.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Localization Component</title>
<author email="epugh@OpensourceConnections.com">Eric Pugh</author>
</properties>
<body>
<section name="Localization Component">
<p>
<ul>
<li><a href="../fulcrum-localization-api/index.html">API</a></li>
<li><a href="../fulcrum-localization-impl/index.html">Implementation</a></li>
</ul>
</p>
</section>
</body>
</document>
1.1 jakarta-turbine-fulcrum/xdocs/sites/security.xml
Index: security.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Security Component</title>
<author email="epugh@OpensourceConnections.com">Eric Pugh</author>
</properties>
<body>
<section name="Security Component">
<p>
<ul>
<li><a href="../fulcrum-security-site/index.html">Site</a></li>
<li><a href="../fulcrum-security-api/index.html">Security API</a></li>
<li><a href="../fulcrum-security-spi/index.html">Security SPI</a></li>
<li><a href="../fulcrum-security-memory/index.html">Memory Impl</a></li>
<li><a href="../fulcrum-security-hibernate/index.html">Hibernate Impl</a></li>
<li><a href="../fulcrum-security-nt/index.html">NT Impl</a></li>
<li><a href="../fulcrum-security-adapter-turbine/index.html">Adapter Turbine</a></li>
<li><a href="../fulcrum-security-adapter-opensymphony/index.html">Adapter OpenSymphony</a></li>
</ul>
</p>
</section>
</body>
</document>
1.1 jakarta-turbine-fulcrum/xdocs/sites/dvsl.xml
Index: dvsl.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>DVSL Component</title>
<author email="epugh@OpensourceConnections.com">Eric Pugh</author>
</properties>
<body>
<section name="DVSL Component">
<p>
<ul>
<li><a href="../fulcrum-dvsl-api/index.html">API</a></li>
<li><a href="../fulcrum-dvsl-impl/index.html">Implementation</a></li>
</ul>
</p>
</section>
</body>
</document>
1.1 jakarta-turbine-fulcrum/xdocs/sites/pool.xml
Index: pool.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Pool Component</title>
<author email="epugh@OpensourceConnections.com">Eric Pugh</author>
</properties>
<body>
<section name="Pool Component">
<p>
<ul>
<li><a href="../fulcrum-pool-api/index.html">API</a></li>
<li><a href="../fulcrum-pool-impl/index.html">Implementation</a></li>
</ul>
</p>
</section>
</body>
</document>
1.1 jakarta-turbine-fulcrum/xdocs/sites/mimetype.xml
Index: mimetype.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Mimetype Component</title>
<author email="epugh@OpensourceConnections.com">Eric Pugh</author>
</properties>
<body>
<section name="Mimetype Component">
<p>
<ul>
<li><a href="../fulcrum-mimetype-api/index.html">API</a></li>
<li><a href="../fulcrum-mimetype-impl/index.html">Implementation</a></li>
</ul>
</p>
</section>
</body>
</document>
1.1 jakarta-turbine-fulcrum/xdocs/sites/factory.xml
Index: factory.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Factory Component</title>
<author email="epugh@OpensourceConnections.com">Eric Pugh</author>
</properties>
<body>
<section name="Factory Component">
<p>
<ul>
<li><a href="../fulcrum-factory-api/index.html">API</a></li>
<li><a href="../fulcrum-factory-impl/index.html">Implementation</a></li>
</ul>
</p>
</section>
</body>
</document>
1.1 jakarta-turbine-fulcrum/xdocs/sites/osworkflow.xml
Index: osworkflow.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>OSWorkflow Component</title>
<author email="epugh@OpensourceConnections.com">Eric Pugh</author>
</properties>
<body>
<section name="OSWorkflow Component">
<p>
<ul>
<li><a href="../fulcrum-osworkflow/index.html">Component</a></li>
<li><a href="../fulcrum-osworkflow-example/index.html">Example</a></li>
</ul>
</p>
</section>
</body>
</document>
1.2 +8 -43 jakarta-turbine-fulcrum/xslt/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/xslt/xdocs/index.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.xml 13 Feb 2004 14:26:58 -0000 1.1
+++ index.xml 14 Feb 2004 14:29:13 -0000 1.2
@@ -15,9 +15,7 @@
</p>
<p>
- It is written
- for use in Turbine but it can be used in any container compatible
- with Avalon's ECM container.
+ It is written for use in Turbine but it can be used in Avalon compatible container.
</p>
</section>
@@ -30,9 +28,9 @@
<source>
<![CDATA[
<role
- name="org.apache.fulcrum.bsf.BSFService"
- shorthand="cache"
- default-class="org.apache.fulcrum.bsf.DefaultBSFService"/>
+ name="org.apache.fulcrum.xslt.XSLTService"
+ shorthand="xslt"
+ default-class="org.apache.fulcrum.xslt.DefaultXSLTService"/>
]]>
</source>
@@ -42,7 +40,7 @@
<source>
<![CDATA[
- <cache cacheInitialSize="20" cacheCheckFrequency="5"/>
+ <xslt path="/WEB-INF/stylesheets" cache="true"/>
]]>
</source>
@@ -50,43 +48,10 @@
<section name="Usage">
- <source><![CDATA[
-
- GlobalCacheService gs = null;
- try
- {
- /*
- * Look for the item in the cache.
- * If it doesn't exist or the item is stale,
- * the cache will throw an exception.
- */
- gs = (GlobalCacheService)avalonComponentService.lookup(GlobalCacheService.ROLE)
-
- CachedObject obj = gs.getObject("cached_object");
-
- data.setMessage( data.getScreen() + " Got " +
- obj.getContents().toString() + " from global cache!" );
- }
- catch(ObjectExpiredException gone)
- {
- /*
- * Add the item to the cache.
- */
- gs.addObject("cached_object",
- new CachedObject("in_the_cache",5000));
-
- data.setMessage( data.getScreen() +
- " Refreshed/or added new item to" +
- " the cache! Expires in 5 seconds" );
- }
-
- ]]></source>
-
+
<p>
- You can also place an expiration time on your objects so the Service will
- automatically remove them when they expire. If you don't specify an expiration
- time, the Service uses 5 seconds. To see an example, look at the
- test case <a href="xref-test/org/apache/fulcrum/cache/CacheTest.html">CacheTest</a>
+ Please look at the org.apache.turbine.modules.layouts.VelocityXslLayout for an example usage pattern.
+
</p>
</section>
1.12 +48 -26 jakarta-turbine-fulcrum/xdocs/navigation.xml
Index: navigation.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/xdocs/navigation.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- navigation.xml 21 Jan 2004 19:36:50 -0000 1.11
+++ navigation.xml 14 Feb 2004 14:29:13 -0000 1.12
@@ -15,41 +15,63 @@
<item name="Building" href="/building.html"/>
<item name="Changes" href="/changes-report.html"/>
</menu>
- <menu name="Components">
- <item name="Test Container" href="/fulcrum-testcontainer/index.html"/>
+
+ <menu name="Componentsd">
+
+ <item name="BSF" href="/fulcrum-bsf/index.html"/>
<item name="Cache" href="/fulcrum-cache/index.html"/>
<item name="Configuration" href="/fulcrum-configuration-impl/index.html"/>
- <item name="Crypto API" href="/fulcrum-crypto-api/index.html"/>
- <item name="Crypto Impl" href="/fulcrum-crypto-impl/index.html"/>
- <item name="DVSL API" href="/fulcrum-dvsl-api/index.html"/>
- <item name="DVSL Impl" href="/fulcrum-dvsl-impl/index.html"/>
- <item name="Factory API" href="/fulcrum-factory-api/index.html"/>
- <item name="Factory Impl" href="/fulcrum-factory-impl/index.html"/>
+ <item name="Crypto" href="/sites/crypto.html" collapse="true">
+ <item name="Crypto API" href="/fulcrum-crypto-api/index.html"/>
+ <item name="Crypto Impl" href="/fulcrum-crypto-impl/index.html"/>
+ </item>
+ <item name="DVSL" href="/sites/dvsl.html" collapse="true">
+ <item name="DVSL API" href="/fulcrum-dvsl-api/index.html"/>
+ <item name="DVSL Impl" href="/fulcrum-dvsl-impl/index.html"/>
+ </item>
+ <item name="Factory" href="/sites/factory.html" collapse="true">
+ <item name="Factory API" href="/fulcrum-factory-api/index.html"/>
+ <item name="Factory Impl" href="/fulcrum-factory-impl/index.html"/>
+ </item>
<item name="Intake" href="/fulcrum-intake/index.html"/>
- <item name="Localization API" href="/fulcrum-localization-api/index.html"/>
- <item name="Localization Impl" href="/fulcrum-localization-impl/index.html"/>
- <item name="Mimetype API" href="/fulcrum-mimetype-api/index.html"/>
- <item name="Mimetype Impl" href="/fulcrum-mimetype-impl/index.html"/>
- <item name="Pool" href="/fulcrum-pool/index.html"/>
- <item name="Pull" href="/fulcrum-pull/index.html"/>
- <!--item name="Scheduler" href="/fulcrum-scheduler/index.html"/-->
- <item name="Security" href="/fulcrum-security/index.html"/>
- <item name="OSWorkflow" href="/fulcrum-osworkflow/index.html"/>
- <item name="OSWorkflow Example" href="/fulcrum-osworkflow-example/index.html"/>
+ <item name="Localization" href="/sites/localization.html" collapse="true">
+ <item name="Localization API" href="/fulcrum-localization-api/index.html"/>
+ <item name="Localization Impl" href="/fulcrum-localization-impl/index.html"/>
+ </item>
+ <item name="Mimetype" href="/sites/mimetype.html" collapse="true">
+ <item name="Mimetype API" href="/fulcrum-mimetype-api/index.html"/>
+ <item name="Mimetype Impl" href="/fulcrum-mimetype-impl/index.html"/>
+ </item>
+ <item name="Naming" href="/fulcrum-naming/index.html"/>
+ <item name="OSWorkflow" href="/sites/osworkflow.html" collapse="true">
+ <item name="OSWorkflow" href="/fulcrum-osworkflow/index.html"/>
+ <item name="OSWorkflow Example" href="/fulcrum-osworkflow-example/index.html"/>
+ </item>
+ <item name="Parser" href="/fulcrum-parser/index.html"/>
+ <item name="Pool" href="/sites/pool.html" collapse="true">
+ <item name="Pool API" href="/fulcrum-pool-api/index.html"/>
+ <item name="Pool Impl" href="/fulcrum-pool-impl/index.html"/>
+ </item>
+ <item name="Security" href="/sites/security.html" collapse="true">
+ <item name="Site" href="/fulcrum-security-site/index.html"/>
+ <item name="Security API" href="/fulcrum-security-api/index.html"/>
+ <item name="Security SPI" href="/fulcrum-security-spi/index.html"/>
+ <item name="Memory Impl" href="/fulcrum-security-memory/index.html"/>
+ <item name="Hibernate Impl" href="/fulcrum-security-hibernate/index.html"/>
+ <item name="NT Impl" href="/fulcrum-security-nt/index.html"/>
+ <item name="Adapter Turbine" href="/fulcrum-security-adapter-turbine/index.html"/>
+ <item name="Adapter OpenSymphony" href="/fulcrum-security-adapter-opensymphony/index.html"/>
+ </item>
+ <item name="Template" href="/fulcrum-template/index.html"/>
+ <item name="Test Container" href="/fulcrum-testcontainer/index.html"/>
+ <item name="Upload" href="/fulcrum-upload/index.html"/>
<item name="XMLRPC" href="/fulcrum-xmlrpc/index.html"/>
+ <item name="XSLT" href="/fulcrum-xslt/index.html"/>
</menu>
<menu name="Howtos (old)">
- <item name="Factory Service" href="/howto/factory-service.html"/>
<item name="JSP Service" href="/howto/jsp-service.html"/>
- <item name="Localization Service" href="/howto/localization-service.html"/>
- <item name="Mimetype Service" href="/howto/mimetype-service.html"/>
- <item name="Naming Service" href="/howto/naming-service.html"/>
- <item name="Pool Service" href="/howto/pool-service.html"/>
- <item name="Scheduler Service" href="/howto/scheduler-service.html"/>
<item name="Template Service" href="/howto/template-service.html"/>
- <item name="Upload Service" href="/howto/upload-service.html"/>
<item name="Velocity Service" href="/howto/velocity-service.html"/>
- <item name="XSLT Service" href="/howto/xslt-service.html"/>
</menu>
</body>
1.13 +2 -1 jakarta-turbine-fulcrum/xdocs/building.xml
Index: building.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/xdocs/building.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- building.xml 12 Feb 2004 11:49:27 -0000 1.12
+++ building.xml 14 Feb 2004 14:29:13 -0000 1.13
@@ -50,7 +50,8 @@
<p>
To build a local copy of the documentation, use 'maven multiproject:site'.
This will build a local copy of the web site in the 'target/docs'
- directory.
+ directory. Note, this uses a LOT of memory. If you can't build all of them,
+ build them individually.
</p>
<subsection name="Current Build Issues">
<p>
1.2 +88 -42 jakarta-turbine-fulcrum/upload/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/upload/xdocs/index.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.xml 13 Feb 2004 14:26:23 -0000 1.1
+++ index.xml 14 Feb 2004 14:29:13 -0000 1.2
@@ -3,21 +3,21 @@
<document>
<properties>
- <title>Template Component</title>
+ <title>Upload Component</title>
<author email="epugh@opensourceconnections.com">Eric Pugh</author>
</properties>
<body>
<section name="Overview">
- <p>
- This Service functions as a Template component.
- </p>
+<p>
+The Upload Service handles the parsing of multi-part/form-data from POST
+Requests, making the multi-part files available from either memory or from a
+specified location on the file system.
+</p>
<p>
- It is written
- for use in Turbine but it can be used in any container compatible
- with Avalon's ECM container.
+ It is written for use in Turbine but it can be used in Avalon compatible container.
</p>
</section>
@@ -30,9 +30,9 @@
<source>
<![CDATA[
<role
- name="org.apache.fulcrum.bsf.BSFService"
+ name="org.apache.fulcrum.upload.UploadService"
shorthand="cache"
- default-class="org.apache.fulcrum.bsf.TurbineBSFService"/>
+ default-class="org.apache.fulcrum.upload.DefaultUploadService"/>
]]>
</source>
@@ -42,53 +42,99 @@
<source>
<![CDATA[
- <cache cacheInitialSize="20" cacheCheckFrequency="5"/>
+ <upload repository="target" sizeMax="1048576" sizeThreshold="10240"/>
]]>
</source>
+ <p>
+sizeMax is the maximum size of a request that will be processed.
+</p>
+ <p>
+sizeThreshold is the maximum size of a request that will have it's elements cached in
+</p>
+
</section>
<section name="Usage">
- <source><![CDATA[
+
+<p>
+Any
+multi-part/form-data requests which Turbine fields, will be parsed and the
+appropriate files made available to ParameterParser as FileItem objects. If
+this is set as false, the FileItems will have to be parsed out of RunData
+manually with the method getRequest() available from TurbineUpload.
+</p>
+
+<p>
+Set the remaining values to ones approriate for your installation. On Win32
+file systems for the repository directive, an entry of the form:
+<ul>
+ <code>f:\path\to\upload\repository</code>
+</ul>
+is most likely necessary.
+</p>
+
+
+<p>
+Create an HTML form of the type:
+</p>
+
+<source test=""><![CDATA[
+
+<form enctype="multipart/form-data" method="POST">
+<input type="hidden" name="action" value="UploadExample" />
+<input type="file" name="filename">
+<input type="submit" value="upload" />
+</form>
+
+]]></source>
+
+<p>
+The Upload Service manages if the FileItem is stored in Memory or in the
+Repository specified in TurbineReources.properties. It is also possible to
+overide the TurbineResources setting for the repository by using
+UploadServiceFacade.getRequest() to parse the request with a custom repository
+directory. The UploadServiceFacade object serves as a Facade to the Upload Service
+by making available static methods to manage the upload internally in your
+application. The FileItems can be accessed in an UploadExample Action class by:
+</p>
- GlobalCacheService gs = null;
- try
+<source test=""><![CDATA[
+ public void doPerform(RunData data, Context context) throws Exception
{
- /*
- * Look for the item in the cache.
- * If it doesn't exist or the item is stale,
- * the cache will throw an exception.
- */
- gs = (GlobalCacheService)avalonComponentService.lookup(GlobalCacheService.ROLE)
+ //get the ParameterParser from RunData
+ ParameterParser params = data.getParameters();
- CachedObject obj = gs.getObject("cached_object");
+ //grab the FileItems available in ParameterParser
+ FileItem fi = params.getFileItem("filename");
- data.setMessage( data.getScreen() + " Got " +
- obj.getContents().toString() + " from global cache!" );
- }
- catch(ObjectExpiredException gone)
- {
- /*
- * Add the item to the cache.
- */
- gs.addObject("cached_object",
- new CachedObject("in_the_cache",5000));
-
- data.setMessage( data.getScreen() +
- " Refreshed/or added new item to" +
- " the cache! Expires in 5 seconds" );
- }
+ //do work on the FileItem
+ //get the file as a File
+ //or outputstream etc.
- ]]></source>
+ }
- <p>
- You can also place an expiration time on your objects so the Service will
- automatically remove them when they expire. If you don't specify an expiration
- time, the Service uses 5 seconds. To see an example, look at the
- test case <a href="xref-test/org/apache/fulcrum/cache/CacheTest.html">CacheTest</a>
- </p>
+]]></source>
+<p>
+Once a new instance of the FileItem is created many public methods are
+available to work on the object, whether it is in temporary storage as memory or as
+a temporary file on part of the file system. All the temporary storage management and
+clean up occurs behind the scenes and is transparent to the application being
+based on Turbine. There is no need to manually clean up the FileItems as the
+FileItem object doesn't span Requests ( or RunData instances ) and the temporary
+files that use the file system are cleaned up in a finalize() method inherited
+from Object().
+</p>
+
+<p>
+The UploadServiceFacade object and the FileItem object give all the functionality
+needed to manage this sort of operation or action at the application level.
+For more detailed information on the methods available to deal with uploaded
+files, view the relevant Javadocs for UploadServiceFacade, ParameterParser and
+FileItem.
+</p>
</section>
</body>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org