1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package edu.internet2.middleware.shibboleth.common.xmlobject.impl;
19
20 import java.util.ArrayList;
21 import java.util.Collections;
22 import java.util.List;
23
24 import org.opensaml.xml.XMLObject;
25 import org.opensaml.xml.signature.KeyInfo;
26 import org.opensaml.xml.util.AttributeMap;
27 import org.opensaml.xml.util.XMLObjectChildrenList;
28 import org.opensaml.xml.validation.AbstractValidatingXMLObject;
29
30 import edu.internet2.middleware.shibboleth.common.xmlobject.ShibbolethMetadataKeyAuthority;
31
32
33
34
35 public class ShibbolethMetadataKeyAuthorityImpl extends AbstractValidatingXMLObject implements
36 ShibbolethMetadataKeyAuthority {
37
38
39 private final List<KeyInfo> keyInfos;
40
41
42 private Integer verifyDepth;
43
44
45 private AttributeMap unknownAttributes;
46
47
48
49
50
51
52
53
54 protected ShibbolethMetadataKeyAuthorityImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
55 super(namespaceURI, elementLocalName, namespacePrefix);
56 keyInfos = new XMLObjectChildrenList<KeyInfo>(this);
57 unknownAttributes = new AttributeMap(this);
58 }
59
60
61 public List<KeyInfo> getKeyInfos() {
62 return keyInfos;
63 }
64
65
66 public Integer getVerifyDepth() {
67 return verifyDepth;
68 }
69
70
71 public void setVerifyDepth(Integer newVerifyDepth) {
72 verifyDepth = prepareForAssignment(verifyDepth, newVerifyDepth);
73 }
74
75
76 public AttributeMap getUnknownAttributes() {
77 return unknownAttributes;
78 }
79
80
81 public List<XMLObject> getOrderedChildren() {
82 if (keyInfos.isEmpty()) {
83 return null;
84 }
85 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
86 children.addAll(keyInfos);
87 return Collections.unmodifiableList(children);
88 }
89
90 }