org.apache.shale.clay.config.beans
Class PageNotFoundException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.shale.clay.config.beans.PageNotFoundException
All Implemented Interfaces:
Serializable

public class PageNotFoundException
extends RuntimeException

This is an unchecked exception used to identify that a Clay template could not be found. The exception captures the requested resource to be compared to the view root. This is done by the ClayViewHandler in the renderView method. If the missing template and the viewId are the same, a HTTP 404 status code is sent to the client. If the missing template resource is nested in the page composition, the standard 500 status code will be returned.

See Also:
Serialized Form

Constructor Summary
PageNotFoundException(String message, String resource)
          Overloaded constructor requires an error message and the missing resource.
 
Method Summary
 String getResource()
          Returns the missing resource.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PageNotFoundException

public PageNotFoundException(String message,
                             String resource)

Overloaded constructor requires an error message and the missing resource.

Parameters:
message - error message
resource - missing resource
Method Detail

getResource

public String getResource()

Returns the missing resource.

Returns:
uri of the requested page


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.