Clover coverage report - Code Coverage for tapestry release 3.1-alpha-1
Coverage timestamp: Mon Feb 21 2005 09:16:14 EST
file stats: LOC: 89   Methods: 4
NCLOC: 34   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
WMLEngine.java - 100% 100% 100%
coverage
 1   
 // Copyright 2004, 2005 The Apache Software Foundation
 2   
 //
 3   
 // Licensed under the Apache License, Version 2.0 (the "License");
 4   
 // you may not use this file except in compliance with the License.
 5   
 // You may obtain a copy of the License at
 6   
 //
 7   
 //     http://www.apache.org/licenses/LICENSE-2.0
 8   
 //
 9   
 // Unless required by applicable law or agreed to in writing, software
 10   
 // distributed under the License is distributed on an "AS IS" BASIS,
 11   
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12   
 // See the License for the specific language governing permissions and
 13   
 // limitations under the License.
 14   
 
 15   
 package org.apache.tapestry.wml;
 16   
 
 17   
 import javax.servlet.ServletException;
 18   
 
 19   
 import org.apache.tapestry.IRequestCycle;
 20   
 import org.apache.tapestry.Tapestry;
 21   
 import org.apache.tapestry.engine.BaseEngine;
 22   
 
 23   
 /**
 24   
  *  Subclass of {@link BaseEngine} used for WML applications to change the
 25   
  *  Exception, StaleLink and StaleSession pages.
 26   
  *
 27   
  *  @author David Solis
 28   
  *  @since 3.0
 29   
  * 
 30   
  **/
 31   
 
 32   
 public class WMLEngine extends BaseEngine
 33   
 {
 34  3
     protected void activateExceptionPage(
 35   
         IRequestCycle cycle,
 36   
         org.apache.tapestry.request.ResponseOutputStream output,
 37   
         Throwable cause)
 38   
         throws ServletException
 39   
     {
 40  3
         super.activateExceptionPage(cycle, output, cause);
 41   
         // Sometimes the exception page isn't enough
 42  3
         reportException(
 43   
             Tapestry.getMessage("AbstractEngine.unable-to-process-client-request"),
 44   
             cause);
 45   
     }
 46   
 
 47   
 
 48   
     /** @since 3.0 **/
 49   
 
 50  3
     protected String getExceptionPageName()
 51   
     {
 52  3
         return EXCEPTION_PAGE;
 53   
     }
 54   
     
 55   
     /** @since 3.0 **/
 56   
 
 57  1
     protected String getStaleLinkPageName()
 58   
     {
 59  1
         return STALE_LINK_PAGE;
 60   
     }
 61   
 
 62   
     /** @since 3.0 **/
 63   
 
 64  3
     protected String getStaleSessionPageName()
 65   
     {
 66  3
         return STALE_SESSION_PAGE;
 67   
     }
 68   
 
 69   
     /**
 70   
      *  The name of the page used for reporting exceptions.
 71   
      *  
 72   
      **/
 73   
     private static final String EXCEPTION_PAGE = "WMLException";
 74   
 
 75   
     /**
 76   
      *  The name of the page used for reporting stale links.
 77   
      *
 78   
      * */
 79   
 
 80   
     private static final String STALE_LINK_PAGE = "WMLStaleLink";
 81   
 
 82   
     /**
 83   
      *  The name of the page used for reporting state sessions.
 84   
      *
 85   
      **/
 86   
 
 87   
     private static final String STALE_SESSION_PAGE = "WMLStaleSession";
 88   
 }
 89