| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.authoring.UploadHelper
public class UploadHelper
Helper class for uploading files.
| Constructor Summary | |
|---|---|
UploadHelper(java.io.File directory)
Ctor.  | 
|
UploadHelper(java.lang.String directoryPath)
Ctor.  | 
|
| Method Summary | |
|---|---|
 boolean | 
save(org.apache.cocoon.servlet.multipart.Part part)
Save uploaded file  | 
 boolean | 
save(org.apache.cocoon.servlet.multipart.Part part,
     java.io.File file)
Save uploaded file  | 
 java.io.File | 
save(org.apache.cocoon.environment.Request request,
     java.lang.String requestParameter)
Saves the a file the request for a certain request parameter name.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public UploadHelper(java.io.File directory)
directory - The directory to save the files to.public UploadHelper(java.lang.String directoryPath)
directoryPath - The path of the directory to save the files to.| Method Detail | 
|---|
public boolean save(org.apache.cocoon.servlet.multipart.Part part)
part - The part of the multipart request.
true if the upload succeeded, false otherwise.
public boolean save(org.apache.cocoon.servlet.multipart.Part part,
                    java.io.File file)
part - The part of the multipart request.
true if the upload succeeded, false otherwise.
public java.io.File save(org.apache.cocoon.environment.Request request,
                         java.lang.String requestParameter)
                  throws java.lang.Exception
request - The request.requestParameter - The name of the <input type="file"/> request parameter value.
null if the upload was not successful.
java.lang.Exception - when something went wrong.
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||