KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > tools > testrecorder > shared > config > WebappDefinition


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * $Header:$
17  */

18
19 package org.apache.beehive.netui.tools.testrecorder.shared.config;
20
21 import org.apache.beehive.netui.tools.testrecorder.shared.util.StringHelper;
22 import org.apache.beehive.netui.tools.testrecorder.shared.Logger;
23
24 import java.io.File JavaDoc;
25
26 /**
27  * Client side object defining webapp access.
28  * User: ozzy
29  */

30 public class WebappDefinition {
31
32     private static final Logger log = Logger.getInstance( WebappDefinition.class );
33
34     private String JavaDoc name;
35     private String JavaDoc description;
36     // includes leading slash
37
private String JavaDoc contextRoot;
38     private String JavaDoc servletUri;
39
40     public WebappDefinition( String JavaDoc name, String JavaDoc description, String JavaDoc contextRoot, String JavaDoc servletUri) {
41         this.name = name;
42         this.description = description;
43         this.contextRoot = contextRoot;
44         this.servletUri = contextRoot + "/" + servletUri;
45     }
46
47     public String JavaDoc getName() {
48         return name;
49     }
50
51     public String JavaDoc getDescription() {
52         return description;
53     }
54
55     public String JavaDoc getContextRoot() {
56         return contextRoot;
57     }
58
59     public String JavaDoc getServletUri() {
60         return servletUri;
61     }
62
63     public String JavaDoc toString() {
64         StringBuffer JavaDoc sb = new StringBuffer JavaDoc( 256 );
65         sb.append( "[ " );
66         sb.append( "name( " + getName() + " )" );
67         sb.append( ", description( " + getDescription() + " )" );
68         sb.append( ", contextRoot( " + getContextRoot() + " )" );
69         sb.append( ", servletURI( " + getServletUri() + " )" );
70         sb.append( " ]" );
71         return sb.toString();
72     }
73
74 }
75
Popular Tags