1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.opensaml.saml2.core.impl;
22
23 import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller;
24 import org.opensaml.saml2.core.Audience;
25 import org.opensaml.saml2.core.AudienceRestriction;
26 import org.opensaml.xml.XMLObject;
27 import org.opensaml.xml.io.UnmarshallingException;
28
29
30
31
32 public class AudienceRestrictionUnmarshaller extends AbstractSAMLObjectUnmarshaller {
33
34
35 protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
36 AudienceRestriction audienceRestriction = (AudienceRestriction) parentObject;
37
38 if (childObject instanceof Audience) {
39 audienceRestriction.getAudiences().add((Audience) childObject);
40 } else {
41 super.processChildElement(parentObject, childObject);
42 }
43 }
44 }