1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.opensaml.xacml.ctx.impl;
20
21 import java.util.ArrayList;
22 import java.util.Collections;
23 import java.util.List;
24
25 import org.opensaml.xacml.ctx.AttributeType;
26 import org.opensaml.xacml.ctx.SubjectType;
27 import org.opensaml.xml.XMLObject;
28 import org.opensaml.xml.util.XMLObjectChildrenList;
29 import org.opensaml.xml.validation.AbstractValidatingXMLObject;
30
31
32 public class SubjectTypeImpl extends AbstractValidatingXMLObject implements SubjectType {
33
34
35 private String subjectCategory;
36
37
38 private XMLObjectChildrenList<AttributeType> attributes;
39
40
41
42
43
44
45
46
47 protected SubjectTypeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
48 super(namespaceURI, elementLocalName, namespacePrefix);
49 attributes = new XMLObjectChildrenList<AttributeType>(this);
50 subjectCategory = "urn:oasis:names:tc:xacml:1.0:subject-category:access-subject";
51 }
52
53
54 public String getSubjectCategory() {
55 return subjectCategory;
56 }
57
58
59 public void setSubjectCategory(String newSubjectCategory) {
60 subjectCategory = prepareForAssignment(this.subjectCategory, newSubjectCategory);
61 }
62
63
64 public List<XMLObject> getOrderedChildren() {
65 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
66
67 children.addAll(attributes);
68
69 return Collections.unmodifiableList(children);
70 }
71
72
73 public List<AttributeType> getAttributes() {
74 return attributes;
75 }
76 }