01: /*
02: * Copyright 2005-2007 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.server;
18:
19: import org.mortbay.jetty.Server;
20: import org.mortbay.jetty.webapp.WebAppContext;
21:
22: public class WorkflowServer extends BaseTestServer {
23:
24: private int port;
25: private String contextName;
26:
27: public WorkflowServer() {
28: }
29:
30: public WorkflowServer(int port, String contextName) {
31: this .port = port;
32: this .contextName = contextName;
33: }
34:
35: protected Server createServer() {
36: Server server = new Server(getPort());
37: WebAppContext context = new WebAppContext("en",
38: getContextName());
39: server.addHandler(context);
40: return server;
41: }
42:
43: public String getContextName() {
44: if (contextName == null) {
45: return "/en-test";
46: }
47: return contextName;
48: }
49:
50: public void setContextName(String contextName) {
51: this .contextName = contextName;
52: }
53:
54: public int getPort() {
55: if (port == 0) {
56: return 9912;
57: }
58: return port;
59: }
60:
61: public void setPort(int port) {
62: this.port = port;
63: }
64:
65: }
|