|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| package org.apache.tapestry; |
|
16 |
| |
|
17 |
| import org.apache.hivemind.ApplicationRuntimeException; |
|
18 |
| |
|
19 |
| |
|
20 |
| |
|
21 |
| |
|
22 |
| |
|
23 |
| |
|
24 |
| |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| public class StaleLinkException extends ApplicationRuntimeException |
|
31 |
| { |
|
32 |
| private static final long serialVersionUID = -1266992401198999606L; |
|
33 |
| |
|
34 |
| private transient IPage _page; |
|
35 |
| private String _pageName; |
|
36 |
| private String _targetIdPath; |
|
37 |
| private String _targetActionId; |
|
38 |
| |
|
39 |
0
| public StaleLinkException()
|
|
40 |
| { |
|
41 |
0
| super(null, null, null, null);
|
|
42 |
| } |
|
43 |
| |
|
44 |
| |
|
45 |
| |
|
46 |
| |
|
47 |
| |
|
48 |
| |
|
49 |
| |
|
50 |
0
| public StaleLinkException(IComponent component, String targetActionId, String targetIdPath)
|
|
51 |
| { |
|
52 |
0
| super(
|
|
53 |
| Tapestry.format( |
|
54 |
| "StaleLinkException.action-mismatch", |
|
55 |
| new String[] { targetActionId, component.getIdPath(), targetIdPath }), |
|
56 |
| component, |
|
57 |
| null, |
|
58 |
| null); |
|
59 |
| |
|
60 |
0
| _page = component.getPage();
|
|
61 |
0
| _pageName = _page.getPageName();
|
|
62 |
| |
|
63 |
0
| _targetActionId = targetActionId;
|
|
64 |
0
| _targetIdPath = targetIdPath;
|
|
65 |
| } |
|
66 |
| |
|
67 |
| |
|
68 |
| |
|
69 |
| |
|
70 |
| |
|
71 |
| |
|
72 |
0
| public StaleLinkException(IPage page, String targetActionId, String targetIdPath)
|
|
73 |
| { |
|
74 |
0
| this(
|
|
75 |
| Tapestry.format( |
|
76 |
| "StaleLinkException.component-mismatch", |
|
77 |
| targetActionId, |
|
78 |
| targetIdPath), |
|
79 |
| page); |
|
80 |
| |
|
81 |
0
| _targetActionId = targetActionId;
|
|
82 |
0
| _targetIdPath = targetIdPath;
|
|
83 |
| } |
|
84 |
| |
|
85 |
12
| public StaleLinkException(String message, IComponent component)
|
|
86 |
| { |
|
87 |
12
| super(message, component, null, null);
|
|
88 |
| } |
|
89 |
| |
|
90 |
| |
|
91 |
| |
|
92 |
0
| public String getPageName()
|
|
93 |
| { |
|
94 |
0
| return _pageName;
|
|
95 |
| } |
|
96 |
| |
|
97 |
| |
|
98 |
| |
|
99 |
| |
|
100 |
| |
|
101 |
| |
|
102 |
| |
|
103 |
0
| public IPage getPage()
|
|
104 |
| { |
|
105 |
0
| return _page;
|
|
106 |
| } |
|
107 |
| |
|
108 |
0
| public String getTargetActionId()
|
|
109 |
| { |
|
110 |
0
| return _targetActionId;
|
|
111 |
| } |
|
112 |
| |
|
113 |
0
| public String getTargetIdPath()
|
|
114 |
| { |
|
115 |
0
| return _targetIdPath;
|
|
116 |
| } |
|
117 |
| |
|
118 |
| } |