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 transient IPage _page; |
33 |
| private String _pageName; |
34 |
| private String _targetIdPath; |
35 |
| private String _targetActionId; |
36 |
| |
37 |
0
| public StaleLinkException()
|
38 |
| { |
39 |
0
| super(null, null, null, null);
|
40 |
| } |
41 |
| |
42 |
| |
43 |
| |
44 |
| |
45 |
| |
46 |
| |
47 |
| |
48 |
0
| public StaleLinkException(IComponent component, String targetActionId, String targetIdPath)
|
49 |
| { |
50 |
0
| super(
|
51 |
| Tapestry.format( |
52 |
| "StaleLinkException.action-mismatch", |
53 |
| new String[] { targetActionId, component.getIdPath(), targetIdPath }), |
54 |
| component, |
55 |
| null, |
56 |
| null); |
57 |
| |
58 |
0
| _page = component.getPage();
|
59 |
0
| _pageName = _page.getPageName();
|
60 |
| |
61 |
0
| _targetActionId = targetActionId;
|
62 |
0
| _targetIdPath = targetIdPath;
|
63 |
| } |
64 |
| |
65 |
| |
66 |
| |
67 |
| |
68 |
| |
69 |
| |
70 |
0
| public StaleLinkException(IPage page, String targetActionId, String targetIdPath)
|
71 |
| { |
72 |
0
| this(
|
73 |
| Tapestry.format( |
74 |
| "StaleLinkException.component-mismatch", |
75 |
| targetActionId, |
76 |
| targetIdPath), |
77 |
| page); |
78 |
| |
79 |
0
| _targetActionId = targetActionId;
|
80 |
0
| _targetIdPath = targetIdPath;
|
81 |
| } |
82 |
| |
83 |
4
| public StaleLinkException(String message, IComponent component)
|
84 |
| { |
85 |
4
| super(message, component, null, null);
|
86 |
| } |
87 |
| |
88 |
| |
89 |
| |
90 |
0
| public String getPageName()
|
91 |
| { |
92 |
0
| return _pageName;
|
93 |
| } |
94 |
| |
95 |
| |
96 |
| |
97 |
| |
98 |
| |
99 |
| |
100 |
| |
101 |
0
| public IPage getPage()
|
102 |
| { |
103 |
0
| return _page;
|
104 |
| } |
105 |
| |
106 |
0
| public String getTargetActionId()
|
107 |
| { |
108 |
0
| return _targetActionId;
|
109 |
| } |
110 |
| |
111 |
0
| public String getTargetIdPath()
|
112 |
| { |
113 |
0
| return _targetIdPath;
|
114 |
| } |
115 |
| |
116 |
| } |