wt.clients.util
Class TaskDelegate

java.lang.Object
  extended by wt.clients.util.TaskDelegate
Direct Known Subclasses:
ConfigurationItemTaskDelegate, FolderTaskDelegate, ShortcutTaskDelegate, WTChangeIssueTaskDelegate, WTChangeOrder2TaskDelegate, WTChangeRequest2TaskDelegate

public class TaskDelegate
extends Object

Class TaskDelegate is a utility which supports launching create, update, view and delete tasks associated with a particular business object. The TaskDelegate class is intended to be subclassed to provide TaskDelegates for various business objects. By having subclasses of this class follow a naming convention, a user of the task delegates can launch the tasks associated with a particular business object without knowing the specific type of the business object.

For example, the WindchillExplorerFrame uses the TaskDelegate to launch the create, view and update tasks of objects that live in a folder.

The TaskDelegateFactory is used in conjunction with this class to generate an instance of a TaskDelegate on which the various tasks can be launched:

    public class MyDisplay extends Frame {
       ...
       public void handleViewEvent( Event evt ) {
          Object obj_to_view = evt.getSource();
          TaskDelegate delegate =
                 TaskDelegateFactory.instantiateTaskDelegate( obj_to_view );
            if( delegate != null ) {
               delegate.setParentApplet( getParentApplet() );
               delegate.setParentFrame( this );
               delegate.setObject( obj_to_view );

           try {
                delegate.launchViewTask();
             } catch (TaskDelegateException tde) {
             // Handle Exception
         }
       }
       ...
    }
  

See Also:


Supported API: true

Extendable: false

Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait