KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > monitor > model > JobAction


1 /*
2  * (c) Rob Gordon 2005
3  */

4 package org.oddjob.monitor.model;
5
6 import org.oddjob.designer.model.DesignDefinition;
7
8 /**
9  * The interface for an action which can be performed
10  * on a selected job node. This interface defines
11  * a view independent sequence for the action.
12  *
13  */

14 abstract public class JobAction extends JobOption {
15
16     /**
17      * For an action that requires a form for further
18      * imput. If no form is required this method should
19      * return null.
20      *
21      * @return The DesignDefinition for the form or
22      * null if no form is required.
23      */

24     abstract public DesignDefinition form();
25     
26     /**
27      * Called to perform the action either once
28      * the form has been completed or immediately
29      * the menu item or trigger for the action has
30      * been selected.
31      *
32      * @throws Exception The exception will be caught and
33      * presented to the user.
34      */

35     abstract public void action() throws Exception JavaDoc;
36     
37     /*
38      * (non-Javadoc)
39      * @see org.oddjob.monitor.model.JobOption#process(org.oddjob.monitor.model.JobOptionProcessor)
40      */

41     public void process(JobOptionProcessor processor) {
42         processor.processAction(this);
43     }
44
45 }
46
Popular Tags