Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Nonview1 |
|
| 0.0;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: Nonview1.java 489557 2006-12-22 05:23:13Z craigmcc $ | |
18 | */ | |
19 | ||
20 | package org.apache.shale.examples.test.tiger; | |
21 | ||
22 | import org.apache.shale.tiger.managed.Bean; | |
23 | import org.apache.shale.tiger.managed.Property; | |
24 | import org.apache.shale.tiger.managed.Scope; | |
25 | import org.apache.shale.tiger.view.Destroy; | |
26 | import org.apache.shale.tiger.view.Init; | |
27 | import org.apache.shale.tiger.view.Preprocess; | |
28 | import org.apache.shale.tiger.view.Prerender; | |
29 | import org.apache.shale.tiger.view.View; | |
30 | ||
31 | /** | |
32 | * <p>First page for non-ViewController event tests.</p> | |
33 | */ | |
34 | @Bean(name="nonview1", scope=Scope.REQUEST) @View | |
35 | public class Nonview1 { | |
36 | ||
37 | ||
38 | // ------------------------------------------------------------- Constructor | |
39 | ||
40 | ||
41 | /** Construct an uninitialized instance. */ | |
42 | 0 | public Nonview1() { |
43 | 0 | System.out.println("Nonview1.constructor()"); |
44 | 0 | } |
45 | ||
46 | ||
47 | // -------------------------------------------------------------- Properties | |
48 | ||
49 | ||
50 | // The "Recorder" object for this request | |
51 | @Property(value="#{recorder}") | |
52 | 0 | private Recorder recorder = null; |
53 | public Recorder getRecorder() { | |
54 | 0 | return this.recorder; |
55 | } | |
56 | public void setRecorder(Recorder recorder) { | |
57 | 0 | this.recorder = recorder; |
58 | 0 | } |
59 | ||
60 | ||
61 | // ------------------------------------------------------- Lifecycle Methods | |
62 | ||
63 | ||
64 | /** | |
65 | * <p>Record an init event.</p> | |
66 | */ | |
67 | @Init | |
68 | public void init() { | |
69 | 0 | getRecorder().record("init1"); |
70 | 0 | System.out.println("Nonview1.init()"); |
71 | 0 | } |
72 | ||
73 | ||
74 | /** | |
75 | * <p>Record a preprocess event.</p> | |
76 | */ | |
77 | @Preprocess | |
78 | public void preprocess() { | |
79 | 0 | getRecorder().record("preprocess1"); |
80 | 0 | System.out.println("Nonview1.preprocess()"); |
81 | 0 | } |
82 | ||
83 | ||
84 | /** | |
85 | * <p>Record a prerender event.</p> | |
86 | */ | |
87 | @Prerender | |
88 | public void prerender() { | |
89 | 0 | getRecorder().record("prerender1"); |
90 | 0 | System.out.println("Nonview1.prerender()"); |
91 | 0 | } |
92 | ||
93 | ||
94 | /** | |
95 | * <p>Record a destroy event.</p> | |
96 | */ | |
97 | @Destroy | |
98 | public void destroy() { | |
99 | 0 | getRecorder().record("destroy1"); |
100 | 0 | System.out.println("Nonview1.destroy()"); |
101 | 0 | } |
102 | ||
103 | ||
104 | } |