dnet40/modules/cnr-blackboard-common/trunk/src/main/java/eu/dnetlib/enabling/tools/blackboard/BlackboardJob.java @ 32852
1 |
package eu.dnetlib.enabling.tools.blackboard; |
---|---|
2 |
|
3 |
import java.util.Map; |
4 |
|
5 |
/**
|
6 |
* High level representation of a blackboard job.
|
7 |
*
|
8 |
* @author marko
|
9 |
*
|
10 |
*/
|
11 |
public interface BlackboardJob { |
12 |
|
13 |
/**
|
14 |
* Get the message id.
|
15 |
*
|
16 |
* @return id
|
17 |
*/
|
18 |
String getId(); |
19 |
|
20 |
/**
|
21 |
* Set message id.
|
22 |
*
|
23 |
* @param identifier
|
24 |
* id
|
25 |
*/
|
26 |
void setId(String identifier); |
27 |
|
28 |
/**
|
29 |
* Get the action name.
|
30 |
*
|
31 |
* @return action name
|
32 |
*/
|
33 |
String getAction(); |
34 |
|
35 |
/**
|
36 |
* Set the action name.
|
37 |
*
|
38 |
* @param action
|
39 |
* action name
|
40 |
*/
|
41 |
void setAction(String action); |
42 |
|
43 |
/**
|
44 |
* Get the action status.
|
45 |
*
|
46 |
* @return action status
|
47 |
*/
|
48 |
ActionStatus getActionStatus(); |
49 |
|
50 |
/**
|
51 |
* Set the action status.
|
52 |
*
|
53 |
* @param actionStatus
|
54 |
* action status
|
55 |
*/
|
56 |
void setActionStatus(ActionStatus actionStatus); |
57 |
|
58 |
/**
|
59 |
* Get the message date.
|
60 |
*
|
61 |
* @return date
|
62 |
*/
|
63 |
String getDate(); |
64 |
|
65 |
/**
|
66 |
* Set the message date.
|
67 |
*
|
68 |
* @param date
|
69 |
* date
|
70 |
*/
|
71 |
void setDate(String date); |
72 |
|
73 |
/**
|
74 |
* obtains a mutable parameter map (key/value).
|
75 |
*
|
76 |
* @return mutable parameter map
|
77 |
*/
|
78 |
Map<String, String> getParameters(); |
79 |
|
80 |
/**
|
81 |
* Get the error message, if the actionStatus is FAILED. Usually the error message is also present in the parameter map but it's
|
82 |
* preferred to use this method.
|
83 |
*
|
84 |
* @return error message
|
85 |
*/
|
86 |
String getError(); |
87 |
|
88 |
/**
|
89 |
* Set the error message, if the actionStatus is FAILED. Usually the error message is also present in the parameter map but it's
|
90 |
* preferred to use this method.
|
91 |
*
|
92 |
* @param error
|
93 |
* error message
|
94 |
*/
|
95 |
void setError(String error); |
96 |
|
97 |
/**
|
98 |
* Get the setviceId.
|
99 |
*
|
100 |
* @return the serviceId
|
101 |
*/
|
102 |
String getServiceId(); |
103 |
|
104 |
/**
|
105 |
* True if the action status is one of the termination statuses (e.g. done and failed).
|
106 |
*
|
107 |
* @return true if completed
|
108 |
*/
|
109 |
boolean isCompleted(); |
110 |
|
111 |
/**
|
112 |
* Get the bb message.
|
113 |
*
|
114 |
* @return the bb message
|
115 |
*/
|
116 |
BlackboardMessage getMessage(); |
117 |
|
118 |
}
|