comparison artifacts/src/main/java/de/intevation/artifacts/CallContext.java @ 78:55eefe63a777

Repaired the javadoc stuff for almost all artifact interfaces. artifacts/trunk@760 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 11 Mar 2010 10:53:59 +0000
parents 89e3de0ee05f
children 72e2dd4feb31
comparison
equal deleted inserted replaced
77:48d1a9a082c2 78:55eefe63a777
1 package de.intevation.artifacts; 1 package de.intevation.artifacts;
2 2
3 /**
4 * Instances of this interface are given to feed(), advance(), describe()
5 * and out() to enable the artifact to communicate with the runtime system.
6 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
7 */
3 public interface CallContext 8 public interface CallContext
4 { 9 {
10 /**
11 * Constant to signal that nothing should be done
12 * with the artifact after method return.
13 */
5 int NOTHING = 0; 14 int NOTHING = 0;
15 /**
16 * Constant to signal that the database timestamp
17 * should be updated after method return.
18 */
6 int TOUCH = 1; 19 int TOUCH = 1;
20 /**
21 * Constant to signal that the artifact should be stored
22 * after method return.
23 */
7 int STORE = 2; 24 int STORE = 2;
25 /**
26 * Constant to signal that the artifact fork a backgroud thread
27 * and should be hold in memory till it signals that it has
28 * finished its operation.
29 */
8 int BACKGROUND = 3; 30 int BACKGROUND = 3;
9 // int DELETE = 4; 31 // int DELETE = 4;
10 // int FOREVER = 5; 32 // int FOREVER = 5;
11 33
34 /**
35 * This method may be called from feed(), describe(), advance()
36 * and out to signal what should happend with artefact after
37 * the current method call returns.
38 * @param action Valid values are NOTHING, TOUCH, STORE, BACKGROUND.
39 */
12 void afterCall(int action); 40 void afterCall(int action);
13 41
42 /**
43 * When send to background with a afterCall(BACKGROUND) this
44 * method is to be called from the background thread to signal
45 * that the background operation has ended.
46 * @param action Same semantics as in afterCall.
47 */
14 void afterBackground(int action); 48 void afterBackground(int action);
15 49
50 /**
51 * Access to the global context of the runtime system.
52 * @return The global context.
53 */
16 Object globalContext(); 54 Object globalContext();
17 55
56 /**
57 * Access to the artifact database itself.
58 * @return The database.
59 */
18 ArtifactDatabase getDatabase(); 60 ArtifactDatabase getDatabase();
19 61
62 /**
63 * The meta data of the current call. Used to transport
64 * language preferences of the callee e.g.
65 * @return The meta information of this call.
66 */
20 CallMeta getMeta(); 67 CallMeta getMeta();
21 68
69 /**
70 * Each call context has a clipboard.
71 * getContextValue is used to fetch data from this board.
72 * @param key Key of the requested item.
73 * @return The value stored for the secified value, null if
74 * no item with this key exists.
75 */
22 Object getContextValue(Object key); 76 Object getContextValue(Object key);
23 77
78 /**
79 * Each call context has a clipboard.
80 * putContextValue is used to store a key/value pair onto this board.
81 * @param key The key of the pair
82 * @param value The value of the pair.
83 * @return The formerly stored value under the given key.
84 */
24 Object putContextValue(Object key, Object value); 85 Object putContextValue(Object key, Object value);
25 } 86 }
26 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: 87 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org