KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > dispatcher > mapper > ActionMapping


1 package com.opensymphony.webwork.dispatcher.mapper;
2
3 import java.util.Map JavaDoc;
4
5 /**
6  * Simple class that holds the action mapping information used to invoke a
7  * WebWork action. The name and namespace are required, but the params map
8  * is optional, and as such may be null. If a params map is supplied,
9  * it <b>must</b> be a mutable map, such as a HashMap.
10  *
11  * @author Patrick Lightbody
12  */

13 public class ActionMapping {
14     private String JavaDoc name;
15     private String JavaDoc namespace;
16     private String JavaDoc method;
17     private Map JavaDoc params;
18
19     public ActionMapping(String JavaDoc name, String JavaDoc namespace, String JavaDoc method, Map JavaDoc params) {
20         this.name = name;
21         this.namespace = namespace;
22         this.method = method;
23         this.params = params;
24     }
25
26     public String JavaDoc getName() {
27         return name;
28     }
29
30     public String JavaDoc getNamespace() {
31         return namespace;
32     }
33
34     public Map JavaDoc getParams() {
35         return params;
36     }
37
38     public String JavaDoc getMethod() {
39         if (null != method && "".equals(method)) {
40             return null;
41         } else {
42             return method;
43         }
44     }
45 }
46
Popular Tags