1 /*
2 * ConsoleForm.java
3 *
4 * Created on February 10, 2003, 9:25 AM
5 */
6
7 package com.mlw.fps.view.form;
8
9 import java.util.HashMap;
10 import java.util.Map;
11
12 import javax.servlet.ServletRequest;
13
14 import org.apache.struts.action.ActionForm;
15 import org.apache.struts.action.ActionMapping;
16
17 import com.mlw.fps.model.business.bean.SystemProperties;
18
19 /***
20 *
21 * @author Matthew Wilson
22 */
23 public class ConsoleForm extends ActionForm
24 {
25 /*** Holds value of property action. */
26 private String action;
27 private Map options = null;
28
29 /*** Creates a new instance of ConsoleForm
30 */
31 public ConsoleForm()
32 {
33 }
34
35 public void setOption(String key, Object value)
36 {
37 getOptions().put(key, value);
38 }
39
40 public Object getOption(String key)
41 {
42 return getOptions().get(key);
43 }
44
45 public Map getOptions()
46 {
47 if( options==null ) options = new HashMap(5);
48 return options;
49 }
50
51 public void setOptions(Map options)
52 {
53 this.options = new HashMap(options);
54 }
55
56 /*** Getter for property action.
57 * @return Value of property action.
58 */
59 public String getAction()
60 {
61 return this.action;
62 }
63
64 /*** Setter for property action.
65 * @param action New value of property action.
66 */
67 public void setAction(String action)
68 {
69 this.action=action;
70 }
71
72 /* (non-Javadoc)
73 * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.ServletRequest)
74 */
75 public void reset(ActionMapping mapping, ServletRequest request)
76 {
77 setOptions( SystemProperties.toMap() );
78 super.reset(mapping, request);
79 }
80
81 }
This page was automatically generated by Maven