01: package org.vraptor;
02:
03: import org.vraptor.view.ViewException;
04:
05: /**
06: * Interface for logic flow. Either the method execute or forward should be
07: * called.
08: *
09: * @author Guilherme Silveira
10: */
11: public interface LogicFlow {
12:
13: /**
14: * Executes the next interceptor or logic
15: *
16: * @throws LogicException
17: * some logic or interceptor problem
18: * @throws ViewException
19: * some view problem
20: *
21: */
22: void execute() throws ViewException, LogicException;
23:
24: /**
25: * Executes a server side redirect to this url. If a ViewException occurs it
26: * might be dangerous to try a server side forward (the end-user might get
27: * an unexpected combination of both pages).
28: *
29: * @param component
30: * target component
31: * @param logic
32: * target logic
33: * @throws RedirectException
34: *
35: * @deprecated you should use the usual for this, like
36: * <code>request.getRequest().getRequestDispatcher(url).
37: * forward(request.getRequest(), request.getResponse());</code>
38: *
39: */
40: @Deprecated
41: void redirect(String url) throws RedirectException;
42:
43: /**
44: * Returns the respective LogicRequest for this flow
45: *
46: * @return
47: */
48: LogicRequest getLogicRequest();
49:
50: }
|