|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.util.http.HTTPUploadDownloadTask
Class HTTPUploadDownloadTask
is a generic task class which is a
gathering point for tasks associated with uploading or downloading content from
content holders.
Supported API: true
Extendable: false
Nested Class Summary | |
(package private) class |
HTTPUploadDownloadTask.DownloadContentThread
|
Field Summary | |
private static String |
ALWAYS_OPEN
|
private static String |
ALWAYS_SAVE
|
private ContentHolder |
contentHolder
|
private ThreadGroup |
contextGroup
|
private static boolean |
DEBUG
Flag used to provide debugging messages. |
private FileAccess |
fileAccess
|
private Applet |
parentApplet
|
private Frame |
parentFrame
|
private static String |
RESOURCES
|
private static boolean |
SHOW_CONTENTS
|
private static boolean |
STRUCTURE_DOWNLOAD
|
Constructor Summary | |
HTTPUploadDownloadTask(Applet parent_applet,
Frame parent_frame,
ContentHolder content_holder)
Construct a HTTPUploadDownloadTask to handle the content of a ContentHolder object. |
Method Summary | |
String |
createValidDefaultPath(String path)
|
private void |
downloadDocumentFile(boolean remember)
Download the contents in the ContentHolder being checked out by this task. |
private void |
downloadDocumentFile(boolean remember,
DocumentFormData form_data)
Download the contents in the ContentHolder being checked out by this task. |
void |
downloadFiles(boolean remember)
Performs the actual download. |
void |
downloadFiles(boolean remember,
DocumentFormData form_data)
Performs the actual download. |
String |
downloadPrimaryFile(FormatContentHolder doc,
String upload_from_path)
Provides a convenience method for downloading the primary content from a document. |
ContentHolder |
getContentHolder()
Returns the ContentHolder item. |
private WTContext |
getContext()
|
private FileAccess |
getFileAccess()
|
Applet |
getParentApplet()
Returns the parent Applet which provides context to this task. |
Frame |
getParentFrame()
Returns the Frame which is used as the owner of dialogs
launched in this task. |
boolean |
isDirectory(String path)
|
private HTTPUploadDownload |
loadUploadAddFiles(HTTPUploadDownload upload,
Vector fileVector)
|
private HTTPUploadDownload |
loadUploadAddURLs(HTTPUploadDownload upload,
Vector urlVector)
|
private HTTPUploadDownload |
loadUploadRemoveFiles(HTTPUploadDownload upload,
Vector fileVector)
|
private HTTPUploadDownload |
loadUploadRemoveURLs(HTTPUploadDownload upload,
Vector urlVector)
|
private HTTPUploadDownload |
loadUploadReplaceFiles(HTTPUploadDownload upload,
Vector fileVector)
|
private HTTPUploadDownload |
loadUploadReplaceURLs(HTTPUploadDownload upload,
Vector urlVector)
|
void |
setContentHolder(ContentHolder content_holder)
Sets the ContentHolder item. |
private void |
setContext(boolean set)
|
void |
setParentApplet(Applet parent_applet)
Sets the parent Applet which provides context to this task. |
void |
setParentFrame(Frame parent_frame)
Sets the Frame to be used as the owner of dialogs launched in
this task. |
private void |
showMessageDialog(String message,
Exception e)
|
void |
uploadContentItems(FormatContentHolder document,
Hashtable vectorHashtable,
Applet applet,
Frame frame)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static String RESOURCES
private static boolean DEBUG
private static boolean SHOW_CONTENTS
private static boolean STRUCTURE_DOWNLOAD
private static String ALWAYS_OPEN
private static String ALWAYS_SAVE
private Applet parentApplet
private Frame parentFrame
private ContentHolder contentHolder
private ThreadGroup contextGroup
private FileAccess fileAccess
Constructor Detail |
public HTTPUploadDownloadTask(Applet parent_applet, Frame parent_frame, ContentHolder content_holder)
HTTPUploadDownloadTask
to handle the content of a ContentHolder object.
parent_applet
- The parent Applet
from which this task
gets its context.parent_frame
- The parent Frame
which is used to provide
a Frame
for launching dialogs. If no
frame is provided, the applet is used in launching
dialogs.Method Detail |
public void setParentApplet(Applet parent_applet)
Applet
which provides context to this task. The
parent Applet
is used to get the appropriate WTContext
object for this task.
parent_applet
- the Applet
to be used for contextgetParentApplet()
,
WTContext
public Applet getParentApplet()
Applet
which provides context to this task.
The parent Applet
is used to get the appropriate WTContext
object for this task.
Applet
used for providing contextsetParentApplet(java.applet.Applet)
,
WTContext
public void setParentFrame(Frame parent_frame)
Frame
to be used as the owner of dialogs launched in
this task. Since a Dialog
requires a Frame
to
be constructed, this task must be given a frame to use.
parent_frame
- the Frame
used for launching dialogs
from this taskgetParentFrame()
,
Dialog
public Frame getParentFrame()
Frame
which is used as the owner of dialogs
launched in this task. If the parent frame has not been explicitly
set (via setParentFrame
), this method will try to retrieve
a frame by traversing the parent hierarchy of the parent applet, if the
parent applet has been given.
Frame
used for launching dialogs from
this tasksetParentFrame(java.awt.Frame)
,
setParentApplet(java.applet.Applet)
public void setContentHolder(ContentHolder content_holder) throws WTException
ContentHolder
item. This method does
not verify that the given ContentHolder
corresponds to an
object that has content.
content_holder
- the ContentHolder
object to be checked out
WTException
public ContentHolder getContentHolder()
ContentHolder
item.
ContentHolder
itemsetContentHolder(wt.content.ContentHolder)
public void downloadFiles(boolean remember) throws PropertyVetoException, WTException
ContentHolder
object to have the content downloaded.
PropertyVetoException
WTException
ContentHolder
,
FormatContentHolder
public void downloadFiles(boolean remember, DocumentFormData form_data) throws PropertyVetoException, WTException
ContentHolder
object to have the content downloaded.
PropertyVetoException
WTException
ContentHolder
,
FormatContentHolder
private void downloadDocumentFile(boolean remember) throws PropertyVetoException, WTException, InterruptedException
PropertyVetoException
- if an error occurs downloading the
content.
WTException
- if an error occurs downloading the
content.
InterruptedException
- if an error occurs downloading the
content.private void downloadDocumentFile(boolean remember, DocumentFormData form_data) throws PropertyVetoException, WTException, InterruptedException
PropertyVetoException
- if an error occurs downloading the
content.
WTException
- if an error occurs downloading the
content.
InterruptedException
- if an error occurs downloading the
content.private WTContext getContext()
private void setContext(boolean set)
private void showMessageDialog(String message, Exception e)
public String downloadPrimaryFile(FormatContentHolder doc, String upload_from_path) throws WTException
WTException
public void uploadContentItems(FormatContentHolder document, Hashtable vectorHashtable, Applet applet, Frame frame) throws WTException
WTException
private HTTPUploadDownload loadUploadAddFiles(HTTPUploadDownload upload, Vector fileVector)
private HTTPUploadDownload loadUploadRemoveFiles(HTTPUploadDownload upload, Vector fileVector)
private HTTPUploadDownload loadUploadReplaceFiles(HTTPUploadDownload upload, Vector fileVector)
private HTTPUploadDownload loadUploadAddURLs(HTTPUploadDownload upload, Vector urlVector)
private HTTPUploadDownload loadUploadRemoveURLs(HTTPUploadDownload upload, Vector urlVector)
private HTTPUploadDownload loadUploadReplaceURLs(HTTPUploadDownload upload, Vector urlVector)
private FileAccess getFileAccess()
public String createValidDefaultPath(String path)
public boolean isDirectory(String path)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |