View Javadoc

1   /*
2    * Copyright 2003,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  /* 
17  
18   */
19  
20  package org.apache.pluto.portalImpl.om.servlet.impl;
21  
22  import org.apache.pluto.util.StringUtils;
23  
24  public class ServletMappingImpl implements java.io.Serializable {
25  
26      private String id;
27      private String servletName;
28      private String urlPattern;
29  
30      public ServletMappingImpl()
31      {
32      }
33  
34      // additional methods.
35  
36      public String getId()
37      {
38          return id;
39      }
40  
41      public void setId(String id)
42      {
43          this.id = id;
44      }
45  
46      public String getServletName()
47      {
48          return servletName;
49      }
50  
51      public void setServletName(String servletName)
52      {
53          this.servletName = servletName;
54      }
55  
56      public String getUrlPattern()
57      {
58          return urlPattern;
59      }
60  
61      public void setUrlPattern(String urlPattern)
62      {
63          this.urlPattern = urlPattern;
64      }
65  
66      // internal methods used for debugging purposes only
67  
68      public String toString()
69      {
70          return toString(0);
71      }
72  
73      public String toString(int indent)
74      {
75          StringBuffer buffer = new StringBuffer(50);
76          StringUtils.newLine(buffer,indent);
77          buffer.append(getClass().toString()); buffer.append(":");
78          StringUtils.newLine(buffer,indent);
79          buffer.append("{");
80          StringUtils.newLine(buffer,indent);
81          buffer.append("id='"); buffer.append(id); buffer.append("'");
82          StringUtils.newLine(buffer,indent);
83          buffer.append("servletName='"); buffer.append(servletName); buffer.append("'");
84          StringUtils.newLine(buffer,indent);
85          buffer.append("urlPattern='"); buffer.append(urlPattern); buffer.append("'");
86          StringUtils.newLine(buffer,indent);
87          buffer.append("}");
88          return buffer.toString();
89      }
90  
91  }