1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts.taglib.nested;
22
23 import java.io.Serializable;
24
25 /**
26 * So that a nested hierarchy can penetrate a dynamic JSP include, this class
27 * will hold the details of a bean name and nested property.
28 *
29 * @version $Rev: 471754 $
30 * @since Struts 1.1
31 */
32 public class NestedReference implements Serializable {
33
34 private String beanName;
35 private String property;
36
37 /**
38 * Empty constructor.
39 */
40 public NestedReference() {
41 }
42
43 /**
44 * Constructor takes the all the relevant details to init the object.
45 *
46 * @param name String name of the bean that the include is to
47 * reference
48 * @param property String nested property value that the include will be
49 * continuing on with.
50 */
51 public NestedReference(String name, String property) {
52 this.beanName = name;
53 this.property = property;
54 }
55
56 /**
57 * Getter for the bean name
58 *
59 * @return String value that will be the bean's reference
60 */
61 public String getBeanName() {
62 return beanName;
63 }
64
65 /**
66 * Setter for the bean name
67 *
68 * @param newName String value to set the bean reference.
69 */
70 public void setBeanName(String newName) {
71 this.beanName = newName;
72 }
73
74 /**
75 * Getter for the nested property
76 *
77 * @return String value that is the nested property for the current
78 * nesting
79 */
80 public String getNestedProperty() {
81 return this.property;
82 }
83
84 /**
85 * Setter for the nested property
86 *
87 * @param newProperty String value of the new current nesting level
88 */
89 public void setNestedProperty(String newProperty) {
90 this.property = newProperty;
91 }
92 }