KickJava   Java API By Example, From Geeks To Geeks.

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


1
2 package org.enhydra.shark.api.client.wfservice;
3
4 import org.enhydra.shark.api.ApplicationMappingTransaction;
5 import org.enhydra.shark.api.client.wfbase.BaseException;
6
7 import java.util.Map JavaDoc;
8
9 /**
10  * Used to handle mapping among XPDL application definitions and
11  * shark's tool agents.
12  *
13  * @author Zoran Milakovic
14  *
15  */

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

24    void connect (String JavaDoc userId);
25
26    /**
27     * Returns array of ApplicationMap objects that represent applications
28     * from XPDLs that are currently loaded into engine. Only relevant attributes
29     * of these objects are packageId, processDefinitionId and applicationId.
30     *
31     * @return Array of ApplicationMap objects representing applications
32     * from XPDLs that are currently loaded into engine.
33     * @throws BaseException If something unexpected happens.
34     */

35    ApplicationMap[] getAllApplications () throws BaseException;
36
37    /**
38     * Returns array of ApplicationMap objects that represent applications
39     * from XPDLs that are currently loaded into engine. Only relevant attributes
40     * of these objects are packageId, processDefinitionId and applicationId.
41     *
42     * @param t ApplicationMappingTransaction.
43     * @return Array of ApplicationMap objects representing applications
44     * from XPDLs that are currently loaded into engine.
45     * @throws BaseException If something unexpected happens.
46     */

47    ApplicationMap[] getAllApplications (ApplicationMappingTransaction t) throws BaseException;
48
49    /**
50     * Returns array of ApplicationMap objects that represent applications
51     * from XPDL package determined by given Id. Only relevant attributes
52     * of these objects are packageId, processDefinitionId and applicationId.
53     *
54     * @param pkgId Package Id
55     * @return Array of ApplicationMap objects representing applications
56     * from XPDL package determined by given pkgId parameter.
57     * @throws BaseException If something unexpected happens.
58     */

59    ApplicationMap[] getAllApplications (String JavaDoc pkgId) throws BaseException;
60
61    /**
62     * Returns array of ApplicationMap objects that represent applications
63     * from XPDL package determined by given Id. Only relevant attributes
64     * of these objects are packageId, processDefinitionId and applicationId.
65     *
66     * @param t ApplicationMappingTransaction.
67     * @param pkgId Package Id
68     * @return Array of ApplicationMap objects representing applications
69     * from XPDL package determined by given pkgId parameter.
70     * @throws BaseException If something unexpected happens.
71     */

72    ApplicationMap[] getAllApplications (ApplicationMappingTransaction t,String JavaDoc pkgId) throws BaseException;
73
74    /**
75     * Returns array of ApplicationMap objects that represent applications
76     * from XPDL package and process determined by given Ids. Only relevant attributes
77     * of these objects are packageId, processDefinitionId and applicationId.
78     *
79     * @param pkgId Package Id
80     * @param pDefId Process definition Id
81     * @return Array of ApplicationMap objects representing applications
82     * from XPDL package determined by given pkgId and pDefId parameters.
83     * @throws BaseException If something unexpected happens.
84     */

85    ApplicationMap[] getAllApplications (String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException;
86
87    /**
88     * Returns array of ApplicationMap objects that represent applications
89     * from XPDL package and process determined by given Ids. Only relevant attributes
90     * of these objects are packageId, processDefinitionId and applicationId.
91     *
92     * @param t ApplicationMappingTransaction.
93     * @param pkgId Package Id
94     * @param pDefId Process definition Id
95     * @return Array of ApplicationMap objects representing applications
96     * from XPDL package determined by given pkgId and pDefId parameters.
97     * @throws BaseException If something unexpected happens.
98     */

99    ApplicationMap[] getAllApplications (ApplicationMappingTransaction t,String JavaDoc pkgId,String JavaDoc pDefId) throws BaseException;
100
101    /**
102     * Returns array of class names of tool agents that can be used with shark.
103     *
104     * @return String array of class names of tool agents that can be used
105     * with shark.
106     * @throws BaseException If something unexpected happens.
107     */

108    String JavaDoc[] getDefinedToolAgents () throws BaseException;
109
110    /**
111     * Returns array of class names of tool agents that can be used with shark.
112     *
113     * @param t ApplicationMappingTransaction.
114     * @return String array of class names of tool agents that can be used
115     * with shark.
116     * @throws BaseException If something unexpected happens.
117     */

118    String JavaDoc[] getDefinedToolAgents (ApplicationMappingTransaction t) throws BaseException;
119
120    /**
121     * Returns a map which keys are the full class names of tool agents, and
122     * values are information about tool agents.
123     *
124     * @return a Map
125     * @throws BaseException If something unexpected happens.
126     */

127    Map JavaDoc getToolAgentsInfo () throws BaseException;
128
129    /**
130     * Returns a map which keys are the full class names of tool agents, and
131     * values are information about tool agents.
132     *
133     * @param t ApplicationMappingTransaction.
134     * @return a Map
135     * @throws BaseException If something unexpected happens.
136     */

137    Map JavaDoc getToolAgentsInfo (ApplicationMappingTransaction t) throws BaseException;
138
139    /**
140     * Returns a string which represents tool agent description.
141     *
142     * @return a String
143     * @throws BaseException If something unexpected happens.
144     */

145    String JavaDoc getToolAgentInfo (String JavaDoc toolAgentFullClassName) throws BaseException;
146
147    /**
148     * Returns a string which represents tool agent description.
149     *
150     * @param t ApplicationMappingTransaction.
151     * @return a String
152     * @throws BaseException If something unexpected happens.
153     */

154    String JavaDoc getToolAgentInfo (ApplicationMappingTransaction t,String JavaDoc toolAgentFullClassName) throws BaseException;
155
156    /**
157     * Adds new application to tool agent mapping. If the mapping information
158     * contained in ApplicationMap object contains packageId, processDefinitionId,
159     * applicationDefId and toolAgentName information that is same as of any
160     * existing mappings, the update of existing mapping is performed.
161     *
162     * @param am ApplicationMap that contains mapping information.
163     * @throws BaseException If something unexpected happens.
164     */

165    public void addApplicationMapping (ApplicationMap am) throws BaseException;
166
167    /**
168     * Adds new application to tool agent mapping. If the mapping information
169     * contained in ApplicationMap object contains packageId, processDefinitionId,
170     * applicationDefId and toolAgentName information that is same as of any
171     * existing mappings, the update of existing mapping is performed.
172     *
173     * @param t ApplicationMappingTransaction.
174     * @param am ApplicationMap that contains mapping information.
175     * @throws BaseException If something unexpected happens.
176     */

177    public void addApplicationMapping (ApplicationMappingTransaction t,ApplicationMap am) throws BaseException;
178
179    /**
180     * Returns ApplicationMap object that represents mapping for XPDL application
181     * represented with the given parameters.
182     *
183     * @param pkgId package Id.
184     * @param pDefId processDefinition Id.
185     * @param appDefId applicationDef Id.
186     *
187     * @return ApplicationMap representing required mapping.
188     * @throws BaseException If something unexpected happens.
189     */

190    public ApplicationMap getApplicationMapping (String JavaDoc pkgId,
191                                                 String JavaDoc pDefId,
192                                                 String JavaDoc appDefId) throws BaseException;
193
194    /**
195     * Returns ApplicationMap object that represents mapping for XPDL application
196     * represented with the given parameters.
197     *
198     * @param t ApplicationMappingTransaction.
199     * @param pkgId package Id.
200     * @param pDefId processDefinition Id.
201     * @param appDefId applicationDef Id.
202     * @return ApplicationMap representing required mapping.
203     * @throws BaseException If something unexpected happens.
204     */

205    public ApplicationMap getApplicationMapping (ApplicationMappingTransaction t,
206                                                 String JavaDoc pkgId,
207                                                 String JavaDoc pDefId,
208                                                 String JavaDoc appDefId) throws BaseException;
209
210    /**
211     * Removes application from tool agent mapping.
212     *
213     * @param packageId package Id.
214     * @param processDefinitionId processDefinition Id.
215     * @param applicationId application Id.
216     * @throws BaseException If something unexpected happens.
217     */

218    public void removeApplicationMapping (String JavaDoc packageId,
219                                          String JavaDoc processDefinitionId,
220                                          String JavaDoc applicationId) throws BaseException;
221
222    /**
223     * Removes application from tool agent mapping.
224     *
225     * @param t ApplicationMappingTransaction.
226     * @param packageId package Id.
227     * @param processDefinitionId processDefinition Id.
228     * @param applicationId application Id.
229     * @throws BaseException If something unexpected happens.
230     */

231    public void removeApplicationMapping (ApplicationMappingTransaction t,
232                                          String JavaDoc packageId,
233                                          String JavaDoc processDefinitionId,
234                                          String JavaDoc applicationId) throws BaseException;
235
236    /**
237     * Returns all mappings that map XPDL applications to Tool agents.
238     *
239     * @return Array of ApplicationMap objects that represent mappings.
240     * @throws BaseException If something unexpected happens.
241     */

242    public ApplicationMap[] getApplicationMappings () throws BaseException; // returns ApplicationMap
243

244    /**
245     * Returns all mappings that map XPDL applications to Tool agents.
246     *
247     * @param t ApplicationMappingTransaction.
248     * @return Array of ApplicationMap objects that represent mappings.
249     * @throws BaseException If something unexpected happens.
250     */

251    public ApplicationMap[] getApplicationMappings (ApplicationMappingTransaction t) throws BaseException; // returns ApplicationMap
252

253    /**
254     * Creates and returns an empty implementation of ApplicationMap interface.
255     *
256     * @return Created empty ApplicationMap instance.
257     */

258    public ApplicationMap createApplicationMap ();
259
260    /**
261     * Creates and returns an empty implementation of ApplicationMap interface.
262     *
263     * @param t a ApplicationMappingTransaction
264     * @return Created empty ApplicationMap instance.
265     */

266    public ApplicationMap createApplicationMap (ApplicationMappingTransaction t);
267 }
268
Popular Tags