|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
com.scand.vault.VaultApplet
public class VaultApplet
Vault applet provides batch file uploading/downloading capabilities together with related file manipulation routines.
It has user friendly interface, displays a progress bar during time consuming upload/download process and has warning/error messages system to inform the user about any collisions.
User has a possibility to add/remove files to the batch list, rename files and folders, cancel current job.
User may select files from both local and network-mapped folders, optionally including all sub-folders.
Aditionally, he can enter any valid network path and browse it in the file selection dialog.
File transfer works over http, SSL (https) with or without proxy. This is achieved by using browser's native connection classes.
And the most attractive fieature is the possibility to upload huge files (unlimited file size) with no timeouts or memory lacks (known java bug).
We use all available network traffic, so the transfer will go as fast as your LAN/WAN allows.
You can submit your form data together with the file. It is usually required to send the state information back to the server.
What else can I do with Vault applet that I can't with a usual FILE form input field? - Well, you can control, filter and preprocess the file list that user has selected. You can enable or disable to transfer some file types basing on your application logic, and you can collect additional information related to those files. And finally, you don't need to reload your page while you transferring the files.
We use the standard "multipart/form-data" content encoding, so the applet is compatible with any server-side uploading component. The quality of the server-side component as well as the hard-drive performance will also affect the resulting transfer rate.
| Field Summary | |
|---|---|
static java.lang.String |
pACTIONBUTTONLABEL
Applet parameter. |
static java.lang.String |
pBGCOLOR
Applet parameter. |
static java.lang.String |
pCHUNKSIZE
Applet parameter. |
static java.lang.String |
pDESTINATION
Applet parameter. |
static java.lang.String |
pDISABLEADDBUTTON
Applet parameter. |
static java.lang.String |
pMODE
Applet parameter. |
static java.lang.String |
pONBUTTONCLICK
Applet parameter. |
static java.lang.String |
pONEDIALOG
Applet parameter. |
static java.lang.String |
pSHOWMAP
Applet parameter. |
static java.lang.String |
pSTOPONERROR
Applet parameter. |
static java.lang.String |
pUPLOADERDOC
Applet parameter. |
static java.lang.String |
pWORKINGDIR
Applet parameter. |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
VaultApplet()
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Internal method. |
void |
addFilesToDownloadList(java.lang.String fileUrlList,
java.lang.String displayNameList,
java.lang.String separator)
Add the specified list of files' URLs to the download list. |
void |
addFileToDownloadList(java.lang.String fileUrl,
java.lang.String displayName)
Add the specified file URL to the download list. |
void |
addToSelection(java.lang.String path)
Adds the specified file or folder to the selection. |
void |
clearClientData()
Clear all userdata values. |
void |
clearDownloadList()
Clear the download list. |
static boolean |
createNewFolder(java.lang.String path)
Internal method. |
void |
downloadFiles(boolean doSelectFolder)
Programmatically start the download process. |
java.lang.String |
getAllItems()
To get all rows in the applet, pipe | delimited. |
java.lang.String |
getClientData(java.lang.String name)
Get userdata (form fields) for uploading. |
java.lang.String |
getDelimiter()
Get the delimiter used to separate files in the file lists. |
java.lang.String |
getDownloadReport()
Get the download report. |
java.lang.String |
getFolderStructure(java.lang.String path)
Returns the content of the specified folder with all sub-folders. |
java.awt.Frame |
getFrame()
Internal method. |
java.lang.String |
getLastError()
Get the error message from the last operation. |
java.lang.String |
getResponse()
Returns the Response property, which is set with the server response data from the upload() method call. |
java.lang.String |
getSaveAsItem(java.lang.String fileUrl)
To get "save as" column in the applet, pass fileUrl not the displayName. |
java.lang.String |
getSaveAsItems()
To get "save as" column in the applet, pipe | delimited. |
java.lang.String |
getSelectedItems()
To get the highlighted rows in the applet, pipe | delimited. |
java.lang.String |
getWorkingDir()
Get applet's current working directory (where files are to be downloaded into). |
void |
init()
Internal method. |
static boolean |
isWin()
|
boolean |
mkDir(java.lang.String dir)
Creates a directory structure on the local file system. |
void |
removeFromSelection(java.lang.String path)
Removes the specified file or folder from the selection. |
void |
setClientData(java.lang.String name,
java.lang.String value)
Set userdata (form fields) for uploading. |
void |
setDelimiter(java.lang.String delim)
Set the delimiter used to separate files in the file lists. |
void |
setDownloadBaseURL(java.lang.String strUrl)
Define the base URL, so the applet can build the relative directory structure. |
void |
setSaveAsItem(java.lang.String fileUrl,
java.lang.String saveAs)
To set "save as" column in the applet, pass fileUrl not the displayName. |
void |
setUploaderDoc(java.lang.String doc)
Sets the server side uploader document name. |
boolean |
setWorkingDir(java.lang.String dir)
Sets the local working directory for the applet (where files are to be downloaded into). |
void |
showInline(java.awt.Panel p,
boolean f)
Internal method. |
void |
start()
Internal method. |
void |
stop()
Internal method. |
void |
stopDownload()
Cancel the curent download. |
void |
upload()
Uploads the selected files to the server. |
| Methods inherited from class java.applet.Applet |
|---|
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
| Methods inherited from class java.awt.Panel |
|---|
addNotify |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String pWORKINGDIR
public static final java.lang.String pBGCOLOR
public static final java.lang.String pONBUTTONCLICK
public static final java.lang.String pMODE
public static final java.lang.String pACTIONBUTTONLABEL
public static final java.lang.String pDISABLEADDBUTTON
public static final java.lang.String pCHUNKSIZE
public static final java.lang.String pUPLOADERDOC
public static final java.lang.String pONEDIALOG
public static final java.lang.String pDESTINATION
public static final java.lang.String pSTOPONERROR
public static final java.lang.String pSHOWMAP
| Constructor Detail |
|---|
public VaultApplet()
| Method Detail |
|---|
public void start()
start in class java.applet.Appletpublic static boolean isWin()
public void stop()
stop in class java.applet.Appletpublic void init()
init in class java.applet.Appletpublic java.awt.Frame getFrame()
public void showInline(java.awt.Panel p,
boolean f)
public java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delim)
public java.lang.String getResponse()
public java.lang.String getLastError()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic java.lang.String getFolderStructure(java.lang.String path)
path - folder path, example - C:\Temppublic void addToSelection(java.lang.String path)
public void removeFromSelection(java.lang.String path)
public java.lang.String getSelectedItems()
public java.lang.String getAllItems()
public java.lang.String getSaveAsItems()
public java.lang.String getSaveAsItem(java.lang.String fileUrl)
public void setSaveAsItem(java.lang.String fileUrl,
java.lang.String saveAs)
public void setUploaderDoc(java.lang.String doc)
public void upload()
public void setClientData(java.lang.String name,
java.lang.String value)
public java.lang.String getClientData(java.lang.String name)
public void clearClientData()
public boolean setWorkingDir(java.lang.String dir)
pWORKINGDIR parameter.
dir - is a fully qualified path to a directory on the local file system.
public java.lang.String getWorkingDir()
public boolean mkDir(java.lang.String dir)
public static boolean createNewFolder(java.lang.String path)
public void setDownloadBaseURL(java.lang.String strUrl)
public void addFileToDownloadList(java.lang.String fileUrl,
java.lang.String displayName)
public void addFilesToDownloadList(java.lang.String fileUrlList,
java.lang.String displayNameList,
java.lang.String separator)
public void clearDownloadList()
public void downloadFiles(boolean doSelectFolder)
public java.lang.String getDownloadReport()
public void stopDownload()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||