Package | Description |
---|---|
wjhk.jupload2.context | |
wjhk.jupload2.exception |
Some application specific exceptions.
|
wjhk.jupload2.filedata |
This package allows you to change the file relative behaviour: this page describes how to override the
default behaviour, to fullfill your needs (for instance add data compression, preload check, new data
about files in the upload to the server..
|
wjhk.jupload2.filedata.helper | |
wjhk.jupload2.gui |
Implementation of caching and special algorithms for various file types.
|
wjhk.jupload2.gui.filepanel.treeview | |
wjhk.jupload2.policies |
This package contains the upload policies: they give you hook entry points, to override the default applet behaviour
with a minimum of java code.
|
wjhk.jupload2.upload |
This package contains the code that actually executes the upload (see below for a full description of the way the upload
is executed in the JUpload code).
|
wjhk.jupload2.upload.helper |
Modifier and Type | Method and Description |
---|---|
UploadPolicy |
JUploadContext.getUploadPolicy()
This method the current UploadPolicy, associated with the current execution context.
|
UploadPolicy |
DefaultJUploadContext.getUploadPolicy()
Retrieves the current upload policy.
|
String |
JUploadContextExecutable.normalizeURL(String url)
This class doesn't control the URL.
|
String |
JUploadContextApplet.normalizeURL(String url)
Generates a valid URL, from a String.
|
String |
JUploadContext.normalizeURL(String url)
Generates a valid URL, from a String.
|
String |
DefaultJUploadContext.normalizeURL(String url)
Just throws a UnsupportedOperationException exception.
|
Modifier and Type | Class and Description |
---|---|
class |
JUploadEOFException
This error is thrown, when the socket used to read bytes from the server is
closed.
|
class |
JUploadExceptionStopAddingFiles
This exception is a trick, to stop adding files to the file list, when too
many files don't match the allowed extension (see
wjhk.jupload2.gui.FilePanelDataModel2#addFile(File, File)), or any
other control of the current upload policy (see
UploadPolicy#createFileData(File, File) . |
class |
JUploadExceptionTooBigFile
This exception indicates, that the file that is to be uploaded is too big.
|
class |
JUploadExceptionUploadFailed
This exception occurs when an upload failed.
|
class |
JUploadExceptionUploadFailedSuccessNotFound |
class |
JUploadIOException
This class should be used for all implementations of FileData or UploadPolicy
that want to throw an IO exception, and need to be conform with the interface
definition.
|
Modifier and Type | Method and Description |
---|---|
void |
PictureFileData.beforeUpload(String uploadFileRoot)
If this pictures needs transformation, a temporary file is created.
|
void |
FileData.beforeUpload(String uploadFileRoot)
Prepare the fileData to upload.
|
void |
DefaultFileData.beforeUpload(String uploadFileRoot)
Prepare the fileData to upload.
|
void |
DefaultFileData.calculateMD5Sum()
Calculate the MD5Sum for the transformed file, or the original if no transformation should be done on the file,
before upload.
|
Image |
PictureFileData.getImage(Canvas canvas,
boolean shadow)
This method creates a new Image, from the current picture.
|
static ImageIcon |
PictureFileData.getImageIcon(File pictureFile,
int maxWidth,
int maxHeight,
UploadPolicy uploadPolicy)
Returns an ImageIcon for the given file, resized according to the given dimensions.
|
InputStream |
PictureFileData.getInputStream()
This function create an input stream for this file.
|
InputStream |
FileData.getInputStream()
This function creates an InputStream from this file.
|
InputStream |
DefaultFileData.getInputStream()
This function creates an InputStream from this file.
|
String |
FileData.getMD5()
Retrieves the MD5 sum of the file.
|
String |
DefaultFileData.getMD5()
Retrieves the MD5 sum of the file.
|
Modifier and Type | Method and Description |
---|---|
BufferedImage |
ImageHelper.getBufferedImage(boolean highquality,
BufferedImage sourceBufferedImage)
This function resizes the picture, if necessary, according to the maxWidth and maxHeight, given to the
ImageHelper constructor.
|
boolean |
ImageHelper.hasToTransformPicture()
This function indicate if the picture has to be modified.
|
Constructor and Description |
---|
ImageFileConversionInfo(String conversionList)
will build a new ImageFileConversionInfo object for the given
conversionList.
|
Constructor and Description |
---|
DialogUploadRetry(Frame owner,
JUploadException juploadException,
int numRetry,
UploadPolicy uploadPolicy)
Creates a new instance.
|
Constructor and Description |
---|
DialogUploadRetry(Frame owner,
JUploadException juploadException,
int numRetry,
UploadPolicy uploadPolicy)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
FolderNode.beforeUpload(String uploadPathRoot)
Prepare the fileData to upload.
|
void |
FileDataNode.beforeUpload(String uploadFileRoot) |
InputStream |
FolderNode.getInputStream()
This function creates an InputStream from this file.
|
InputStream |
FileDataNode.getInputStream() |
String |
FolderNode.getMD5()
Retrieves the MD5 sum of the file.
|
String |
FileDataNode.getMD5() |
Modifier and Type | Method and Description |
---|---|
JUploadException |
UploadPolicy.getLastException()
Indicates that an error occurs.
|
JUploadException |
DefaultUploadPolicy.getLastException() |
Modifier and Type | Method and Description |
---|---|
void |
DefaultUploadPolicy.setLastException(JUploadException exception)
Set the last exception.
|
Modifier and Type | Method and Description |
---|---|
void |
UploadPolicy.afterUpload(Exception e,
String serverOutput)
This method is called after an upload, whether it is successful or not.
|
void |
DefaultUploadPolicy.afterUpload(Exception e,
String serverOutput) |
void |
CoppermineUploadPolicy.afterUpload(Exception e,
String serverOutput) |
boolean |
UploadPolicy.checkUploadSuccess(int status,
String msg,
String body)
This method returns true, if upload is a success.
|
boolean |
DefaultUploadPolicy.checkUploadSuccess(int status,
String msg,
String body)
The default behavior (see
DefaultUploadPolicy ) is to check that the stringUploadSuccess applet parameter
is present in the response from the server. |
boolean |
CoppermineUploadPolicy.checkUploadSuccess(int status,
String msg,
String body) |
protected String |
DefaultUploadPolicy.getEncodedFilename(String filename)
returns the filename and encodes it, if necessary
|
String |
UploadPolicy.getUploadFilename(FileData fileData,
int index)
Get the original name of the file on the disk.
|
String |
PictureUploadPolicy.getUploadFilename(FileData fileData,
int index) |
String |
DefaultUploadPolicy.getUploadFilename(FileData fileData,
int index) |
String |
UploadPolicy.getUploadName(FileData fileData,
int index)
Get an upload filename, that is to be send in the HTTP upload request.
|
String |
DefaultUploadPolicy.getUploadName(FileData fileData,
int index) |
protected void |
DefaultUploadPolicy.setAfterUploadURL(String afterUploadURL)
|
protected void |
DefaultUploadPolicy.setHttpUploadParameterName(String httpUploadParameterName)
Setter for the
DefaultUploadPolicy.httpUploadParameterName . |
protected void |
DefaultUploadPolicy.setHttpUploadParameterType(String httpUploadParameterType)
Setter for the
DefaultUploadPolicy.httpUploadParameterType . |
protected void |
DefaultUploadPolicy.setNbFilesPerRequest(int nbFilesPerRequest) |
void |
UploadPolicy.setPostURL(String postURL)
The URL can change during the life of our policy ...
|
void |
DefaultUploadPolicy.setPostURL(String postURL) |
void |
UploadPolicy.setProperty(String prop,
String value)
This allow runtime modifications of properties.
|
void |
PictureUploadPolicy.setProperty(String prop,
String value)
This method manages the applet parameters that are specific to this class.
|
void |
DefaultUploadPolicy.setProperty(String prop,
String value)
This method manages all applet parameters.
|
void |
CoppermineUploadPolicy.setProperty(String prop,
String value)
This method only handles the albumId parameter, which is the only
applet parameter that is specific to this class.
|
protected void |
DefaultUploadPolicy.setSslVerifyCert(String mode) |
protected void |
DefaultUploadPolicy.setStringUploadError(String stringUploadError) |
protected void |
DefaultUploadPolicy.setStringUploadSuccess(String stringUploadSuccess) |
protected void |
DefaultUploadPolicy.setStringUploadWarning(String stringUploadWarning) |
void |
UploadPolicy.setUrlToSendErrorTo(String urlToSendErrorTo) |
void |
DefaultUploadPolicy.setUrlToSendErrorTo(String urlToSendErrorTo) |
Constructor and Description |
---|
AAFUploadPolicy(JUploadContext juploadContext) |
CoppermineUploadPolicy(JUploadContext juploadContext) |
CustomizedNbFilesPerRequestUploadPolicy(JUploadContext theContext)
Deprecated.
|
DefaultUploadPolicy(JUploadContext juploadContext)
The main constructor : use default values, and the given postURL.
|
FileByFileUploadPolicy(JUploadContext juploadContext)
Deprecated.
|
FilesTogetherUploadPolicy(JUploadContext juploadContext)
The JUpload constructor for this upload policy.
|
PictureUploadPolicy(JUploadContext juploadContext)
The standard constructor, which transmit most informations to the super.Constructor().
|
SilverpeasUploadPolicy(JUploadContext juploadContext)
The JUpload constructor for this upload policy.
|
SuperSimpleUploadPolicy(JUploadContext juploadContext)
The main constructor : use default values, and the given postURL.
|
Modifier and Type | Method and Description |
---|---|
JUploadException |
FileUploadManagerThreadImpl.getUploadException() |
JUploadException |
FileUploadManagerThread.getUploadException()
Get the last upload exception that occurs.
|
Modifier and Type | Method and Description |
---|---|
void |
FileUploadManagerThreadImpl.setUploadException(JUploadException uploadExceptionParam) |
void |
FileUploadManagerThread.setUploadException(JUploadException uploadException)
Stores the last upload exception that occurs.
|
Modifier and Type | Method and Description |
---|---|
void |
FileUploadManagerThreadImpl.anotherFileHasBeenSent(UploadFilePacket uploadFilePacket,
UploadFileData newlyUploadedFileData) |
void |
FileUploadManagerThread.anotherFileHasBeenSent(UploadFilePacket uploadFilePacket,
UploadFileData newlyUploadedFileData)
This method is called each time a new file is sent to the server.
|
void |
UploadFileData.beforeUpload(String uploadFileRoot)
Prepare the fileData to upload.
|
void |
FileUploadManagerThreadImpl.currentRequestIsFinished(UploadFilePacket uploadFilePacket) |
void |
FileUploadManagerThread.currentRequestIsFinished(UploadFilePacket packet)
This method is called when the server response for the upload indicates a
success.
|
InputStream |
UploadFileData.getInputStream()
This function creates an InputStream from this file.
|
String |
UploadFileData.getMD5()
Retrieves the MD5 sum of the file.
|
String |
UploadFileData.getUploadFilename(int index)
Retrieves the file name, that should be used in the server application.
|
String |
UploadFileData.getUploadName(int index)
Retrieves the upload file name, that should be sent to the server.
|
void |
FileUploadManagerThreadImpl.nbBytesUploaded(long nbBytes,
UploadFileData uploadFileData) |
void |
FileUploadManagerThread.nbBytesUploaded(long nbBytes,
UploadFileData uploadFileData)
Used by the UploadFileData#uploadFile(java.io.OutputStream, long) for
each uploaded buffer
|
void |
FileUploadThread.setFileUploadThreadManager(FileUploadManagerThread fileUploadManagerThread)
Changes the FileUploadManagerThread.
|
void |
DefaultFileUploadThread.setFileUploadThreadManager(FileUploadManagerThread fileUploadManagerThread)
Changes the FileUploadManagerThread.
|
void |
FileUploadManagerThreadImpl.setUploadStatus(UploadFilePacket uploadFilePacket,
UploadFileData uploadFileData,
int uploadStatus) |
void |
FileUploadManagerThread.setUploadStatus(UploadFilePacket uploadFilePacket,
UploadFileData uploadFileData,
int uploadStatus)
Indicate the current state of the upload, to allow a correct display of
UPLOAD_STATUS_UPLOADED status. the upload progress bar.
|
Constructor and Description |
---|
FileUploadManagerThreadImpl(UploadPolicy uploadPolicy)
Standard constructor of the class.
|
FileUploadThreadFTP(UploadPolicy uploadPolicy,
BlockingQueue<UploadFilePacket> packetQueue,
FileUploadManagerThread fileUploadManagerThread)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
ProgressBarManager.anotherFileHasBeenSent(UploadFilePacket uploadFilePacket,
UploadFileData uploadFileData)
Called when a new file is uploaded.
|
String |
HttpConnect.getProtocol()
Retrieve the protocol to be used for the postURL of the current policy.
|
void |
ProgressBarManager.nbBytesUploaded(long nbBytes,
UploadFileData uploadFileData)
The progressBar is updated each 50ms and each 10% of the target file.
|
int |
HTTPInputStreamReader.readHttpResponse()
The main method: reads the response in the input stream.
|
int |
HTTPConnectionHelper.readHttpResponse()
Read the response of the server.
|
static byte[] |
HTTPInputStreamReader.readLine(PushbackInputStream inputStream,
boolean includeCR)
Similar like BufferedInputStream#readLine() but operates on raw bytes.
|
static String |
HTTPInputStreamReader.readLine(PushbackInputStream inputStream,
String charset,
boolean includeCR)
Similar like BufferedInputStream#readLine() but operates on raw bytes.
|
void |
ProgressBarManager.setUploadStatus(UploadFilePacket uploadFilePacket,
UploadFileData uploadFileData,
int uploadStatus) |
void |
ProgressBarManager.uploadIsStarted() |
Copyright © 2015. All rights reserved.