KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > util > events > EventParameter


1 package de.webman.util.events;
2
3 import com.teamkonzept.lib.*;
4
5 /**
6  * über getParameter_<Event> erhählt man eine Liste von Parametern für
7  * diesen Event -- zum Erzeugen eines Events außerhalb von templates
8  *
9  * @author sebastian
10  * @version 1.00
11 */

12
13 public class EventParameter
14 {
15     /** fügt den Parameter name,value zu list hinzu
16         @param TKVector list Liste mit den Parametern
17         @param name Name des Parameters
18         @param value Wert des Parameters
19     */

20     private static void putParameter(TKVector list, String JavaDoc name, Object JavaDoc value)
21     {
22         TKHashtable param = new TKHashtable();
23         param.put("NAME", name);
24         param.put("VALUE", value);
25         list.add(param);
26     }
27     
28     /** gibt eine Liste der für CT_EDIT benötigten Parameter zurück
29         @param formid - ID des Formulars
30         @param formtype - Formulartype
31         @return TKVector - liste der Parameter
32     */

33     public static TKVector getParameter_CT_EDIT(Integer JavaDoc formid, Integer JavaDoc formtype)
34     {
35         TKVector back = new TKVector();
36         putParameter(back, "FORM_ID", formid);
37         putParameter(back, "FORM_TYPE", formtype);
38         return back;
39     }
40     
41     /** @see getParameter_CT_EDIT */
42     public static TKVector getParameter_CE_GROUP_LIST(Integer JavaDoc group_node_id, Integer JavaDoc content_node_type, Integer JavaDoc content_form)
43     {
44         TKVector back = new TKVector();
45         putParameter(back, "GROUP_CONTENT_NODE_ID", group_node_id);
46         putParameter(back, "CONTENT_NODE_TYPE", content_node_type);
47         putParameter(back, "CONTENT_FORM", content_form);
48         return back;
49     }
50
51     /** @see getParameter_CT_EDIT */
52     public static TKVector getParameter_CE_ONLINE(Integer JavaDoc content_node_id, boolean isgroup, boolean isnew, boolean showgroup)
53     {
54         TKVector back = new TKVector();
55         if (showgroup)
56             putParameter(back, "GROUP_CONTENT_NODE_ID", content_node_id);
57         else
58             putParameter(back, "CONTENT_NODE_ID", content_node_id);
59         if (isgroup)
60             putParameter(back,"GROUP","1");
61         if (isnew)
62             putParameter(back,"NEW","1");
63             
64         return back;
65     }
66     
67     /** @see getParameter_CT_EDIT */
68     public static TKVector getParameter_PR_EDIT(Integer JavaDoc presentation_id, String JavaDoc presentation_name, String JavaDoc presentation_shortname)
69     {
70         TKVector back = new TKVector();
71         putParameter(back, "PRESENTATION_ID", presentation_id);
72         putParameter(back, "PRESENTATION_NAME", presentation_name);
73         putParameter(back, "PRESENTATION_SHORTNAME", presentation_shortname);
74         return back;
75     }
76     
77     /** @see getParameter_CT_EDIT */
78     public static TKVector getParameter_PR_ONLINE(Integer JavaDoc presentation_id)
79     {
80         TKVector back = new TKVector();
81         putParameter(back, "PRESENTATION_ID", presentation_id);
82         return back;
83     }
84     
85     /** @see getParameter_CT_EDIT */
86     public static TKVector getParameter_ST_ONLINE(Integer JavaDoc site_node_id, Integer JavaDoc form_id)
87     {
88         TKVector back = new TKVector();
89         putParameter(back, "SITE_NODE_ID", site_node_id);
90         putParameter(back, "FORM_ID", form_id);
91         return back;
92     }
93 }
Popular Tags