1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.saml1.core.impl;
18
19 import java.util.ArrayList;
20 import java.util.Collections;
21 import java.util.List;
22
23 import org.opensaml.saml1.core.Attribute;
24 import org.opensaml.saml1.core.AttributeStatement;
25 import org.opensaml.xml.XMLObject;
26 import org.opensaml.xml.util.XMLObjectChildrenList;
27
28
29
30
31 public class AttributeStatementImpl extends SubjectStatementImpl implements AttributeStatement {
32
33
34 private final XMLObjectChildrenList<Attribute> attributes;
35
36
37
38
39
40
41
42
43 protected AttributeStatementImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
44 super(namespaceURI, elementLocalName, namespacePrefix);
45 attributes = new XMLObjectChildrenList<Attribute>(this);
46 }
47
48
49 public List<Attribute> getAttributes() {
50 return attributes;
51 }
52
53
54 public List<XMLObject> getOrderedChildren() {
55 List<XMLObject> list = new ArrayList<XMLObject>(attributes.size() + 1);
56
57 if (super.getOrderedChildren() != null) {
58 list.addAll(super.getOrderedChildren());
59 }
60
61 list.addAll(attributes);
62
63 if (list.size() == 0) {
64 return null;
65 }
66
67 return Collections.unmodifiableList(list);
68 }
69 }