1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.opensaml.xacml.policy.impl;
20
21 import java.util.ArrayList;
22 import java.util.Collections;
23 import java.util.List;
24
25 import org.opensaml.common.impl.AbstractSAMLObject;
26 import org.opensaml.xacml.policy.ActionsType;
27 import org.opensaml.xacml.policy.EnvironmentsType;
28 import org.opensaml.xacml.policy.ResourcesType;
29 import org.opensaml.xacml.policy.SubjectsType;
30 import org.opensaml.xacml.policy.TargetType;
31 import org.opensaml.xml.XMLObject;
32
33
34
35
36 public class TargetTypeImpl extends AbstractSAMLObject implements TargetType {
37
38
39 private ActionsType actions;
40
41
42 private EnvironmentsType environments;
43
44
45 private SubjectsType subjects;
46
47
48 private ResourcesType resources;
49
50
51
52
53
54
55
56
57 protected TargetTypeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
58 super(namespaceURI, elementLocalName, namespacePrefix);
59 }
60
61
62
63 public List<XMLObject> getOrderedChildren() {
64 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
65
66 if(subjects != null){
67 children.add(subjects);
68 }
69 if(actions != null){
70 children.add(actions);
71 }
72 if(resources != null){
73 children.add(resources);
74 }
75 if(environments != null){
76 children.add(environments);
77 }
78 return Collections.unmodifiableList(children);
79 }
80
81
82 public SubjectsType getSubjects() {
83 return subjects;
84 }
85
86
87 public ResourcesType getResources() {
88 return resources;
89 }
90
91
92 public ActionsType getActions() {
93 return actions;
94 }
95
96
97 public EnvironmentsType getEnvironments() {
98 return environments;
99 }
100
101
102 public void setActions(ActionsType newActions) {
103 this.actions = prepareForAssignment(this.actions,newActions);
104 }
105
106
107 public void setEnvironments(EnvironmentsType newEnvironments) {
108 this.environments = prepareForAssignment(this.environments,newEnvironments);
109 }
110
111
112 public void setResources(ResourcesType newResources) {
113 this.resources = prepareForAssignment(this.resources,newResources);
114 }
115
116
117 public void setSubjects(SubjectsType newSubjects) {
118 this.subjects = prepareForAssignment(this.subjects,newSubjects);
119 }
120 }