001: /*
002: * $Id: AbstractJettyDecorator.java 459490 2006-02-23 23:25:06 +0100 (Thu, 23
003: * Feb 2006) jdonnerstag $ $Revision: 464023 $ $Date: 2006-02-23 23:25:06 +0100
004: * (Thu, 23 Feb 2006) $
005: *
006: * ====================================================================
007: * Copyright (c) 2003, Open Edge B.V. All rights reserved. Redistribution and
008: * use in source and binary forms, with or without modification, are permitted
009: * provided that the following conditions are met: Redistributions of source
010: * code must retain the above copyright notice, this list of conditions and the
011: * following disclaimer. Redistributions in binary form must reproduce the above
012: * copyright notice, this list of conditions and the following disclaimer in the
013: * documentation and/or other materials provided with the distribution. Neither
014: * the name of OpenEdge B.V. nor the names of its contributors may be used to
015: * endorse or promote products derived from this software without specific prior
016: * written permission.
017: *
018: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
019: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
020: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
021: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
022: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
023: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
024: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
025: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
026: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
027: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
028: * POSSIBILITY OF SUCH DAMAGE.
029: */
030: package nl.openedge.util.jetty;
031:
032: import junit.extensions.TestSetup;
033: import junit.framework.Test;
034:
035: /**
036: * Base class for Jetty TestDecorators.
037: *
038: * @author Eelco Hillenius
039: */
040: public abstract class AbstractJettyDecorator extends TestSetup {
041: /** context path (webapp name). */
042: private String contextPath = "/wicket-examples";
043:
044: /** port for http requests. */
045: private int port = 8098;
046:
047: /** root folder of web application. */
048: private String webappContextRoot = "src/webapp";
049:
050: /**
051: * Construct with test to decorate.
052: *
053: * @param test
054: * test to decorate
055: */
056: public AbstractJettyDecorator(Test test) {
057: super (test);
058: }
059:
060: /**
061: * Get context path (webapp name).
062: *
063: * @return String Returns the context path (webapp name).
064: */
065: public String getContextPath() {
066: return contextPath;
067: }
068:
069: /**
070: * Get port for http requests.
071: *
072: * @return int Returns the port.
073: */
074: public int getPort() {
075: return port;
076: }
077:
078: /**
079: * Get root folder of web application.
080: *
081: * @return String Returns the webappContextRoot.
082: */
083: public String getWebappContextRoot() {
084: return webappContextRoot;
085: }
086:
087: /**
088: * Set context path (webapp name).
089: *
090: * @param contextPath
091: * context path (webapp name).
092: */
093: public void setContextPath(String contextPath) {
094: this .contextPath = contextPath;
095: }
096:
097: /**
098: * Set port for http requests.
099: *
100: * @param port
101: * port for http requests.
102: */
103: public void setPort(int port) {
104: this .port = port;
105: }
106:
107: /**
108: * Set root folder of web application.
109: *
110: * @param webappContextRoot
111: * webappContextRoot to set.
112: */
113: public void setWebappContextRoot(String webappContextRoot) {
114: this.webappContextRoot = webappContextRoot;
115: }
116: }
|