KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.api.client.wfservice;
2
3 import org.enhydra.shark.api.*;
4
5
6 /**
7  * The top-most client interface for accessing shark engine.
8  * Every client application has to know about the implementation
9  * of this interface.
10  * <p>
11  * When client application has the instance of this interface implementation,
12  * it can call one of its methods to retrieve instances of various interfaces
13  * used for managing Shark.
14  * @author Sasa Bojanic
15  * @author Vladimir Puskas
16  */

17 public interface SharkInterface {
18
19    /**
20     * Returns instance of SharkConnection interface that can be
21     * used by shark user to connect to shark engine and execute assignments.
22     *
23     * @return SharkConnection instance.
24     */

25    SharkConnection getSharkConnection ();
26
27
28    /**
29     * Returns instance of interface for managing shark's repository of
30     * XPDL files.
31     *
32     * @return RepositoryMgr instance.
33     *
34     */

35    RepositoryMgr getRepositoryManager ();
36
37    /**
38     * Returns instance of interface for shark administration.
39     *
40     * @return AdminInterface instance.
41     *
42     */

43    AdminInterface getAdminInterface ();
44
45    /**
46     * Returns instance of interface for building expressions.
47     */

48    ExpressionBuilderManager getExpressionBuilderManager ();
49
50    /**
51     * Returns a shark transaction.
52     *
53     * @return SharkTransaction instance.
54     *
55     * @throws TransactionException If something unexpected happens.
56     *
57     */

58    SharkTransaction createTransaction() throws TransactionException;
59
60    /**
61     * Returns a shark's participant mapping transaction.
62     *
63     * @return ParticipantMappingTransaction instance.
64     *
65     * @throws TransactionException If something unexpected happens.
66     *
67     */

68    ParticipantMappingTransaction createParticipantMappingTransaction() throws TransactionException;
69
70    /**
71    * Returns a shark's application mapping transaction.
72    *
73    * @return ApplicationMappingTransaction instance.
74    *
75    * @throws TransactionException If something unexpected happens.
76    *
77    */

78    ApplicationMappingTransaction createApplicationMappingTransaction() throws TransactionException;
79
80    /**
81    * Returns a shark's script mapping transaction.
82    *
83    * @return ScriptMappingTransaction instance.
84    *
85    * @throws TransactionException If something unexpected happens.
86    *
87    */

88    ScriptMappingTransaction createScriptMappingTransaction() throws TransactionException;
89
90    /**
91     * Returns a shark's user transaction.
92     *
93     * @return a UserTransaction instance.
94     *
95     * @throws TransactionException If something unexpected happens.
96     *
97     */

98    UserTransaction createUserTransaction() throws TransactionException;
99
100    /**
101     * Returns a shark's repository transaction.
102     *
103     * @return a RepositoryTransaction instance.
104     *
105     * @throws TransactionException If something unexpected happens.
106     *
107     */

108    RepositoryTransaction createRepositoryTransaction() throws TransactionException;
109
110    /**
111     * Unlocks all processes locked in current transaction. This should be used
112     * when external SharkTransaction are used with Shark, and it has to be used
113     * along with calling release method on SharkTransaction.
114     * <p>NOTE: it is supposed that transaction is bound to a thread, otherwise
115     * unlocking won't work properly.
116     *
117     * @param t a SharkTransaction
118     *
119     * @throws BaseException
120     *
121     */

122    void unlockProcesses (SharkTransaction t) throws TransactionException;
123
124
125    /**
126     * Empties shark caches - this should be used if some method that uses
127     * external transaction only for reading fails.
128     * <p>NOTE: it is supposed that transaction is bound to a thread, otherwise
129     * emptying won't work properly.
130     *
131     * @param t a SharkTransaction
132     *
133     */

134    void emptyCaches (SharkTransaction t);
135
136    /**
137     * Returns shark configuration properties.
138     *
139     * @return Properties object.
140     *
141     */

142    java.util.Properties JavaDoc getProperties ();
143
144 }
145
146
Popular Tags