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 org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller;
20 import org.opensaml.saml1.core.ConfirmationMethod;
21 import org.opensaml.saml1.core.SubjectConfirmation;
22 import org.opensaml.xml.XMLObject;
23 import org.opensaml.xml.io.UnmarshallingException;
24
25
26
27
28 public class SubjectConfirmationUnmarshaller extends AbstractSAMLObjectUnmarshaller {
29
30
31 protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
32 throws UnmarshallingException {
33
34 SubjectConfirmation subjectConfirmation = (SubjectConfirmation) parentSAMLObject;
35
36 if (childSAMLObject instanceof ConfirmationMethod) {
37 subjectConfirmation.getConfirmationMethods().add((ConfirmationMethod) childSAMLObject);
38 } else {
39 subjectConfirmation.setSubjectConfirmationData(childSAMLObject);
40 }
41 }
42 }