wt.clients.util.http
Class HTTPUploadDownloadApplet

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended bywt.clients.util.http.HTTPUploadDownloadApplet
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class HTTPUploadDownloadApplet
extends Applet

Applet for uploading and downloading files via HTTP. This applet accepts several initialization parameters. All params are optional.

 <param	name="hosturl"         value="http://www.somewhere.com/somedir/index.html">
<param name="type" value="FILE" or "URL">
<param name="target" value="e:\abcd\efgh\file.txt" or "www.url.com">
<param name="mode" value="UPLOAD" or "DOWNLOAD"> default is "UPLOAD"
<param name="defaultfile" value="*.*">
<param name="debug" value="TRUE" or "FALSE"> default is "FALSE"


Supported API:false

Extendable:false

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.applet.Applet
Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int DOWNLOAD
          Deprecated. Download mode indicator.
(package private)  HTTPUploadDownloadPanel hTTPUploadDownloadPanel1
          Deprecated.  
static int TARGET_TYPE_FILE
          Deprecated. Target type indicator for files.
static int TARGET_TYPE_URL
          Deprecated. Target type indicator for urls.
static int UPLOAD
          Deprecated. Upload mode indicator
 
Fields inherited from class java.applet.Applet
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
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
HTTPUploadDownloadApplet()
          Deprecated.  
 
Method Summary
 void addHTTPUploadDownloadListener(HTTPUploadDownloadListener l)
          Deprecated. Add listeners to upload and download events.
 void clear()
          Deprecated.  
 String getDefaultFilename()
          Deprecated. Return the default file name.
 boolean getGlobalOverwriteWarning()
          Deprecated.  
 String getHostURL()
          Deprecated. Return the host url.
 int getHTTPResponseCode()
          Deprecated.  
 int getMode()
          Deprecated. Return the file upload download model.
 int getOperationFailureCode()
          Deprecated.  
 int getOperationStatus()
          Deprecated. Return the most recent status.
 String getOperationStatusMessage()
          Deprecated. Return a user readable status message.
private  String getParameter(String paramName, String defaultParamValue)
          Deprecated.  
 String getTarget()
          Deprecated. Return the target path or url.
 int getTargetType()
          Deprecated. Return the target type to file or url.
 void init()
          Deprecated.  
 void performOperation()
          Deprecated. Perform the upload or download operation indicated by the mode property.
 void removeHTTPUploadDownloadListener(HTTPUploadDownloadListener l)
          Deprecated. Remove upload/download listener.
 void setDefaultFilename(String defaultName)
          Deprecated. Set the default file name.
 void setGlobalOverwriteWarning(boolean newValue)
          Deprecated.  
 boolean setHostURL(String urlString)
          Deprecated. Set the host url.
 void setMode(int mode)
          Deprecated. Set the file upload or download mode.
 void setTarget(String target)
          Deprecated. Set the target path or url.
 void setTargetType(int targetType)
          Deprecated. Set the target path or url.
protected  void setTargetType(String targetType)
          Deprecated. Set the target path or url with a string argument.
 
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, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, 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, 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, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UPLOAD

public static final int UPLOAD
Deprecated. 
Upload mode indicator

See Also:
Constant Field Values

DOWNLOAD

public static final int DOWNLOAD
Deprecated. 
Download mode indicator.

See Also:
Constant Field Values

TARGET_TYPE_FILE

public static final int TARGET_TYPE_FILE
Deprecated. 
Target type indicator for files.

See Also:
Constant Field Values

TARGET_TYPE_URL

public static final int TARGET_TYPE_URL
Deprecated. 
Target type indicator for urls.

See Also:
Constant Field Values

hTTPUploadDownloadPanel1

HTTPUploadDownloadPanel hTTPUploadDownloadPanel1
Deprecated. 
Constructor Detail

HTTPUploadDownloadApplet

public HTTPUploadDownloadApplet()
Deprecated. 
Method Detail

init

public void init()
Deprecated. 

getHostURL

public String getHostURL()
Deprecated. 
Return the host url.


setHostURL

public boolean setHostURL(String urlString)
Deprecated. 
Set the host url.

Returns:
true if valid url, false otherwise.

getTargetType

public int getTargetType()
Deprecated. 
Return the target type to file or url.


setTargetType

public void setTargetType(int targetType)
Deprecated. 
Set the target path or url.

Parameters:
targetType - TARGET_TYPE_FILE or TARGET_TYPE_URL.

setTargetType

protected void setTargetType(String targetType)
Deprecated. 
Set the target path or url with a string argument.

Parameters:
targetType - TARGET_TYPE_FILE or TARGET_TYPE_URL.

getTarget

public String getTarget()
Deprecated. 
Return the target path or url.


setTarget

public void setTarget(String target)
Deprecated. 
Set the target path or url.

Parameters:
target - The target path, e.g. "E:\abcd\test.txt" or "E:\abcd\*.txt", or url.

getMode

public int getMode()
Deprecated. 
Return the file upload download model.


setMode

public void setMode(int mode)
Deprecated. 
Set the file upload or download mode.

Parameters:
mode - UploadDownload.DOWNLOAD or UploadDownload.UPLOAD.

getDefaultFilename

public String getDefaultFilename()
Deprecated. 
Return the default file name.


setDefaultFilename

public void setDefaultFilename(String defaultName)
Deprecated. 
Set the default file name. This value is used to initialize the browse dialog when no file name is supplied.


getGlobalOverwriteWarning

public boolean getGlobalOverwriteWarning()
Deprecated. 

setGlobalOverwriteWarning

public void setGlobalOverwriteWarning(boolean newValue)
Deprecated. 

performOperation

public void performOperation()
Deprecated. 
Perform the upload or download operation indicated by the mode property.

Returns:
true if the operation was started, false otherwise.

getOperationStatus

public int getOperationStatus()
Deprecated. 
Return the most recent status.


getOperationStatusMessage

public String getOperationStatusMessage()
Deprecated. 
Return a user readable status message.


getOperationFailureCode

public int getOperationFailureCode()
Deprecated. 

getHTTPResponseCode

public int getHTTPResponseCode()
Deprecated. 

clear

public void clear()
Deprecated. 

addHTTPUploadDownloadListener

public void addHTTPUploadDownloadListener(HTTPUploadDownloadListener l)
Deprecated. 
Add listeners to upload and download events.

See Also:
UploadDownloadEvent

removeHTTPUploadDownloadListener

public void removeHTTPUploadDownloadListener(HTTPUploadDownloadListener l)
Deprecated. 
Remove upload/download listener.


getParameter

private String getParameter(String paramName,
                            String defaultParamValue)
Deprecated.