KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > api > client > wfservice > ParticipantMappingAdministration


1
2 package org.enhydra.shark.api.client.wfservice;
3
4 import org.enhydra.shark.api.ParticipantMappingTransaction;
5 import org.enhydra.shark.api.client.wfbase.BaseException;
6
7 /**
8  *
9  * Used to handle mapping among XPDL participant definitions and shark's
10  * users.
11  *
12  * @author Zoran Milakovic
13  */

14 public interface ParticipantMappingAdministration {
15
16    /**
17     * This method is used to let shark know who uses this API.
18     *
19     * @param userId String representing user Id.
20     *
21     */

22    void connect (String JavaDoc userId);
23
24    /**
25     * Returns array of ParticipantMap objects that represent participants
26     * from XPDL that are currently loaded into engine. The username and isGroupUser
27     * attributes of these objects are irellevant.
28     *
29     * @return array of ParticipantMap objects representing participants
30     * from XPDL that are currently loaded into engine.
31     *
32     * @throws BaseException If something unexpected happens.
33     *
34     */

35    ParticipantMap[] getAllParticipants () throws BaseException;
36
37    /**
38     * Returns array of ParticipantMap objects that represent participants
39     * from XPDL that are currently loaded into engine. The username and isGroupUser
40     * attributes of these objects are irellevant.
41     *
42     * @param t ParticipantMappingTransaction.
43     * @return array of ParticipantMap objects representing participants
44     * from XPDL that are currently loaded into engine.
45     *
46     * @throws BaseException If something unexpected happens.
47     *
48     */

49    ParticipantMap[] getAllParticipants (ParticipantMappingTransaction t) throws BaseException;
50
51    /**
52     * Returns array of ParticipantMap objects that represent participants
53     * from XPDL package determined by given Id. The username and isGroupUser
54     * attributes of these objects are irellevant.
55     *
56     * @param pkgId Package Id
57     * @return array of ParticipantMap objects representing participants
58     * from XPDL package determined by given pkgId parameter.
59     *
60     * @throws BaseException If something unexpected happens.
61     *
62     */

63    ParticipantMap[] getAllParticipants (String JavaDoc pkgId) throws BaseException;
64
65    /**
66     * Returns array of ParticipantMap objects that represent participants
67     * from XPDL that are currently loaded into engine. The username and isGroupUser
68     * attributes of these objects are irellevant.
69     *
70     * @param t ParticipantMappingTransaction.
71     * @param pkgId Package Id
72     * @return array of ParticipantMap objects representing participants
73     * from XPDL package determined by given pkgId parameter.
74     *
75     * @throws BaseException If something unexpected happens.
76     *
77     */

78    ParticipantMap[] getAllParticipants (ParticipantMappingTransaction t,String JavaDoc pkgId) throws BaseException;
79
80    /**
81     * Returns array of ParticipantMap objects that represent participants
82     * from XPDL package and process definition determined by given Ids.
83     * The username and isGroupUser attributes of these objects are irellevant.
84     *
85     * @param pkgId Package Id
86     * @param pDefId Process definition Id
87     * @return array of ParticipantMap objects representing participants
88     * from XPDL package determined by given pkgId and pDefId parameters.
89     *
90     * @throws BaseException If something unexpected happens.
91     *
92     */

93    ParticipantMap[] getAllParticipants (String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException;
94
95    /**
96     * Returns array of ParticipantMap objects that represent participants
97     * from XPDL package and process definition determined by given Ids.
98     * The username and isGroupUser attributes of these objects are irellevant.
99     *
100     * @param t ParticipantMappingTransaction.
101     * @param pkgId Package Id
102     * @param pDefId Process definition Id
103     * @return array of ParticipantMap objects representing participants
104     * from XPDL package determined by given pkgId and pDefId parameters.
105     *
106     * @throws BaseException If something unexpected happens.
107     *
108     */

109    ParticipantMap[] getAllParticipants (ParticipantMappingTransaction t,String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException;
110
111    /**
112     * Returns Ids of user groups.
113     *
114     * @return String array of user group Ids.
115     *
116     * @throws BaseException If something unexpected happens.
117     *
118     */

119    String JavaDoc[] getAllGroupnames () throws BaseException;
120
121    /**
122     * Returns Ids of user groups.
123     *
124     * @param t ParticipantMappingTransaction.
125     * @return String array of user group Ids.
126     *
127     * @throws BaseException If something unexpected happens.
128     *
129     */

130    String JavaDoc[] getAllGroupnames (ParticipantMappingTransaction t) throws BaseException;
131
132    /**
133     * Returns usernames of all users of the system.
134     *
135     * @return String array of user Ids.
136     *
137     * @throws BaseException If something unexpected happens.
138     *
139     */

140    String JavaDoc[] getAllUsers () throws BaseException;
141
142    /**
143     * Returns usernames of all users of the system.
144     *
145     * @param t ParticipantMappingTransaction.
146     * @return String array of user Ids.
147     *
148     * @throws BaseException If something unexpected happens.
149     *
150     */

151    String JavaDoc[] getAllUsers (ParticipantMappingTransaction t) throws BaseException;
152
153    /**
154     * Returns all usernames that belong to the given group.
155     *
156     * @param groupName name of the given group.
157     * @return String array of usernames that belong to the given group.
158     *
159     * @throws BaseException If something unexpected happens.
160     *
161     */

162    String JavaDoc[] getAllUsers (String JavaDoc groupName) throws BaseException;
163
164    /**
165     * Returns all usernames that belong to the given group.
166     *
167     * @param t ParticipantMappingTransaction.
168     * @param groupName name of the given group.
169     * @return String array of usernames that belong to the given group.
170     *
171     * @throws BaseException If something unexpected happens.
172     *
173     */

174    String JavaDoc[] getAllUsers (ParticipantMappingTransaction t,String JavaDoc groupName) throws BaseException;
175
176    /**
177     * Returns all mappings that map XPDL participants to users.
178     *
179     * @return Array of ParticipantMap objects that represent mappings.
180     * @throws BaseException If something unexpected happens.
181     */

182    public ParticipantMap[] getAllParticipantMappings () throws BaseException; // returns ParticipantMap objects
183

184
185    /**
186     * Returns all mappings that map XPDL participants to users.
187     *
188     * @param t ParticipantMappingTransaction.
189     * @return Array of ParticipantMap objects that represent mappings.
190     * @throws BaseException If something unexpected happens.
191     */

192    public ParticipantMap[] getAllParticipantMappings (ParticipantMappingTransaction t) throws BaseException; // returns ParticipantMap objects
193

194    /**
195     * Adds new participant to username mapping.
196     *
197     * @param pm ParticipantMap containing mapping information.
198     *
199     * @throws BaseException If something unexpected happens.
200     */

201    public void addParticipantMapping (ParticipantMap pm) throws BaseException;
202
203    /**
204     * Adds new participant to username mapping.
205     *
206     * @param t ParticipantMappingTransaction.
207     * @param pm ParticipantMap containing mapping information.
208     *
209     * @throws BaseException If something unexpected happens.
210     */

211    public void addParticipantMapping (ParticipantMappingTransaction t,ParticipantMap pm) throws BaseException;
212
213    /**
214     * Removes participant from username mapping.
215     *
216     * @param pm ParticipantMap containing mapping information.
217     *
218     * @throws BaseException If something unexpected happens.
219     */

220    public void removeParticipantMapping (ParticipantMap pm) throws BaseException;
221
222    /**
223     * Removes participant from username mapping.
224     *
225     * @param t ParticipantMappingTransaction.
226     * @param pm ParticipantMap containing mapping information.
227     *
228     * @throws BaseException If something unexpected happens.
229     */

230    public void removeParticipantMapping (ParticipantMappingTransaction t,ParticipantMap pm) throws BaseException;
231
232    /**
233     * Returns all mappings for XPDL participant given by parameters.
234     *
235     * @param packageId Id of package containing participant.
236     * @param processDefinitionId Id of process definition that contains
237     * participant. Can be empty string or null if participant is defined at
238     * package level.
239     * @param participantId Id of the participant.
240     *
241     * @return Array of ParticipantMap objects that represent mappings.
242     * @throws BaseException If something unexpected happens.
243     */

244    public ParticipantMap[] getParticipantMappings (String JavaDoc packageId,
245                                                    String JavaDoc processDefinitionId,
246                                                    String JavaDoc participantId) throws BaseException; // returns ParticipantMap objects
247
/**
248     * Returns all mappings for XPDL participant given by parameters.
249     *
250     * @param t ParticipantMappingTransaction.
251     * @param packageId Id of package containing participant.
252     * @param processDefinitionId Id of process definition that contains
253     * participant. Can be empty string or null if participant is defined at
254     * package level.
255     * @param participantId Id of the participant.
256     *
257     * @return Array of ParticipantMap objects that represent mappings.
258     * @throws BaseException If something unexpected happens.
259     */

260    public ParticipantMap[] getParticipantMappings (ParticipantMappingTransaction t,
261                                                    String JavaDoc packageId,
262                                                    String JavaDoc processDefinitionId,
263                                                    String JavaDoc participantId) throws BaseException; // returns ParticipantMap objects
264
/**
265     * Removes all mappings for XPDL participant given by parameters.
266     *
267     * @param packageId Id of package that contains participant.
268     * @param processDefinitionId Id of process definition that contains
269     * participant. Can be empty string or null if participant is defined at
270     * package level.
271     * @param participantId Id of the participant.
272     * @throws BaseException If something unexpected happens.
273     */

274    public void removeParticipantMappings (String JavaDoc packageId,
275                                           String JavaDoc processDefinitionId,
276                                           String JavaDoc participantId) throws BaseException;
277    /**
278      * Removes all mappings for XPDL participant given by parameters.
279     *
280     * @param t ParticipantMappingTransaction.
281     * @param packageId Id of package that contains participant.
282     * @param processDefinitionId Id of process definition that contains
283     * participant. Can be empty string or null if participant is defined at
284     * package level.
285     * @param participantId Id of the participant.
286     * @throws BaseException If something unexpected happens.
287     */

288    public void removeParticipantMappings (ParticipantMappingTransaction t,
289                                           String JavaDoc packageId,
290                                           String JavaDoc processDefinitionId,
291                                           String JavaDoc participantId) throws BaseException;
292    /**
293     * Removes all mappings that map XPDL participants to a user with the given
294     * username.
295     *
296     * @param username String representing username we have to remove mappings for.
297     *
298     * @throws BaseException If something unexpected happens.
299     */

300    public void removeParticipantMappings (String JavaDoc username) throws BaseException;
301
302    /**
303     * Removes all mappings that map XPDL participants to a user with the given
304     * username.
305     *
306     * @param t ParticipantMappingTransaction.
307     * @param username String representing username we have to remove mappings for.
308     *
309     * @throws BaseException If something unexpected happens.
310     */

311    public void removeParticipantMappings (ParticipantMappingTransaction t,String JavaDoc username) throws BaseException;
312
313    /**
314     * Creates and returns an empty implementation of ParticipantMap interface.
315     *
316     * @return Created empty ParticipantMap instance.
317     */

318    public ParticipantMap createParticipantMap ();
319
320    /**
321     * Creates and returns an empty implementation of ParticipantMap interface.
322     *
323     * @param t ParticipantMappingTransaction.
324     * @return Created empty ParticipantMap instance.
325     */

326    public ParticipantMap createParticipantMap (ParticipantMappingTransaction t);
327
328 }
329
Popular Tags