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