KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > rpc > IF3SOAPImpl


1
2 package test.rpc;
3
4 import java.util.Calendar JavaDoc;
5 import java.util.GregorianCalendar JavaDoc;
6
7 //import org.jdom.Document;
8
//import org.jdom.output.XMLOutputter;
9

10 public final class IF3SOAPImpl implements IF3SOAP
11 {
12     private Bean[] m_beans;
13     private String JavaDoc[] m_categories;
14
15     public IF3SOAPImpl()
16     {
17         Bean bean1 = new Bean();
18         bean1.setId("42042042042");
19         bean1.setTitle("Test Bean");
20         bean1.setCategory("Test");
21         Calendar JavaDoc date = new GregorianCalendar JavaDoc();
22         bean1.setDate(date);
23         Bean bean2 = new Bean();
24         bean2.setId("11011011011");
25         bean2.setTitle("Test Bean 2");
26         bean2.setCategory("Test 2");
27         bean2.setDate(date);
28         m_beans = new Bean[2];
29         m_beans[0] = bean1;
30         m_beans[1] = bean2;
31         m_categories = new String JavaDoc[2];
32         m_categories[0] = "Test";
33         m_categories[1] = "Std";
34     }
35
36     public IF1 getBeanById(String JavaDoc id)
37         throws Exception JavaDoc
38     {
39         return m_beans[0];
40     }
41
42     public IF1[] getAllBeans()
43         throws Exception JavaDoc
44     {
45         return m_beans;
46     }
47
48     public IF1[] getAllBeans(String JavaDoc[] filter)
49         throws Exception JavaDoc
50     {
51         return m_beans;
52     }
53
54     public String JavaDoc[] getAllCategories()
55         throws Exception JavaDoc
56     {
57         return m_categories;
58     }
59
60     public IF1[] getBeansByCategory(String JavaDoc category)
61         throws Exception JavaDoc
62     {
63         return m_beans;
64     }
65
66     public IF1[] getBeansByCategory(String JavaDoc category, String JavaDoc[] filter)
67         throws Exception JavaDoc
68     {
69         return m_beans;
70     }
71
72     public IF1[] getBeansByDate(Calendar JavaDoc[] dates)
73         throws Exception JavaDoc
74     {
75         return m_beans;
76     }
77
78     public IF1[] getBeansByDate(Calendar JavaDoc[] dates, String JavaDoc[] filter)
79         throws Exception JavaDoc
80     {
81         return m_beans;
82     }
83
84     public IF1[] getBeansByExpression(int expType, String JavaDoc expression)
85         throws Exception JavaDoc
86     {
87         return m_beans;
88     }
89
90     public IF1[] getBeansByExpression(int expType, String JavaDoc expression, String JavaDoc[] filter)
91         throws Exception JavaDoc
92     {
93         return m_beans;
94     }
95
96     public String JavaDoc getXMLForBean(IF1 bean)
97         throws Exception JavaDoc
98     {
99         return "<bean>\n</bean>";
100     }
101
102     public IF1[] getBeansByCategory(String JavaDoc ifId, String JavaDoc category)
103         throws Exception JavaDoc
104     {
105         return m_beans;
106     }
107
108     public IF1[] getBeansByCategory(String JavaDoc ifId, String JavaDoc category, String JavaDoc[] filter)
109         throws Exception JavaDoc
110     {
111         return m_beans;
112     }
113
114     public IF1[] getBeansByDate(String JavaDoc ifId, Calendar JavaDoc[] dates)
115         throws Exception JavaDoc
116     {
117         return m_beans;
118     }
119
120     public IF1[] getBeansByDate(String JavaDoc ifId, Calendar JavaDoc[] dates, String JavaDoc[] filter)
121         throws Exception JavaDoc
122     {
123         return m_beans;
124     }
125
126     public IF1[] getBeansByExpression(String JavaDoc ifId, int expType, String JavaDoc expression)
127         throws Exception JavaDoc
128     {
129         return m_beans;
130     }
131
132     public IF1[] getBeansByExpression(String JavaDoc ifId, int expType, String JavaDoc expression, String JavaDoc[] filter)
133         throws Exception JavaDoc
134     {
135         return m_beans;
136     }
137 }
138
139
Popular Tags