2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.shale.clay.config.beans;
22
23 /***
24 * <p>This is an unchecked exception used to identify that
25 * a {@link org.apache.shale.clay.component.Clay} template
26 * could not be found. The exception captures the requested
27 * resource to be compared to the view root. This is done
28 * by the {@link org.apache.shale.clay.faces.ClayViewHandler}
29 * in the <code>renderView</code> method. If the missing
30 * template and the <code>viewId</code> are the same, a
31 * HTTP 404 status code is sent to the client. If the
32 * missing template resource is nested in the page composition,
33 * the standard 500 status code will be returned.
34 *</p>
35 */
36 public class PageNotFoundException extends RuntimeException {
37
38 /***
39 * <p>Unique serial is use in object serialization.</p>
40 */
41 private static final long serialVersionUID = 3258689897039672375L;
42 /***
43 * <p>The requested resource.</p>
44 */
45 private String resource = null;
46
47 /***
48 * <p>Overloaded constructor requires an error message
49 * and the missing resource.</p>
50 *
51 * @param message error message
52 * @param resource missing resource
53 */
54 public PageNotFoundException(String message, String resource) {
55 super(message);
56 this.resource = resource;
57 }
58
59 /***
60 * <p>Returns the missing resource.</p>
61 *
62 * @return uri of the requested page
63 */
64 public String getResource() {
65 return resource;
66 }
67
68
69 }