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.BaseID;
25 import org.opensaml.saml2.core.EncryptedID;
26 import org.opensaml.saml2.core.NameID;
27 import org.opensaml.saml2.core.SubjectConfirmation;
28 import org.opensaml.saml2.core.SubjectConfirmationData;
29 import org.opensaml.xml.XMLObject;
30
31
32
33
34 public class SubjectConfirmationImpl extends AbstractSAMLObject implements SubjectConfirmation {
35
36
37 private BaseID baseID;
38
39
40 private NameID nameID;
41
42
43 private EncryptedID encryptedID;
44
45
46 private SubjectConfirmationData subjectConfirmationData;
47
48
49 private String method;
50
51
52
53
54
55
56
57
58 protected SubjectConfirmationImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
59 super(namespaceURI, elementLocalName, namespacePrefix);
60 }
61
62
63 public BaseID getBaseID() {
64 return baseID;
65 }
66
67
68 public void setBaseID(BaseID newBaseID) {
69 baseID = prepareForAssignment(baseID, newBaseID);
70 }
71
72
73 public NameID getNameID() {
74 return nameID;
75 }
76
77
78 public void setNameID(NameID newNameID) {
79 nameID = prepareForAssignment(nameID, newNameID);
80 }
81
82
83 public EncryptedID getEncryptedID() {
84 return this.encryptedID;
85 }
86
87
88 public void setEncryptedID(EncryptedID newEncryptedID) {
89 this.encryptedID = prepareForAssignment(this.encryptedID, newEncryptedID);
90 }
91
92
93 public SubjectConfirmationData getSubjectConfirmationData() {
94 return subjectConfirmationData;
95 }
96
97
98 public void setSubjectConfirmationData(SubjectConfirmationData newSubjectConfirmationData) {
99 this.subjectConfirmationData = prepareForAssignment(this.subjectConfirmationData, newSubjectConfirmationData);
100
101 }
102
103
104 public String getMethod() {
105 return method;
106 }
107
108
109 public void setMethod(String newMethod) {
110 this.method = prepareForAssignment(this.method, newMethod);
111 }
112
113
114 public List<XMLObject> getOrderedChildren() {
115 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
116
117 if (baseID != null) {
118 children.add(baseID);
119 }
120
121 if (nameID != null) {
122 children.add(nameID);
123 }
124
125 if (encryptedID != null) {
126 children.add(encryptedID);
127 }
128
129 children.add(subjectConfirmationData);
130
131 return Collections.unmodifiableList(children);
132 }
133 }