wt.clients.doc
Class WTDocumentTaskDelegate

java.lang.Object
  extended bywt.clients.util.TaskDelegate
      extended bywt.clients.doc.WTDocumentTaskDelegate
Direct Known Subclasses:
GeneralTaskDelegate, RequirementsTaskDelegate, SpecificationTaskDelegate

public class WTDocumentTaskDelegate
extends TaskDelegate

Class WTDocumentTaskDelegate provides support for launching the tasks to create, update and view WTDocuments.

See Also:


Supported API: true

Extendable: true

Field Summary
private static String RESOURCES
           
private static String VC_RESOURCES
           
 
Fields inherited from class wt.clients.util.TaskDelegate
ACTION_KEY, OBJ_PROPS_ACTION, object, objReference, OID_KEY, parentApplet, parentFolder, parentFrame, URL_TEMPLATE_ACTION, URLPROCESSOR_CLASS
 
Constructor Summary
WTDocumentTaskDelegate()
           
 
Method Summary
 void launchCreateTask()
          Method launchCreateTask launches the CreateDocumentFrame to create a new General document.
 void launchDeleteTask()
          Launches the delete task to delete the document associated with this task delegate.
 void launchSaveAsTask()
          Method launchSaveAsTask launches the CopyDialog to create a new WTDocument document from the original selected document..
 void launchUpdateTask()
          Method launchUpdateTask launches the UpdateDocumentFrame to update a given WTDocument.
 void launchViewTask()
          Launches the HTML object properties page for the document which is the context of this task delegate
 
Methods inherited from class wt.clients.util.TaskDelegate
confirmAction, deleteObject, displayPropertiesPage, getObject, getParentApplet, getParentFolder, getParentFrame, launchViewDistributionListTask, setObject, setObjectReference, setParentApplet, setParentFolder, setParentFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCES

private static final String RESOURCES
See Also:
Constant Field Values

VC_RESOURCES

private static final String VC_RESOURCES
See Also:
Constant Field Values
Constructor Detail

WTDocumentTaskDelegate

public WTDocumentTaskDelegate()
Method Detail

launchCreateTask

public void launchCreateTask()
                      throws TaskDelegateException
Method launchCreateTask launches the CreateDocumentFrame to create a new General document. If the parentFolder on this TaskDelegate has been set, that folder is used to initialize the location in which to create the new General document.

Supported API: true

Overrides:
launchCreateTask in class TaskDelegate
Throws:
TaskDelegateException - if an error occurs attempting to set the folder in which to create the document
See Also:
CreateDocumentFrame, wt.doc.General, WTDocument

launchViewTask

public void launchViewTask()
                    throws NotAuthorizedException,
                           ObjectNoLongerExistsException,
                           TaskDelegateException,
                           WTException
Launches the HTML object properties page for the document which is the context of this task delegate

Overrides:
launchViewTask in class TaskDelegate
Throws:
TaskDelegateException - if no object has been given to view or the given object is not a WTDocument
NotAuthorizedException - if the current user does not have permission to view the given WTDocument
ObjectNoLongerExistsException - the given WTDocument no longer exists in the database
WTException - if an error occurs preparing the given WTDocument for viewing
See Also:
TaskDelegate.setObject(java.lang.Object)

launchSaveAsTask

public void launchSaveAsTask()
                      throws TaskDelegateException
Method launchSaveAsTask launches the CopyDialog to create a new WTDocument document from the original selected document..

Supported API: true

Overrides:
launchSaveAsTask in class TaskDelegate
Throws:
TaskDelegateException - if an error occurs attempting to set the folder in which to create the document
See Also:
SaveAsDialog, WTDocument

launchUpdateTask

public void launchUpdateTask()
                      throws ModificationNotAllowedException,
                             NotAuthorizedException,
                             ObjectNoLongerExistsException,
                             TaskDelegateException,
                             WTException
Method launchUpdateTask launches the UpdateDocumentFrame to update a given WTDocument. Before launching the frame in which to update the document, this method will verify that the given document is available for modification.

Supported API: true

Overrides:
launchUpdateTask in class TaskDelegate
Throws:
TaskDelegateException - if no object has been given to update or the given object is not a WTDocument
ModificationNotAllowedException - if the current user has permission to view but not to modify the given WTDocument
NotAuthorizedException - if the current user does not have permission to modify nor view the given WTDocument
ObjectNoLongerExistsException - the given WTDocument no longer exists in the database
WTException - if an error occurs preparing the given WTDocument for modification
See Also:
UpdateDocumentFrame, WTDocument

launchDeleteTask

public void launchDeleteTask()
                      throws TaskDelegateException,
                             WTException
Launches the delete task to delete the document associated with this task delegate. This method will prompt the user for confirmation to delete the document.

Supported API: true

Overrides:
launchDeleteTask in class TaskDelegate
Throws:
TaskDelegateException - if the context object associated with this task delegate is null or is not a document.
WTException - if an error occurs deleting the document.
See Also:
RefreshEvent, RefreshListener