wt.clients.part
Class WTProductTaskDelegate

java.lang.Object
  extended bywt.clients.util.TaskDelegate
      extended bywt.clients.part.WTProductTaskDelegate

public class WTProductTaskDelegate
extends TaskDelegate

Class WTProductTaskDelegate provides support for launching the tasks to create, update and view WTProducts. This class should not be directly instantiated or manipulated. Instead, obtain a wt.clients.util.TaskDelegate from the wt.clients.util.TaskDelegateFactory for a specific object or class, and invoke methods on that obtained TaskDelegate.

Supported API: true

Extendable: true

See Also:
TaskDelegate, TaskDelegateFactory

Field Summary
private static String VIEW_DISTRIBUTION_LIST_ACTION
           
 
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
WTProductTaskDelegate()
          Create the task delegate.
 
Method Summary
 Applet getApplet()
          Return the parent applet.
 Frame getFrame()
          Return the parent frame.
 Object getObject()
          Return the object the manipulate.
 void launchCreateTask()
          Method launchCreateTask launches the CreateProductFrame to create a new product.
 void launchDeleteTask()
          Method launchDeleteTask delete the specified Product.
 void launchNewConfigurationTask()
          Method launchNewConfigurationTask creates a new configuration for the product which is the context of this TaskDelegate.
 void launchSaveAsTask()
          Method launchSaveAsTask launches the CopyDialog to create a new WTProduct product from the original selected product.
 void launchUpdateTask()
          Method launchUpdateTask launches the UpdateProductFrame to update a given WTProduct.
 void launchViewDistributionListTask()
          Method launchViewDistributionListTask displays the HTML properties page for the part which is the context of this TaskDelegate.
 void launchViewTask()
          Method launchViewTask displays the HTML properties page for the product which is the context of this TaskDelegate.
static void main(String[] args)
          A main method that demonstrates how to use this class and allows testing
 
Methods inherited from class wt.clients.util.TaskDelegate
confirmAction, deleteObject, displayPropertiesPage, getParentApplet, getParentFolder, getParentFrame, 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

VIEW_DISTRIBUTION_LIST_ACTION

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

WTProductTaskDelegate

public WTProductTaskDelegate()
Create the task delegate.

Method Detail

getObject

public Object getObject()
Return the object the manipulate.

Overrides:
getObject in class TaskDelegate
Returns:
the object to manipulate
See Also:
TaskDelegate.getObject(), TaskDelegate.launchViewTask(), TaskDelegate.launchUpdateTask(), TaskDelegate.launchDeleteTask(), WTReference

getFrame

public Frame getFrame()
Return the parent frame.

Returns:
the parent frame.

getApplet

public Applet getApplet()
Return the parent applet.

Returns:
the parent applet

launchCreateTask

public void launchCreateTask()
                      throws TaskDelegateException
Method launchCreateTask launches the CreateProductFrame to create a new product.

Overrides:
launchCreateTask in class TaskDelegate
Throws:
TaskDelegateException - if an error occurs attempting to set the folder in which to create the document
See Also:
CreateProductFrame, WTProduct

launchSaveAsTask

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

Supported API: false

Overrides:
launchSaveAsTask in class TaskDelegate
Throws:
TaskDelegateException - if an error occurs attempting to set the folder in which to create the document
See Also:
wt.clients.save.SaveAsViewDialog, WTProduct

launchViewTask

public void launchViewTask()
                    throws TaskDelegateException,
                           ObjectNoLongerExistsException,
                           NotAuthorizedException,
                           WTException
Method launchViewTask displays the HTML properties page for the product which is the context of this TaskDelegate.

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

launchViewDistributionListTask

public void launchViewDistributionListTask()
                                    throws TaskDelegateException,
                                           ObjectNoLongerExistsException,
                                           NotAuthorizedException,
                                           WTException
Method launchViewDistributionListTask displays the HTML properties page for the part which is the context of this TaskDelegate.

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

launchUpdateTask

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

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

launchDeleteTask

public void launchDeleteTask()
                      throws TaskDelegateException,
                             WTException
Method launchDeleteTask delete the specified Product.

Overrides:
launchDeleteTask in class TaskDelegate
Throws:
TaskDelegateException - if no object has been given to delete or the given object is not a WTProduct or if error deleting the WTProduct.
WTException
See Also:
WTProduct

launchNewConfigurationTask

public void launchNewConfigurationTask()
                                throws TaskDelegateException,
                                       ObjectNoLongerExistsException,
                                       NotAuthorizedException,
                                       WTException
Method launchNewConfigurationTask creates a new configuration for the product which is the context of this TaskDelegate.

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

main

public static void main(String[] args)
A main method that demonstrates how to use this class and allows testing