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