1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.xml.signature.impl;
18
19 import java.util.ArrayList;
20 import java.util.Collections;
21 import java.util.List;
22
23 import org.opensaml.xml.XMLObject;
24 import org.opensaml.xml.signature.Exponent;
25 import org.opensaml.xml.signature.Modulus;
26 import org.opensaml.xml.signature.RSAKeyValue;
27 import org.opensaml.xml.validation.AbstractValidatingXMLObject;
28
29
30
31
32 public class RSAKeyValueImpl extends AbstractValidatingXMLObject implements RSAKeyValue {
33
34
35 private Modulus modulus;
36
37
38 private Exponent exponent;
39
40
41
42
43
44
45
46
47 protected RSAKeyValueImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
48 super(namespaceURI, elementLocalName, namespacePrefix);
49 }
50
51
52 public Modulus getModulus() {
53 return this.modulus;
54 }
55
56
57 public void setModulus(Modulus newModulus) {
58 this.modulus = prepareForAssignment(this.modulus, newModulus);
59 }
60
61
62 public Exponent getExponent() {
63 return this.exponent;
64 }
65
66
67 public void setExponent(Exponent newExponent) {
68 this.exponent = prepareForAssignment(this.exponent, newExponent);
69
70 }
71
72
73 public List<XMLObject> getOrderedChildren() {
74 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
75
76 if (modulus != null) {
77 children.add(modulus);
78 }
79 if (exponent != null) {
80 children.add(exponent);
81 }
82
83 if (children.size() == 0) {
84 return null;
85 }
86
87 return Collections.unmodifiableList(children);
88 }
89
90 }