1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.saml2.core.impl;
18
19 import java.util.ArrayList;
20 import java.util.Collections;
21 import java.util.List;
22
23 import org.opensaml.common.impl.AbstractSAMLObject;
24 import org.opensaml.saml2.core.Attribute;
25 import org.opensaml.xml.XMLObject;
26 import org.opensaml.xml.util.AttributeMap;
27 import org.opensaml.xml.util.XMLObjectChildrenList;
28
29
30
31
32 public class AttributeImpl extends AbstractSAMLObject implements Attribute {
33
34
35 private String name;
36
37
38 private String nameFormat;
39
40
41 private String friendlyName;
42
43
44 private AttributeMap unknownAttributes;
45
46
47 private final XMLObjectChildrenList<XMLObject> attributeValues;
48
49
50
51
52
53
54
55
56 protected AttributeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
57 super(namespaceURI, elementLocalName, namespacePrefix);
58 unknownAttributes = new AttributeMap(this);
59 attributeValues = new XMLObjectChildrenList<XMLObject>(this);
60 }
61
62
63 public String getName() {
64 return name;
65 }
66
67
68 public void setName(String name) {
69 this.name = prepareForAssignment(this.name, name);
70 }
71
72
73 public String getNameFormat() {
74 return nameFormat;
75 }
76
77
78 public void setNameFormat(String nameFormat) {
79 this.nameFormat = prepareForAssignment(this.nameFormat, nameFormat);
80 }
81
82
83 public String getFriendlyName() {
84 return friendlyName;
85 }
86
87
88 public void setFriendlyName(String friendlyName) {
89 this.friendlyName = prepareForAssignment(this.friendlyName, friendlyName);
90 }
91
92
93
94
95 public AttributeMap getUnknownAttributes() {
96 return unknownAttributes;
97 }
98
99
100 public List<XMLObject> getAttributeValues() {
101 return attributeValues;
102 }
103
104
105 public List<XMLObject> getOrderedChildren() {
106 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
107
108 children.addAll(attributeValues);
109
110 return Collections.unmodifiableList(children);
111 }
112 }