View Javadoc

1   /*
2    * $Id: TestAction.java 439747 2006-09-03 09:22:46Z mrdon $
3    *
4    * Copyright 2006 The Apache Software Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  package org.apache.struts2;
19  
20  import java.util.Collection;
21  import java.util.List;
22  import java.util.Map;
23  
24  import org.apache.struts2.views.jsp.ui.User;
25  
26  import com.opensymphony.xwork2.Action;
27  import com.opensymphony.xwork2.ActionSupport;
28  
29  
30  /***
31   */
32  public class TestAction extends ActionSupport {
33  
34  	private static final long serialVersionUID = -8891365561914451494L;
35  	
36  	private Collection collection;
37      private Collection collection2;
38      private Map map;
39      private String foo;
40      private String result;
41      private User user;
42      private String[] array;
43      private String[][] list;
44      private List list2;
45      private List list3;
46  
47      public Collection getCollection() {
48          return collection;
49      }
50  
51      public void setCollection(Collection collection) {
52          this.collection = collection;
53      }
54  
55      public Map getMap() {
56          return map;
57      }
58  
59      public void setMap(Map map) {
60          this.map = map;
61      }
62  
63      public String getFoo() {
64          return foo;
65      }
66  
67      public void setFoo(String foo) {
68          this.foo = foo;
69      }
70  
71      public String getResult() {
72          return result;
73      }
74  
75      public void setResult(String result) {
76          this.result = result;
77      }
78  
79      public User getUser() {
80          return user;
81      }
82  
83      public void setUser(User user) {
84          this.user = user;
85      }
86  
87      public String[] getArray() {
88          return array;
89      }
90  
91      public void setArray(String[] array) {
92          this.array = array;
93      }
94  
95      public String[][] getList() {
96          return list;
97      }
98  
99      public void setList(String[][] list) {
100         this.list = list;
101     }
102 
103     public List getList2() {
104         return list2;
105     }
106 
107     public void setList2(List list2) {
108         this.list2 = list2;
109     }
110 
111     public void setList3(List list) {
112     	this.list3 = list;
113     }
114     
115     public List getList3() {
116     	return this.list3;
117     }
118     
119     public Collection getCollection2() {
120     	return this.collection2;
121     }
122     
123     public void setCollection2(Collection collection) {
124     	this.collection2 = collection;
125     }
126     
127     public String execute() throws Exception {
128         if (result == null) {
129             result = Action.SUCCESS;
130         }
131 
132         return result;
133     }
134 
135     public String doInput() throws Exception {
136         return INPUT;
137     }
138     
139 }