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.Advice;
21 import org.opensaml.saml1.core.Assertion;
22 import org.opensaml.saml1.core.AssertionIDReference;
23 import org.opensaml.xml.XMLObject;
24 import org.opensaml.xml.io.UnmarshallingException;
25
26
27
28
29 public class AdviceUnmarshaller extends AbstractSAMLObjectUnmarshaller {
30
31
32 protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
33 throws UnmarshallingException {
34
35 Advice advice = (Advice) parentSAMLObject;
36
37 if (childSAMLObject instanceof Assertion) {
38 advice.getAssertions().add((Assertion) childSAMLObject);
39 } else if (childSAMLObject instanceof AssertionIDReference) {
40 advice.getAssertionIDReferences().add((AssertionIDReference) childSAMLObject);
41 } else {
42 advice.getUnknownXMLObjects().add(childSAMLObject);
43 }
44 }
45 }