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

For more information, please explore the Attic.

Coverage Report - org.apache.shale.examples.test.tiger.Managed
 
Classes in this File Line Coverage Branch Coverage Complexity
Managed
0%
0/26
N/A
0
 
 1  
 /*
 2  
  * ApplicationBean.java
 3  
  *
 4  
  * Created on August 13, 2006, 10:04 AM
 5  
  *
 6  
  * To change this template, choose Tools | Template Manager
 7  
  * and open the template in the editor.
 8  
  */
 9  
 
 10  
 package org.apache.shale.examples.test.tiger;
 11  
 
 12  
 import org.apache.shale.tiger.managed.Bean;
 13  
 import org.apache.shale.tiger.managed.Property;
 14  
 import org.apache.shale.tiger.managed.Scope;
 15  
 import org.apache.shale.tiger.view.Destroy;
 16  
 import org.apache.shale.tiger.view.Init;
 17  
 import org.apache.shale.tiger.view.Preprocess;
 18  
 import org.apache.shale.tiger.view.Prerender;
 19  
 import org.apache.shale.tiger.view.View;
 20  
 
 21  
 /**
 22  
  * <p>View controller for the <code>/managed.jsp</code> view,
 23  
  * completely configured via annotations.</p>
 24  
  */
 25  
 @Bean(name="managed", scope=Scope.REQUEST)
 26  
 @View
 27  0
 public class Managed {
 28  
     
 29  
 
 30  
     // ------------------------------------------------------- Public Properties
 31  
 
 32  
 
 33  
     /**
 34  
      * <p>Injected application bean instance.</p>
 35  
      */
 36  
     @Property(value="#{applicationBean}")
 37  
     private ApplicationBean applicationBean;
 38  
 
 39  
     public ApplicationBean getApplicationBean() {
 40  0
         return this.applicationBean;
 41  
     }
 42  
 
 43  
     public void setApplicationBean(ApplicationBean applicationBean) {
 44  0
         this.applicationBean = applicationBean;
 45  0
     }
 46  
 
 47  
 
 48  
     /**
 49  
      * <p>Return the events that have occurred so far.</p>
 50  
      */
 51  0
     private StringBuffer events = new StringBuffer();
 52  
 
 53  
     public String getEvents() {
 54  0
         return events.toString();
 55  
     }
 56  
 
 57  
 
 58  
 
 59  
     /**
 60  
      * <p>Injected request bean instance.</p>
 61  
      */
 62  
     @Property(value="#{requestBean}")
 63  
     private RequestBean requestBean;
 64  
 
 65  
     public RequestBean getRequestBean() {
 66  0
         return this.requestBean;
 67  
     }
 68  
 
 69  
     public void setRequestBean(RequestBean requestBean) {
 70  0
         this.requestBean = requestBean;
 71  0
     }
 72  
 
 73  
 
 74  
     /**
 75  
      * <p>Injected session bean instance.</p>
 76  
      */
 77  
     @Property(value="#{sessionBean}")
 78  
     private SessionBean sessionBean;
 79  
 
 80  
     public SessionBean getSessionBean() {
 81  0
         return this.sessionBean;
 82  
     }
 83  
 
 84  
     public void setSessionBean(SessionBean sessionBean) {
 85  0
         this.sessionBean = sessionBean;
 86  0
     }
 87  
 
 88  
 
 89  
     // -------------------------------------------------------- Lifecycle Events
 90  
 
 91  
 
 92  
     @Init
 93  
     public void myInit() {
 94  0
         events.append("init/");
 95  0
         System.out.println("ManagedBean.init()");
 96  0
     }
 97  
 
 98  
 
 99  
     @Preprocess
 100  
     public void myPreprocess() {
 101  0
         events.append("preprocess/");
 102  0
         System.out.println("ManagedBean.preprocess()");
 103  0
     }
 104  
 
 105  
 
 106  
     @Prerender
 107  
     public void myPrerender() {
 108  0
         events.append("prerender/");
 109  0
         System.out.println("ManagedBean.prerender()");
 110  0
     }
 111  
 
 112  
 
 113  
     @Destroy
 114  
     public void myDestroy() {
 115  0
         events.append("destroy/");
 116  0
         System.out.println("ManagedBean.destroy()");
 117  0
     }
 118  
 
 119  
 
 120  
     // ------------------------------------------------------------- View Events
 121  
 
 122  
 
 123  
     // Process a click on the resubmit link
 124  
     public String resubmit() {
 125  0
         System.out.println("ManagedBean.resubmit()");
 126  0
         return null;
 127  
     }
 128  
 
 129  
 
 130  
 }