1/*2 * Copyright 2000-2001,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 at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.om.profile.psml;
1819// Jetspeed imports20import org.apache.jetspeed.om.SecurityReference;
21importorg.apache.jetspeed.om.profile.*;
2223/***24 * Default bean like implementation of the Entry interface25 * suitable for serialization with Castor26 * 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 */31publicclassPsmlEntryextendsPsmlIdentityElement implements Entry32 {
3334private String parent = null;
3536/*** Holds value of property securityRef. */37privateSecurityReference securityRef;
3839/*** @return the entry name from which this one is derived */40public String getParent()
41 {
42returnthis.parent;
43 }
4445/***46 * Sets the ancestor for this Entry.47 * @param parent the new ancestor entry name. This name should48 * be defined in the system registry49 */50publicvoid setParent( String parent )
51 {
52this.parent = parent;
53 }
5455/*** Getter for property securityRef.56 * @return Value of property securityRef.57 */58publicSecurityReference getSecurityRef()
59 {
60return securityRef;
61 }
6263/*** Setter for property securityRef.64 * @param securityRef New value of property securityRef.65 */66publicvoid setSecurityRef(SecurityReference securityRef)
67 {
68this.securityRef = securityRef;
69 }
7071/*** This method recreates the paramter name index for quick retrieval72 * of parameters by name. Shoule be called whenever a complete index73 * 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();7879 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 }8788 this.nameIdx = idx;89 } 90 */9192/***93 * Create a clone of this object94 */95public Object clone()
96 throws java.lang.CloneNotSupportedException
97 {
98 Object cloned = super.clone();
99100// clone the securityRef101 ((PsmlEntry)cloned).securityRef = ((this.securityRef == null) ? null : (SecurityReference) this.securityRef.clone());
102103return cloned;
104105 } // clone106 }
107