KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > tools > petalsadmin > bean > MenuBean


1 package org.objectweb.petals.tools.petalsadmin.bean;
2
3 import java.util.ArrayList JavaDoc;
4
5 public class MenuBean {
6     
7     public MenuBean() {
8     }
9     
10     public ArrayList JavaDoc<String JavaDoc> getServers() {
11         ArrayList JavaDoc<String JavaDoc> servers = new ArrayList JavaDoc<String JavaDoc>();
12         servers.add("magnolia");
13         servers.add("tulip");
14         return servers;
15     }
16     
17     public ArrayList JavaDoc<String JavaDoc> getComponents(String JavaDoc group) {
18         ArrayList JavaDoc<String JavaDoc> components = new ArrayList JavaDoc<String JavaDoc>();
19         if (group=="BC")
20         {
21             components.add("FileTransfer");
22             components.add("JMS");
23             components.add("XQuare");
24         }
25         else
26         {
27             if (group=="SE")
28             {
29                 components.add("Clock");
30                 components.add("CSV");
31                 components.add("HelloWorld");
32                 components.add("SampleClient");
33                 components.add("XSLT");
34             }
35             else
36             {
37                 if (group=="all")
38                 {
39                     components.add("FileTransfer");
40                     components.add("JMS");
41                     components.add("XQuare");
42                     components.add("Clock");
43                     components.add("CSV");
44                     components.add("HelloWorld");
45                     components.add("SampleClient");
46                     components.add("XSLT");
47                 }
48                 else
49                 {
50                     components.add("none");
51                 }
52             }
53         }
54         return components;
55     }
56     
57 }
58
Popular Tags