View Javadoc
1   /*
2    * $Header: /cvsroot/sinon/sinon/src/java/eteg/sinon/core/Parameter.java,v 1.2 2005/06/21 14:25:07 thiagohp Exp $
3    * $Revision: 1.2 $
4    * $Date: 2005/06/21 14:25:07 $
5    * $Author: thiagohp $
6    *
7    * =============================================================================
8    *
9    * Copyright 2004-2005 Eteg Internet Ltda. (http://www.eteg.com.br)
10   *
11   * Licensed under the Apache License, Version 2.0 (the "License");
12   * you may not use this file except in compliance with the License.
13   * You may obtain a copy of the License at
14   *
15   *     http://www.apache.org/licenses/LICENSE-2.0
16   *
17   * Unless required by applicable law or agreed to in writing, software
18   * distributed under the License is distributed on an "AS IS" BASIS,
19   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20   * See the License for the specific language governing permissions and
21   * limitations under the License.
22   */
23  package eteg.sinon.core;
24  
25  /***
26   * Class that represents a HTTP parameter.
27   * <pre>
28   * $Header: /cvsroot/sinon/sinon/src/java/eteg/sinon/core/Parameter.java,v 1.2 2005/06/21 14:25:07 thiagohp Exp $
29   * </pre>
30   * 
31   * @author Thiago H. de Paula Figueiredo (last modification by $Author: thiagohp $)
32   * @version $Revision: 1.2 $
33   * @since 26/09/2004.
34   */
35  public class Parameter {
36  
37      /***
38       * Default value of the <code>encoding</code> property.
39       * Value: <code>ISo-8859-1</code>.
40       */
41      public static final String DEFAULT_ENCODING = "ISO_8859_1";
42  
43      /***
44       * Parameter name.
45       */
46      private String name;
47  
48      /***
49       * Parameter value.
50       */
51      private String value;
52  
53      /***
54       * Charset used to URL encode the parameter name and value.
55       * Default: {@link #DEFAULT_ENCODING}.
56       */
57      private String encoding;
58  
59      /***
60       * Constructor without parameters.
61       */
62      public Parameter() {
63          encoding = DEFAULT_ENCODING;
64      }
65  
66      /***
67       * Returns the value of the <code>name</code> property.
68       * @return a <code>String</code>.
69       */
70      public String getName() {
71          return name;
72      }
73  
74      /***
75       * Sets the value of the <code>name</code> property.
76       * @param name the new <code>name</code> value.
77       */
78      public void setName(String name) {
79          this.name = name;
80      }
81  
82      /***
83       * Returns the value of the <code>value</code> property.
84       * @return a <code>String</code>.
85       */
86      public String getValue() {
87          return value;
88      }
89  
90      /***
91       * Sets the value of the <code>value</code> property.
92       * @param value the new <code>value</code> value.
93       */
94      public void setValue(String value) {
95          this.value = value;
96      }
97  
98      /***
99       * Returns the value of the <code>encoding</code> property.
100      * @return a <code>String</code>.
101      */
102     public String getEncoding() {
103         return encoding;
104     }
105 
106     /***
107      * Sets the value of the <code>encoding</code> property.
108      * @param encoding the new <code>encoding</code> value.
109      */
110     public void setEncoding(String encoding) {
111         this.encoding = encoding;
112     }
113 
114 }