01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.openejb.jee.jba;
17:
18: import java.util.ArrayList;
19: import java.util.List;
20: import javax.xml.bind.annotation.XmlAccessType;
21: import javax.xml.bind.annotation.XmlAccessorType;
22: import javax.xml.bind.annotation.XmlElement;
23: import javax.xml.bind.annotation.XmlRootElement;
24: import javax.xml.bind.annotation.XmlType;
25:
26: /**
27: *
28: */
29: @XmlAccessorType(XmlAccessType.FIELD)
30: @XmlType(name="",propOrder={"roleName","principalName"})
31: @XmlRootElement(name="security-role")
32: public class SecurityRole {
33:
34: @XmlElement(name="role-name",required=true)
35: protected String roleName;
36: @XmlElement(name="principal-name",required=true)
37: protected List<PrincipalName> principalName;
38:
39: /**
40: * Gets the value of the roleName property.
41: *
42: * @return
43: * possible object is
44: * {@link String }
45: *
46: */
47: public String getRoleName() {
48: return roleName;
49: }
50:
51: /**
52: * Sets the value of the roleName property.
53: *
54: * @param value
55: * allowed object is
56: * {@link String }
57: *
58: */
59: public void setRoleName(String value) {
60: this .roleName = value;
61: }
62:
63: /**
64: * Gets the value of the principalName property.
65: *
66: * <p>
67: * This accessor method returns a reference to the live list,
68: * not a snapshot. Therefore any modification you make to the
69: * returned list will be present inside the JAXB object.
70: * This is why there is not a <CODE>set</CODE> method for the principalName property.
71: *
72: * <p>
73: * For example, to add a new item, do as follows:
74: * <pre>
75: * getPrincipalName().add(newItem);
76: * </pre>
77: *
78: *
79: * <p>
80: * Objects of the following type(s) are allowed in the list
81: * {@link PrincipalName }
82: *
83: *
84: */
85: public List<PrincipalName> getPrincipalName() {
86: if (principalName == null) {
87: principalName = new ArrayList<PrincipalName>();
88: }
89: return this.principalName;
90: }
91:
92: }
|