KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > runtime > connector > RoleMap


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /**
25  * This generated bean class RoleMap matches the DTD element role-map
26  *
27  * Generated on Mon May 13 13:36:49 PDT 2002
28  */

29
30 package com.sun.enterprise.deployment.runtime.connector;
31
32 import com.sun.enterprise.deployment.runtime.RuntimeDescriptor;
33
34 /**
35  * This class was based on the schema2beans generated one modified
36  * to remove its dependencies on schema2beans libraries.
37  
38  * @author Jerome Dochez
39  * @version
40  */

41 public class RoleMap extends RuntimeDescriptor
42 {
43     
44     static public final String JavaDoc DESCRIPTION = "Description"; // NOI18N
45
static public final String JavaDoc MAP_ELEMENT = "MapElement"; // NOI18N
46
static public final String JavaDoc MAP_ID = "MapId";
47     
48     // This attribute is an array, possibly empty
49
public void setMapElement(int index, MapElement value)
50     {
51     this.setValue(MAP_ELEMENT, index, value);
52     }
53     
54     //
55
public MapElement getMapElement(int index)
56     {
57     return (MapElement)this.getValue(MAP_ELEMENT, index);
58     }
59     
60     // This attribute is an array, possibly empty
61
public void setMapElement(MapElement[] value)
62     {
63     this.setValue(MAP_ELEMENT, value);
64     }
65     
66     //
67
public MapElement[] getMapElement()
68     {
69     return (MapElement[])this.getValues(MAP_ELEMENT);
70     }
71     
72     // Return the number of properties
73
public int sizeMapElement()
74     {
75     return this.size(MAP_ELEMENT);
76     }
77     
78     // Add a new element returning its index in the list
79
public int addMapElement(MapElement value)
80     {
81     return this.addValue(MAP_ELEMENT, value);
82     }
83     
84     //
85
// Remove an element using its reference
86
// Returns the index the element had in the list
87
//
88
public int removeMapElement(MapElement value)
89     {
90     return this.removeValue(MAP_ELEMENT, value);
91     }
92     
93     // This method verifies that the mandatory properties are set
94
public boolean verify()
95     {
96     return true;
97     }
98 }
99
Popular Tags