KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > struts > taglib > nested > NestedReference


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

18 package org.apache.struts.taglib.nested;
19
20 import java.io.Serializable JavaDoc;
21
22 /**
23  * So that a nested hierarchy can penetrate a dynamic JSP include, this class
24  * will hold the details of a bean name and nested property.
25  *
26  * @since Struts 1.1
27  * @version $Rev: 54929 $
28  */

29 public class NestedReference implements Serializable JavaDoc {
30
31   /**
32    * Empty constructor.
33    */

34   public NestedReference() {}
35   
36   
37   /**
38    * Constructor takes the all the relevant details to init the object.
39    * @param name String name of the bean that the include is to reference
40    * @param property String nested property value that the include will be
41    * continuing on with.
42    */

43   public NestedReference(String JavaDoc name, String JavaDoc property) {
44     this.beanName = name;
45     this.property = property;
46   }
47   
48   /** Getter for the bean name
49    * @return String value that will be the bean's reference
50    */

51   public String JavaDoc getBeanName() {
52     return beanName;
53   }
54   
55   /** Setter for the bean name
56    * @param newName String value to set the bean reference.
57    */

58   public void setBeanName(String JavaDoc newName) {
59     this.beanName = newName;
60   }
61   
62   /** Getter for the nested property
63    * @return String value that is the nested property for the current nesting
64    */

65   public String JavaDoc getNestedProperty() {
66     return this.property;
67   }
68   
69   /** Setter for the nested property
70    * @param newProperty String value of the new current nesting level
71    */

72   public void setNestedProperty(String JavaDoc newProperty) {
73     this.property = newProperty;
74   }
75   
76   /* Usual member variables */
77   private String JavaDoc beanName;
78   private String JavaDoc property;
79 }
80
Popular Tags