|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.vc.CheckOutTask
Class CheckOutTask
is a generic task class which performs the
checking out of a Workable
object. To perform a check-out of an
object, this class only needs to be given a parent Applet
, which
provides context, a Frame
to parent dialogs launched in the
check-out task, the Folder
in which to place the working copy of
the checked out object and the Workable
object to be checked out:
CheckOutTask checkout_task = new CheckInTask( my_applet, my_frame, checkout_folder, checked_out_obj ); checkout_task.checkout();
Workable
Nested Class Summary | |
(package private) class |
CheckOutTask.CheckOutThread
|
Field Summary | |
private Folder |
checkoutFolder
|
private Workable |
checkoutItem
|
private ThreadGroup |
contextGroup
|
private static boolean |
DEBUG
Flag used to provide debugging messages. |
private WTPreferences |
downloadPreferences
|
private Applet |
parentApplet
|
private Frame |
parentFrame
|
private static String |
PREF_KEY_DOWNLOADOPTYPE
|
private static String |
PREF_KEY_SKIPDOWNLOAD
|
private static String |
PREF_KEY_WORKSPACEPATH
|
private static String |
PREF_NODE
|
private static ResourceBundle |
resources
|
private static String |
RESOURCES
|
private static boolean |
SHOW_CONTENTS
|
private boolean |
threadCompleted
|
private Exception |
threadException
|
private Object |
threadLock
|
private boolean |
threadSuccessful
|
private static String |
versionID
|
Constructor Summary | |
CheckOutTask(Applet parent_applet,
Frame parent_frame,
Folder checkout_folder)
Construct a CheckOutTask to handle the checkout of a Workable object. |
Method Summary | |
Workable |
checkout()
Performs the actual check-out of the item to be checked out. |
private void |
dispatchRefreshEvent(Object obj,
int action)
|
Folder |
getCheckoutFolder()
Returns the Folder in which the working copy of the
checked out object is to be placed. |
Workable |
getCheckoutItem()
Returns the Workable item checked out by this task. |
private WTContext |
getContext()
|
private String |
getIdentity(Object obj)
|
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. |
private String |
getPreferenceValue(String key,
String defaultValue)
|
private void |
initResources()
|
private boolean |
isCheckoutAllowed(Workable checkout_item)
|
private WTPreferences |
retrievePreferences(String node)
|
void |
setCheckoutFolder(Folder checkout_folder)
Sets the Folder in which to place the working copy
of the checked out object. |
void |
setCheckoutItem(Workable checkout_item)
Sets the Workable item to be checked out. |
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String versionID
private static String RESOURCES
private static ResourceBundle resources
private static boolean DEBUG
private static boolean SHOW_CONTENTS
private static String PREF_NODE
private static String PREF_KEY_SKIPDOWNLOAD
private static String PREF_KEY_DOWNLOADOPTYPE
private static String PREF_KEY_WORKSPACEPATH
private Applet parentApplet
private Frame parentFrame
private Folder checkoutFolder
private Workable checkoutItem
private ThreadGroup contextGroup
private Object threadLock
private boolean threadCompleted
private boolean threadSuccessful
private Exception threadException
private WTPreferences downloadPreferences
Constructor Detail |
public CheckOutTask(Applet parent_applet, Frame parent_frame, Folder checkout_folder)
CheckOutTask
to handle the checkout of a Workable 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.checkout_folder
- The folder into which the working copy of the checked out
it is placed. If no checkout folder is provided, the
checkout folder returned by
CheckInOutTaskLogic.getCheckoutFolder()
is used.Workable
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 setCheckoutFolder(Folder checkout_folder)
Folder
in which to place the working copy
of the checked out object.
checkout_folder
- the Folder
in which to
place the working copyFolder
public Folder getCheckoutFolder()
Folder
in which the working copy of the
checked out object is to be placed.
Folder
in which the working copy is to
be placedFolder
public void setCheckoutItem(Workable checkout_item) throws CheckedOutByOtherException, AlreadyCheckedOutException, WTException
Workable
item to be checked out. This method does
not verify that the given Workable
corresponds to an
object that is available to be checked out.
checkout_item
- the Workable
object to be checked out
CheckedOutByOtherException
AlreadyCheckedOutException
WTException
getCheckoutItem()
,
Workable
public Workable getCheckoutItem()
Workable
item checked out by this task.
Workable
item checked out by this tasksetCheckoutItem(wt.vc.wip.Workable)
,
Workable
public Workable checkout()
FormatContentHolder
object, and the object currently has content files associated with it, this
method gives the user the opportunity to download those content files. Any
files chosen for download are marked as having an intent to change.
Workable
object to be checked outFormatContentHolder
,
Workable
private void initResources()
private boolean isCheckoutAllowed(Workable checkout_item) throws WorkInProgressException, WTException
WorkInProgressException
WTException
private WTContext getContext()
private void setContext(boolean set)
private void showMessageDialog(String message)
private void dispatchRefreshEvent(Object obj, int action)
private String getIdentity(Object obj)
private String getPreferenceValue(String key, String defaultValue)
private WTPreferences retrievePreferences(String node)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |