1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 package nl.openedge.baritus.interceptors;
32
33 import javax.servlet.ServletException;
34
35 import nl.openedge.baritus.FormBeanContext;
36
37 import org.infohazard.maverick.flow.ControllerContext;
38
39 /***
40 * Registered instances will have their command method executed after the
41 * normal action execution took place. That means that makeFormBean was called,
42 * the form was populated and - if that population was succesfull - the
43 * command method was called prior to this execution. Hence, this interceptor
44 * will allways be executed, regardless population/ validation and regardless
45 * whether the perform method actually was executed.
46 *
47 * @author Eelco Hillenius
48 */
49 public interface AfterPerformInterceptor extends Interceptor
50 {
51
52 /***
53 * Executed after the normal action execution took place. That means that
54 * makeFormBean was called, the form was populated and - if that population
55 * was succesfull - the command method was called prior to this execution.
56 * Hence, this interceptor will allways be executed, regardless
57 * population/ validation and regardless whether the perform method
58 * actually was executed.
59 *
60 * NOTE. You cannot be sure that the form was populated successfully. Therefore
61 * it's dangerous and generally bad practice to rely on form properties that are
62 * populated from the http request. A good usage example: a lot of views need
63 * data to fill their dropdown lists etc. In this method, you could load that data and
64 * save it in the form (or as a request attribute if that's your style). As this method
65 * is allways executed, you have a guaranteed data delivery to your view, regardless
66 * the normal execution outcome of the control.
67 *
68 * @param cctx maverick context
69 * @param formBeanContext the context with the (possibly succesfull) populated formBean
70 * @throws ServletException
71 * @throws RedirectingException when an interceptor wants to redirect
72 * @throws DirectReturnFlowException when an interceptor wants to return directly
73 */
74 public void doAfterPerform(
75 ControllerContext cctx,
76 FormBeanContext formBeanContext)
77 throws ServletException,
78 DispatchNowFlowException,
79 ReturnNowFlowException;
80
81 }