View Javadoc

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