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