1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.application.navigation; |
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
public class NavigationCaseContext { |
22 | |
|
23 | |
private String fromAction_; |
24 | |
|
25 | |
private String fromOutcome_; |
26 | |
|
27 | |
private String toViewId_; |
28 | |
|
29 | 20 | private boolean redirect_ = false; |
30 | |
|
31 | |
public NavigationCaseContext(String fromAction, String outcome, |
32 | 17 | String toViewId, boolean redirect) { |
33 | 17 | fromAction_ = fromAction; |
34 | 17 | fromOutcome_ = outcome; |
35 | 17 | toViewId_ = toViewId; |
36 | 17 | redirect_ = redirect; |
37 | 17 | } |
38 | |
|
39 | |
public NavigationCaseContext(String fromAction, String outcome) { |
40 | 0 | this(fromAction, outcome, null, false); |
41 | 0 | } |
42 | |
|
43 | 3 | public NavigationCaseContext() { |
44 | 3 | } |
45 | |
|
46 | |
public String getFromAction() { |
47 | 26 | return fromAction_; |
48 | |
} |
49 | |
|
50 | |
public String getFromOutcome() { |
51 | 26 | return fromOutcome_; |
52 | |
} |
53 | |
|
54 | |
public boolean isRedirect() { |
55 | 13 | return redirect_; |
56 | |
} |
57 | |
|
58 | |
public String getToViewId() { |
59 | 17 | return toViewId_; |
60 | |
} |
61 | |
|
62 | |
public void setFromAction(String fromAction) { |
63 | 3 | fromAction_ = fromAction; |
64 | 3 | } |
65 | |
|
66 | |
public void setFromOutcome(String fromOutcome) { |
67 | 3 | fromOutcome_ = fromOutcome; |
68 | 3 | } |
69 | |
|
70 | |
public void setRedirect(boolean redirect) { |
71 | 3 | redirect_ = redirect; |
72 | 3 | } |
73 | |
|
74 | |
public void setToViewId(String toViewId) { |
75 | 3 | toViewId_ = toViewId; |
76 | 3 | } |
77 | |
|
78 | |
public String toString() { |
79 | 1 | StringBuffer buf = new StringBuffer(50); |
80 | 1 | buf.append("navigation-case = "); |
81 | 1 | buf.append("["); |
82 | 1 | buf.append(" from-action = \"" + fromAction_ + "\""); |
83 | 1 | buf.append(" from-outcome = \"" + fromOutcome_ + "\""); |
84 | 1 | buf.append(" to-view-id = \"" + toViewId_ + "\""); |
85 | 1 | buf.append(" redirect = \"" + redirect_ + "\""); |
86 | 1 | buf.append("]"); |
87 | 1 | return buf.toString(); |
88 | |
} |
89 | |
|
90 | |
} |