KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > api > client > wfmodel > how_closedType


1 package org.enhydra.shark.api.client.wfmodel;
2
3 /**
4  * Used to describe sets of states of various workflow objects:
5  * <p>
6  * completed - When an execution object has finished its task in the
7  * overall workflow process it enters the completed state; it
8  * is assumed that all execution objects associated with that
9  * execution object are completed when it enters this state.
10  * <p>
11  * terminated - Indicates that enactment of the execution object was
12  * stopped before normal completion. It is assumed that all
13  * execution objects depending on this execution object
14  * (i.e., WfActivities contained in a WfProcess or a
15  * WfProcess implementing a WfActivity) are either
16  * completed or are terminated when it enters this state.
17  * <p>
18  * aborted - Indicates that the enactment of the execution object has
19  * been aborted before normal completion. No assumptions
20  * on the state of execution objects depending on this
21  * execution object are made when it enters this state.
22  */

23 public class how_closedType
24 {
25   private int __value;
26   private static int __size = 3;
27   private static how_closedType[] __array = new how_closedType [__size];
28
29   public static final int _completed = 0;
30   public static final how_closedType completed = new how_closedType(_completed);
31   public static final int _terminated = 1;
32   public static final how_closedType terminated = new how_closedType(_terminated);
33   public static final int _aborted = 2;
34   public static final how_closedType aborted = new how_closedType(_aborted);
35
36   public int value ()
37   {
38     return __value;
39   }
40
41   public static how_closedType from_int (int value)
42   {
43     if (value >= 0 && value < __size)
44       return __array[value];
45     else
46       throw new org.omg.CORBA.BAD_PARAM JavaDoc ();
47   }
48
49   protected how_closedType (int value)
50   {
51     __value = value;
52     __array[__value] = this;
53   }
54 } // class how_closedType
55
Popular Tags