1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.opensaml.xacml.policy.impl;
19
20
21 import org.opensaml.xacml.policy.ActionsType;
22 import org.opensaml.xacml.policy.EnvironmentsType;
23 import org.opensaml.xacml.policy.ResourcesType;
24 import org.opensaml.xacml.policy.SubjectsType;
25 import org.opensaml.xacml.policy.TargetType;
26 import org.opensaml.xml.XMLObject;
27 import org.opensaml.xml.io.AbstractXMLObjectUnmarshaller;
28 import org.opensaml.xml.io.UnmarshallingException;
29 import org.w3c.dom.Attr;
30
31
32
33
34 public class TargetTypeUnmarshaller extends AbstractXMLObjectUnmarshaller {
35
36
37 public TargetTypeUnmarshaller() {
38 super();
39 }
40
41
42
43 protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
44
45 }
46
47
48 protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
49 throws UnmarshallingException {
50 TargetType targetType = (TargetType) parentXMLObject;
51
52 if(childXMLObject.getElementQName().equals(ActionsType.DEFAULT_ELEMENT_NAME)){
53 targetType.setActions((ActionsType)childXMLObject);
54 }
55 if(childXMLObject.getElementQName().equals(EnvironmentsType.DEFAULT_ELEMENT_NAME)){
56 targetType.setEnvironments((EnvironmentsType)childXMLObject);
57 }
58 if(childXMLObject.getElementQName().equals(ResourcesType.DEFAULT_ELEMENT_NAME)){
59 targetType.setResources((ResourcesType)childXMLObject);
60 }
61 if(childXMLObject.getElementQName().equals(SubjectsType.DEFAULT_ELEMENT_NAME)){
62 targetType.setSubjects((SubjectsType)childXMLObject);
63 }
64 }
65
66
67 protected void processElementContent(XMLObject xmlObject, String elementContent) {
68
69 }
70 }