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  package org.apache.pluto.portalImpl.om.servlet.impl;
18  
19  import org.apache.pluto.util.StringUtils;
20  
21  public class TagDefinitionImpl  implements java.io.Serializable {
22      
23      private String uri ="http://java.sun.com/portlet";
24      private String location = "/WEB-INF/tld/portlet.tld";
25  
26      public TagDefinitionImpl()
27      {
28          super();
29      }
30      /***
31       * @return the location
32       */
33      public String getLocation() {
34          return location;
35      }
36  
37      /***
38       * @return the uri
39       */
40      public String getUri() {
41          return uri;
42      }
43  
44      /***
45       * @param string the new location
46       */
47      public void setLocation(String string) {
48          location = string;
49      }
50  
51      /***
52       * @param string the uri
53       */
54      public void setUri(String string) {
55          uri = string;
56      }
57  
58      /***
59       * Print a string representation of this tag definition.
60       * The results of this toString() implementation are meant
61       * for debugging purposes.
62       *
63       * @return String representation of this tag definition.
64       */
65      public String toString()
66      {
67          return toString(0);
68      }
69  
70      public String toString(int indent)
71      {
72          StringBuffer buffer = new StringBuffer(50);
73          StringUtils.newLine(buffer,indent);
74          buffer.append(getClass().toString()); buffer.append(":");
75          StringUtils.newLine(buffer,indent);
76          buffer.append("{");
77          StringUtils.newLine(buffer,indent);
78          buffer.append("taglib-uri='"); buffer.append(this.getUri()); buffer.append("'");
79          StringUtils.newLine(buffer,indent);
80          buffer.append("taglib-location='"); buffer.append(this.getLocation()); buffer.append("'");
81          StringUtils.newLine(buffer,indent);
82          buffer.append("}");
83          return buffer.toString();
84      }
85  
86  }