1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.om.profile.psml;
18
19
20 import org.apache.jetspeed.om.SecurityReference;
21 import org.apache.jetspeed.om.profile.*;
22
23 /***
24 * Default bean like implementation of the Entry interface
25 * suitable for serialization with Castor
26 *
27 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>
28 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
29 * @version $Id: PsmlEntry.java,v 1.6 2004/02/23 03:02:54 jford Exp $
30 */
31 public class PsmlEntry extends PsmlIdentityElement implements Entry
32 {
33
34 private String parent = null;
35
36 /*** Holds value of property securityRef. */
37 private SecurityReference securityRef;
38
39 /*** @return the entry name from which this one is derived */
40 public String getParent()
41 {
42 return this.parent;
43 }
44
45 /***
46 * Sets the ancestor for this Entry.
47 * @param parent the new ancestor entry name. This name should
48 * be defined in the system registry
49 */
50 public void setParent( String parent )
51 {
52 this.parent = parent;
53 }
54
55 /*** Getter for property securityRef.
56 * @return Value of property securityRef.
57 */
58 public SecurityReference getSecurityRef()
59 {
60 return securityRef;
61 }
62
63 /*** Setter for property securityRef.
64 * @param securityRef New value of property securityRef.
65 */
66 public void setSecurityRef(SecurityReference securityRef)
67 {
68 this.securityRef = securityRef;
69 }
70
71 /*** This method recreates the paramter name index for quick retrieval
72 * of parameters by name. Shoule be called whenever a complete index
73 * of parameter should be rebuilt (eg removing a parameter or setting
74 * a parameters vector)
75 private void buildNameIndex()
76 {
77 Hashtable idx = new Hashtable();
78
79 Iterator i = parameter.iterator();
80 int count = 0;
81 while( i.hasNext() )
82 {
83 Parameter p = (Parameter)i.next();
84 idx.put( p.getName(), new Integer(count) );
85 count++;
86 }
87
88 this.nameIdx = idx;
89 }
90 */
91
92 /***
93 * Create a clone of this object
94 */
95 public Object clone()
96 throws java.lang.CloneNotSupportedException
97 {
98 Object cloned = super.clone();
99
100
101 ((PsmlEntry)cloned).securityRef = ((this.securityRef == null) ? null : (SecurityReference) this.securityRef.clone());
102
103 return cloned;
104
105 }
106 }
107