1   /*
2    * Copyright 2002,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  package org.apache.commons.jelly.tags.bean;
17  
18  import org.apache.commons.logging.Log;
19  import org.apache.commons.logging.LogFactory;
20  
21  /***
22   * A sample bean that we can construct via Jelly tags
23   *
24   * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
25   * @version $Revision: 155420 $
26   */
27  public class Product {
28  
29      /*** The Log to which logging calls will be made. */
30      private static final Log log = LogFactory.getLog(Product.class);
31  
32      private String id;
33      private String name;
34  
35      public Product() {
36      }
37  
38      public String toString() {
39          return "Product[id=" + id + ";name=" + name + "]";
40      }
41  
42      // Properties
43      //-------------------------------------------------------------------------
44      /***
45       * Returns the id.
46       * @return String
47       */
48      public String getId() {
49          return id;
50      }
51  
52      /***
53       * Returns the name.
54       * @return String
55       */
56      public String getName() {
57          return name;
58      }
59  
60      /***
61       * Sets the id.
62       * @param id The id to set
63       */
64      public void setId(String id) {
65          this.id = id;
66      }
67  
68      /***
69       * Sets the name.
70       * @param name The name to set
71       */
72      public void setName(String name) {
73          this.name = name;
74      }
75  
76  }