KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > rice > rubis > client > URLGeneratorServlets


1 /*
2  * RUBiS
3  * Copyright (C) 2002, 2003, 2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Contact: jmob@objectweb.org
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by the
9  * Free Software Foundation; either version 2.1 of the License, or any later
10  * version.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20  *
21  * Initial developer(s): Emmanuel Cecchet, Julie Marguerite
22  * Contributor(s):
23  */

24  package edu.rice.rubis.client;
25
26 /**
27  * This class provides the needed URLs to access all features of RUBiS (Servlets version).
28  * You must provide the name and port of the Web site running RUBiS as well
29  * as the directories where the scripts and HTML files reside. For example:
30  * <pre>
31  * URLGenerator rubisWeb = new URLGeneratorServlets("www.testbed.cs.rice.edu", 80, "/Servlet_HTML", "/servlet");
32  * </pre>
33  * @author <a HREF="mailto:cecchet@rice.edu">Emmanuel Cecchet</a> and <a HREF="mailto:julie.marguerite@inrialpes.fr">Julie Marguerite</a>
34  * @version 1.0
35  */

36
37 public class URLGeneratorServlets extends URLGenerator
38 {
39
40   /**
41    * Set the name and port of the Web site running RUBiS as well as the
42    * directories where the HTML and servlets reside. Examples:
43    * <pre>
44    * URLGenerator rubisWeb = new URLGenerator("www.testbed.cs.rice.edu", 80, "/Servlet_HTML", "/servlet");
45    * </pre>
46    *
47    * @param host Web site address
48    * @param port HTTP server port
49    * @param HTMLFilesPath path where HTML files reside
50    * @param ScriptFilesPath path to the script files
51    */

52   public URLGeneratorServlets(String JavaDoc host, int port, String JavaDoc HTMLFilesPath, String JavaDoc ScriptFilesPath)
53   {
54     super(host, port, HTMLFilesPath, ScriptFilesPath);
55   }
56
57
58   /**
59    * Returns the name of the About Me servlet.
60    *
61    * @return About Me servlet name
62    */

63   public String JavaDoc AboutMeScript()
64   {
65     return "edu.rice.rubis.servlets.AboutMe";
66   }
67  
68
69   /**
70    * Returns the name of the Browse Categories servlet.
71    *
72    * @return Browse Categories servlet name
73    */

74   public String JavaDoc BrowseCategoriesScript()
75   {
76     return "edu.rice.rubis.servlets.BrowseCategories";
77   }
78
79   /**
80    * Returns the name of the Browse Regions servlet.
81    *
82    * @return Browse Regions servlet name
83    */

84   public String JavaDoc BrowseRegionsScript()
85   {
86     return "edu.rice.rubis.servlets.BrowseRegions";
87   }
88
89   /**
90    * Returns the name of the Store Buy Now servlet.
91    *
92    * @return Store Buy Now servlet name
93    */

94   public String JavaDoc StoreBuyNowScript()
95   {
96     return "edu.rice.rubis.servlets.StoreBuyNow";
97   }
98
99   /**
100    * Returns the name of the Buy Now servlet.
101    *
102    * @return Buy Now servlet name
103    */

104   public String JavaDoc BuyNowScript()
105   {
106     return "edu.rice.rubis.servlets.BuyNow";
107   }
108
109   /**
110    * Returns the name of the Buy Now Auth servlet.
111    *
112    * @return Buy Now Auth servlet name
113    */

114   public String JavaDoc BuyNowAuthScript()
115   {
116     return "edu.rice.rubis.servlets.BuyNowAuth";
117   }
118
119   /**
120    * Returns the name of the Put Bid servlet.
121    *
122    * @return Put Bid servlet name
123    */

124   public String JavaDoc PutBidScript()
125   {
126     return "edu.rice.rubis.servlets.PutBid";
127   }
128
129   /**
130    * Returns the name of the Put Bid Auth servlet.
131    *
132    * @return Put Bid Auth servlet name
133    */

134   public String JavaDoc PutBidAuthScript()
135   {
136     return "edu.rice.rubis.servlets.PutBidAuth";
137   }
138
139   /**
140    * Returns the name of the Put Comment servlet.
141    *
142    * @return Put Comment servlet name
143    */

144   public String JavaDoc PutCommentScript()
145   {
146     return "edu.rice.rubis.servlets.PutComment";
147   }
148
149   /**
150    * Returns the name of the Put Comment Auth servlet.
151    *
152    * @return Put Comment Auth servlet name
153    */

154   public String JavaDoc PutCommentAuthScript()
155   {
156     return "edu.rice.rubis.servlets.PutCommentAuth";
157   }
158
159   /**
160    * Returns the name of the Register Item servlet.
161    *
162    * @return Register Item servlet name
163    */

164   public String JavaDoc RegisterItemScript()
165   {
166     return "edu.rice.rubis.servlets.RegisterItem";
167   }
168
169   /**
170    * Returns the name of the Register User servlet.
171    *
172    * @return Register User servlet name
173    */

174   public String JavaDoc RegisterUserScript()
175   {
176     return "edu.rice.rubis.servlets.RegisterUser";
177   }
178
179   /**
180    * Returns the name of the Search Items By Category servlet.
181    *
182    * @return Search Items By Category servlet name
183    */

184   public String JavaDoc SearchItemsByCategoryScript()
185   {
186     return "edu.rice.rubis.servlets.SearchItemsByCategory";
187   }
188
189   /**
190    * Returns the name of the Search Items By Region servlet.
191    *
192    * @return Search Items By Region servlet name
193    */

194   public String JavaDoc SearchItemsByRegionScript()
195   {
196     return "edu.rice.rubis.servlets.SearchItemsByRegion";
197   }
198
199   /**
200    * Returns the name of the Sell Item Form servlet.
201    *
202    * @return Sell Item Form servlet name
203    */

204   public String JavaDoc SellItemFormScript()
205   {
206     return "edu.rice.rubis.servlets.SellItemForm";
207   }
208
209   /**
210    * Returns the name of the Store Bid servlet.
211    *
212    * @return Store Bid servlet name
213    */

214   public String JavaDoc StoreBidScript()
215   {
216     return "edu.rice.rubis.servlets.StoreBid";
217   }
218
219   /**
220    * Returns the name of the Store Comment servlet.
221    *
222    * @return Store Comment servlet name
223    */

224   public String JavaDoc StoreCommentScript()
225   {
226     return "edu.rice.rubis.servlets.StoreComment";
227   }
228
229   /**
230    * Returns the name of the View Bid History servlet.
231    *
232    * @return View Bid History servlet name
233    */

234   public String JavaDoc ViewBidHistoryScript()
235   {
236     return "edu.rice.rubis.servlets.ViewBidHistory";
237   }
238
239   /**
240    * Returns the name of the View Item servlet.
241    *
242    * @return View Item servlet name
243    */

244   public String JavaDoc ViewItemScript()
245   {
246     return "edu.rice.rubis.servlets.ViewItem";
247   }
248
249   /**
250    * Returns the name of the View User Info servlet.
251    *
252    * @return View User Info servlet name
253    */

254   public String JavaDoc ViewUserInfoScript()
255   {
256     return "edu.rice.rubis.servlets.ViewUserInfo";
257   }
258 }
259
Popular Tags