2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

Coverage Report - org.apache.shale.examples.test.tiger.Annotated
 
Classes in this File Line Coverage Branch Coverage Complexity
Annotated
0%
0/19
N/A
0
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to you under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  *
 17  
  * $Id: Annotated.java 464373 2006-10-16 04:21:54Z rahul $
 18  
  */
 19  
 
 20  
 package org.apache.shale.examples.test.tiger;
 21  
 
 22  
 import javax.faces.context.FacesContext;
 23  
 import org.apache.shale.tiger.view.Destroy;
 24  
 import org.apache.shale.tiger.view.Init;
 25  
 import org.apache.shale.tiger.view.Preprocess;
 26  
 import org.apache.shale.tiger.view.Prerender;
 27  
 import org.apache.shale.tiger.view.View;
 28  
 import org.apache.shale.view.faces.FacesConstants;
 29  
 
 30  
 /**
 31  
  * <p>View Controller class for <code>/standard.jsp</code>.
 32  
  * This class uses Tiger Extensions annotations, so it should
 33  
  * receive lifecycle callbacks equivalent to a class that
 34  
  * implements <code>ViewController</code>.</p>
 35  
  */
 36  
 @View
 37  0
 public class Annotated {
 38  
     
 39  
 
 40  
     // ------------------------------------------------------ Instance Variables
 41  
 
 42  
 
 43  
     /**
 44  
      * <p>Sequence number for identifying order of event callbacks.</p>
 45  
      */
 46  0
     private int sequence = 0;
 47  
 
 48  
 
 49  
     // -------------------------------------------------------------- Properties
 50  
 
 51  
 
 52  
     /**
 53  
      * <p>Calling order for the init() method.</p>
 54  
      */
 55  0
     private int initCalled = 0;
 56  
 
 57  
     public int getInitCalled() {
 58  0
         return initCalled;
 59  
     }
 60  
 
 61  
 
 62  
     /**
 63  
      * <p>Calling order for the preprocess() method.</p>
 64  
      */
 65  0
     private int preprocessCalled = 0;
 66  
 
 67  
     public int getPreprocessCalled() {
 68  0
         return preprocessCalled;
 69  
     }
 70  
 
 71  
 
 72  
     /**
 73  
      * <p>Calling order for the prerender() method.</p>
 74  
      */
 75  0
     private int prerenderCalled = 0;
 76  
 
 77  
     public int getPrerenderCalled() {
 78  0
         return prerenderCalled;
 79  
     }
 80  
 
 81  
 
 82  
     /**
 83  
      * <p>Calling order for the destroy() method.</p>
 84  
      */
 85  0
     private int destroyCalled = 0;
 86  
 
 87  
     public int getDestroyCalled() {
 88  0
         return destroyCalled;
 89  
     }
 90  
 
 91  
 
 92  
     // -------------------------------------------------------- Lifecycle Events
 93  
 
 94  
 
 95  
     // Record the order in which each event was called
 96  
 
 97  
     @Init
 98  
     public void myInit() {
 99  0
         initCalled = ++sequence;
 100  0
     }
 101  
 
 102  
     @Preprocess
 103  
     public void myPreprocess() {
 104  0
         preprocessCalled = ++sequence;
 105  0
     }
 106  
 
 107  
     @Prerender
 108  
     public void myPrerender() {
 109  0
         prerenderCalled = ++sequence;
 110  0
     }
 111  
 
 112  
     @Destroy
 113  
     public void myDestroy() {
 114  0
         destroyCalled = ++sequence;
 115  0
     }
 116  
 
 117  
 
 118  
     // ------------------------------------------------------------- View Events
 119  
 
 120  
 
 121  
     // Process a click on the resubmit link
 122  
     public String resubmit() {
 123  0
         return null;
 124  
     }
 125  
 
 126  
 
 127  
 }