1 package org.molwind.servlet;
2 /*
3 * This file is part of Molwind.
4 *
5 * Molwind is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * Molwind is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with Molwind. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19
20 import java.io.IOException;
21 import java.io.OutputStream;
22
23
24 import org.molwind.util.MolwindServerConfiguration;
25
26
27 import javax.servlet.http.HttpServletRequest;
28 import javax.servlet.http.HttpServletResponse;
29 import javax.servlet.ServletOutputStream;
30
31
32 /**
33 * MolwindWebService GetWorldNamesCommand implements a Command which can be invoked by a client
34 *
35 * TODO complete this class
36 *
37 * @author <a href="mailto:Oktay.Degirmenci@merck.de">Oktay Degirmenci</a>
38 */
39 public class GetWorldNamesCommand extends AbstractCommand {
40
41
42
43
44 public GetWorldNamesCommand(){
45
46
47
48 }
49
50
51
52
53
54 /**
55 * Executes the GetWorldCommand
56 * @param request
57 * an {@link javax.servlet.http.HttpServletRequest} object, contains
58 * the request the client has made of the servlet
59 *
60 * @param response
61 * an {@link javax.servlet.http.HttpServletResponse} object, contains
62 * the response the client will get from the servlet
63 *
64 *
65 */
66 public void execute(HttpServletRequest request,HttpServletResponse response){
67 MolwindServerConfiguration config =MolwindServerConfiguration.getInstance();
68
69
70
71 String[] result = config.getWorldNames();
72
73
74 writeXML(response,result);
75
76
77
78 }
79
80
81
82
83
84
85
86
87
88 }