01: /*
02: * Created on Oct 10, 2005
03: */
04: package uk.org.ponder.rsf.flow;
05:
06: import uk.org.ponder.rsf.viewstate.AnyViewParameters;
07:
08: /** An object summarising the return from the ActionResultInterpreter. This
09: * embodies the flow of the application by determining the resulting view to
10: * be shown on the next cycle, as well as giving instructions for the disposal
11: * or propagation of the current request-scope state.
12: * @author Antranig Basman (antranig@caret.cam.ac.uk)
13: *
14: */
15: public class ARIResult {
16: /** The request scope state will be propagated to the token held by the
17: * view parameters shown in the next request cycle.
18: */
19: public static final String PROPAGATE = "propagate";
20: /** No propagation will be performed of request state - in addition any
21: * tokens sharing this state will be unlinked from it. Return this code
22: * at the successful conclusion of either a multi-request wizard, or of a
23: * single request.
24: */
25: public static final String FLOW_END = "flow-end";
26: /** THIS VALUE IS NOT YET SUPPORTED! Indicate that the following view
27: * will represent a "forked" instance of the flow in progress, with a clone
28: * of all of its flow state. Will anyone really want this?
29: */
30: public static final String FLOW_FORK = "flow-fork";
31:
32: /** A flow that will begin and end in a single cycle - i.e. will
33: * immediately enter the "end-flow" condition. The current view must be
34: * free of any flow state, end-flow or otherwise. In effect, perform
35: * FLOW_FASTSTART and FLOW_END simultaneously.
36: */
37: public static final String FLOW_ONESTEP = "flow-onestep";
38:
39: /** An action name representing the start of a flow. This kind of flow is
40: * safe to launch from the end-state of an existing flow. Although not
41: * from an internal state of an existing flow. **/
42: public static final String FLOW_START = "flow-start";
43:
44: /** Launches a new flow, in "fast" mode, i.e. performing the same
45: * preservation that is performed in interior states. This may not
46: * be used in either internal or end states of another flow.
47: */
48: public static final String FLOW_FASTSTART = "flow-faststart";
49:
50: /** Propagate the request scope state only as an "error" state - i.e. this
51: * represents an erroneous submission from a single-request submission.
52: * The default implementation will expire the storage of this state on
53: * a more rapid schedule than "normal" multi-request state (on the order
54: * of minutes rather than hours).
55: */
56:
57: // public static final String PROPAGATE_ERROR_ONLY = "propagate error only";
58: /** The view to be shown on the next cycle. The <code>tokenid</code> field
59: * will be overwritten by RSF with a unique token before it is dispensed
60: * to the client via the client redirect.
61: */
62: public AnyViewParameters resultingView;
63:
64: /** A result code indicating the propagation status of any multi-request state
65: * required by the next view to be rendered. This code is chosen from one of the
66: * FLOW_ String values above.
67: */
68: public String propagateBeans;
69:
70: /** Pea proxying method **/
71: public ARIResult get() {
72: return this;
73: }
74: }
|