KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.api.client.wfmodel;
2
3
4 import org.enhydra.shark.api.client.wfbase.*;
5 import org.enhydra.shark.api.SharkTransaction;
6
7 /**
8  OMG definition: WfResource is an abstraction that represents a person or thing that will potentially
9  accept an assignment to an activity. Potential and/or accepted WfAssignments are links
10  between the requesting WfActivities and WfResource objects. It is expected that this
11  interface will be used to implement adapters for objects representing people and things
12  implemented in user, organization, and resource models. These models are outside the
13  scope of this specification.
14  <p>We extended OMG's interface by duplicating methods, and adding additional
15  parameter that represents transaction. If you use methods without SharkTransaction
16  parameter, the transaction will be implicitly created, and if you use it with
17  SharkTransaction parameter you must obey to some rules explained in HowTo documentation.
18  */

19 public interface WfResource extends BaseBusinessObject {//, PersistenceInterface
20

21    /**
22     Zero or more WfAssignments are associated with a resource. The association is
23     established when the assignment is created as part of the resource selection process for
24     an activity; the assignment can be reassigned to another resource at a later point in
25     time.
26     <p>The following operation returns the number of WfAssignments
27     associated with a resource.
28     */

29    int how_many_work_item () throws BaseException;
30
31    /**
32     Zero or more WfAssignments are associated with a resource. The association is
33     established when the assignment is created as part of the resource selection process for
34     an activity; the assignment can be reassigned to another resource at a later point in
35     time.
36     <p>The following operation returns the number of WfAssignments
37     associated with a resource.
38     */

39    int how_many_work_item (SharkTransaction t) throws BaseException;
40
41    /**
42     Zero or more WfAssignments are associated with a resource. The association is
43     established when the assignment is created as part of the resource selection process for
44     an activity; the assignment can be reassigned to another resource at a later point in
45     time.
46     <p>The following operation returns iterator for qurying associated
47     assignments based on some criteria.
48     */

49    WfAssignmentIterator get_iterator_work_item () throws BaseException;
50
51    /**
52     Zero or more WfAssignments are associated with a resource. The association is
53     established when the assignment is created as part of the resource selection process for
54     an activity; the assignment can be reassigned to another resource at a later point in
55     time.
56     <p>The following operation returns iterator for qurying associated
57     assignments based on some criteria.
58     */

59    WfAssignmentIterator get_iterator_work_item (SharkTransaction t) throws BaseException;
60
61    /**
62     Zero or more WfAssignments are associated with a resource. The association is
63     established when the assignment is created as part of the resource selection process for
64     an activity; the assignment can be reassigned to another resource at a later point in
65     time.
66     <p>The following operation returns max_number of WfAssignment objects
67     associated with a resource. If max_number is less or eaqual to zero, or it is
68     greater than the number of existing assignments, all associated WfAssignments
69     objects will be returned.
70     */

71    WfAssignment[] get_sequence_work_item (int max_number) throws BaseException;
72
73    /**
74     Zero or more WfAssignments are associated with a resource. The association is
75     established when the assignment is created as part of the resource selection process for
76     an activity; the assignment can be reassigned to another resource at a later point in
77     time.
78     <p>The following operation returns max_number of WfAssignment objects
79     associated with a resource. If max_number is less or eaqual to zero, or it is
80     greater than the number of existing assignments, all associated WfAssignments
81     objects will be returned.
82     */

83    WfAssignment[] get_sequence_work_item (SharkTransaction t,int max_number) throws BaseException;
84
85    /**
86     Zero or more WfAssignments are associated with a resource. The association is
87     established when the assignment is created as part of the resource selection process for
88     an activity; the assignment can be reassigned to another resource at a later point in
89     time.
90     <p>The following operation returns true if given assignment is
91     associated with resource.
92     */

93    boolean is_member_of_work_items (WfAssignment member) throws BaseException;
94
95    /**
96     Zero or more WfAssignments are associated with a resource. The association is
97     established when the assignment is created as part of the resource selection process for
98     an activity; the assignment can be reassigned to another resource at a later point in
99     time.
100     <p>The following operation returns true if given assignment is
101     associated with resource.
102     */

103    boolean is_member_of_work_items (SharkTransaction t,WfAssignment member) throws BaseException;
104
105    /**
106     Returns the resource key that identifies a resource within a given business domain.
107     It is assumed that resources are defined in the same business domain as the workflow
108     processes they are associated with.
109     <p>The key is set when the object is initialized; modification of the key
110     can be done in the context of a resource management facility.
111     */

112    String JavaDoc resource_key () throws BaseException;
113
114    /**
115     Returns the resource key that identifies a resource within a given business domain.
116     It is assumed that resources are defined in the same business domain as the workflow
117     processes they are associated with.
118     <p>The key is set when the object is initialized; modification of the key
119     can be done in the context of a resource management facility.
120     */

121    String JavaDoc resource_key (SharkTransaction t) throws BaseException;
122
123    /** Returns a human readable, descriptive name of the resource.*/
124    String JavaDoc resource_name () throws BaseException;
125
126    /** Returns a human readable, descriptive name of the resource.*/
127    String JavaDoc resource_name (SharkTransaction t) throws BaseException;
128
129    /**
130     The release operation is used to signal that the resource is no longer needed for a
131     specific assignment. It takes the assignment that is no longer associated with the
132     resource and a string that specifies additional information on the reason for realizing
133     the resource as input. A NotAssigned exception is raised when the WfAssignment
134     specified as input is not assigned to the WfResource.
135     It is assumed that this operation is invoked when an assignment is deleted or when an
136     assignment is reassigned to another resource.
137     */

138    void release (WfAssignment from_assigment, String JavaDoc release_info) throws BaseException, NotAssigned;
139
140    /**
141     The release operation is used to signal that the resource is no longer needed for a
142     specific assignment. It takes the assignment that is no longer associated with the
143     resource and a string that specifies additional information on the reason for realizing
144     the resource as input. A NotAssigned exception is raised when the WfAssignment
145     specified as input is not assigned to the WfResource.
146     It is assumed that this operation is invoked when an assignment is deleted or when an
147     assignment is reassigned to another resource.
148     */

149    void release (SharkTransaction t,WfAssignment from_assigment, String JavaDoc release_info) throws BaseException, NotAssigned;
150 } // interface WfResource
151

152
Popular Tags