01: /*
02: * Copyright 2005-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
05: * in compliance with the License. You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software distributed under the License
10: * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11: * or implied. See the License for the specific language governing permissions and limitations under
12: * the License.
13: */
14:
15: package org.strecks.injection.handler.impl;
16:
17: import javax.servlet.http.HttpServletRequest;
18: import javax.servlet.http.HttpServletResponse;
19:
20: import org.apache.struts.action.Action;
21: import org.apache.struts.action.ActionForm;
22: import org.apache.struts.action.ActionForward;
23: import org.apache.struts.action.ActionMapping;
24: import org.strecks.injection.annotation.InjectSpringBean;
25:
26: /**
27: * @author Phil Zoio
28: */
29: public class SpringBeanAction extends Action {
30:
31: private Integer springBean;
32:
33: private Integer namedSpringBean;
34:
35: public Integer getSpringBean() {
36: return springBean;
37: }
38:
39: @InjectSpringBean()
40: public void setSpringBean(Integer springBean) {
41: this .springBean = springBean;
42: }
43:
44: public Integer getNamedSpringBean() {
45: return namedSpringBean;
46: }
47:
48: @InjectSpringBean(name="springBean")
49: public void setNamedSpringBean(Integer namedSpringBean) {
50: this .namedSpringBean = namedSpringBean;
51: }
52:
53: public void executeAction() {
54: throw new UnsupportedOperationException();
55: }
56:
57: public ActionForward execute() {
58: throw new UnsupportedOperationException();
59: }
60:
61: public Action clone() {
62:
63: return null;
64: }
65:
66: public void setEnvironment(ActionMapping mapping, ActionForm form,
67: HttpServletRequest request, HttpServletResponse response) {
68:
69: }
70:
71: public void preBind() {
72:
73: }
74:
75: public ActionForward cancel() {
76:
77: return null;
78: }
79:
80: public ActionForward handleRuntimeException(RuntimeException e) {
81:
82: return null;
83: }
84:
85: }
|