1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.xml.encryption.impl;
18
19 import java.util.ArrayList;
20 import java.util.Collections;
21 import java.util.List;
22
23 import javax.xml.namespace.QName;
24
25 import org.opensaml.xml.XMLObject;
26 import org.opensaml.xml.util.AttributeMap;
27 import org.opensaml.xml.util.IndexedXMLObjectChildrenList;
28 import org.opensaml.xml.validation.AbstractValidatingXMLObject;
29
30
31
32
33 public class EncryptionPropertyImpl extends AbstractValidatingXMLObject implements
34 org.opensaml.xml.encryption.EncryptionProperty {
35
36
37 private String target;
38
39
40 private String id;
41
42
43 private final IndexedXMLObjectChildrenList unknownChildren;
44
45
46 private final AttributeMap unknownAttributes;
47
48
49
50
51
52
53
54
55 protected EncryptionPropertyImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
56 super(namespaceURI, elementLocalName, namespacePrefix);
57 unknownChildren = new IndexedXMLObjectChildrenList<XMLObject>(this);
58 unknownAttributes = new AttributeMap(this);
59 }
60
61
62 public String getTarget() {
63 return this.target;
64 }
65
66
67 public void setTarget(String newTarget) {
68 this.target = prepareForAssignment(this.target, newTarget);
69 }
70
71
72 public String getID() {
73 return this.id;
74 }
75
76
77 public void setID(String newID) {
78 String oldID = this.id;
79 this.id = prepareForAssignment(this.id, newID);
80 registerOwnID(oldID, this.id);
81 }
82
83
84 public AttributeMap getUnknownAttributes() {
85 return unknownAttributes;
86 }
87
88
89 public List<XMLObject> getUnknownXMLObjects() {
90 return (List<XMLObject>) unknownChildren;
91 }
92
93 public List<XMLObject> getUnknownXMLObjects(QName typeOrName) {
94 return (List<XMLObject>) unknownChildren.subList(typeOrName);
95 }
96
97
98 public List<XMLObject> getOrderedChildren() {
99 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
100
101 children.addAll((List<XMLObject>) unknownChildren);
102
103 if (children.size() == 0) {
104 return null;
105 }
106
107 return Collections.unmodifiableList(children);
108 }
109
110 }