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

For more information, please explore the Attic.

Coverage Report - org.apache.shale.examples.test.tiger.RequestBean
 
Classes in this File Line Coverage Branch Coverage Complexity
RequestBean
0%
0/15
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.Request;
 18  
 
 19  
 /**
 20  
  * <p>Request scope managed bean declared with annotations.</p>
 21  
  */
 22  
 @Request
 23  
 @Bean(name="requestBean", scope=Scope.REQUEST)
 24  0
 public class RequestBean {
 25  
     
 26  
 
 27  
     // ------------------------------------------------------- Public Properties
 28  
 
 29  
 
 30  
     /**
 31  
      * <p>Injected application bean instance.</p>
 32  
      */
 33  
     @Property(value="#{applicationBean}")
 34  
     private ApplicationBean applicationBean;
 35  
 
 36  
     public ApplicationBean getApplicationBean() {
 37  0
         return this.applicationBean;
 38  
     }
 39  
 
 40  
     public void setApplicationBean(ApplicationBean applicationBean) {
 41  0
         this.applicationBean = applicationBean;
 42  0
     }
 43  
 
 44  
 
 45  
     /**
 46  
      * <p>Return the events that have occurred so far.</p>
 47  
      */
 48  0
     private StringBuffer events = new StringBuffer();
 49  
 
 50  
     public String getEvents() {
 51  0
         return events.toString();
 52  
     }
 53  
 
 54  
 
 55  
 
 56  
     /**
 57  
      * <p>Injected session bean instance.</p>
 58  
      */
 59  
     @Property(value="#{sessionBean}")
 60  
     private SessionBean sessionBean;
 61  
 
 62  
     public SessionBean getSessionBean() {
 63  0
         return this.sessionBean;
 64  
     }
 65  
 
 66  
     public void setSessionBean(SessionBean sessionBean) {
 67  0
         this.sessionBean = sessionBean;
 68  0
     }
 69  
 
 70  
 
 71  
     // -------------------------------------------------------- Lifecycle Events
 72  
 
 73  
 
 74  
     @Init
 75  
     public void myInit() {
 76  0
         events.append("init/");
 77  0
         System.out.println("RequestBean.init()");
 78  0
     }
 79  
 
 80  
 
 81  
     @Destroy
 82  
     public void myDestroy() {
 83  0
         events.append("destroy/");
 84  0
         System.out.println("RequestBean.destroy()");
 85  0
     }
 86  
 
 87  
 
 88  
 }