aboutsummaryrefslogtreecommitdiff
path: root/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java
diff options
context:
space:
mode:
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java')
-rw-r--r--moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java37
1 files changed, 20 insertions, 17 deletions
diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java
index c2490f9..faeaf82 100644
--- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java
+++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java
@@ -21,7 +21,6 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
package at.gv.egovernment.moa.spss.server.config;
import java.util.Iterator;
@@ -29,7 +28,7 @@ import java.util.Set;
/**
* A collection of <code>KeyGroupEntry</code>s with its own ID.
- *
+ *
* @author Sven Aigner
* @author Patrick Peck
* @version $Id$
@@ -37,59 +36,62 @@ import java.util.Set;
public class KeyGroup {
/** The keys belonging to this key group. */
- private Set keyGroupEntries;
+ private final Set keyGroupEntries;
/** The key group ID. */
- private String id;
+ private final String id;
/** The digest method algorithm for the key group */
- private String digestMethodAlgorithm;
+ private final String digestMethodAlgorithm;
/**
* Create a <code>KeyGroup</code>.
- *
- * @param id The ID of this <code>KeyGroup</code>.
- * @param keyGroupEntries The keys belonging to this <code>KeyGroup</code>.
+ *
+ * @param id The ID of this <code>KeyGroup</code>.
+ * @param keyGroupEntries The keys belonging to this
+ * <code>KeyGroup</code>.
* @param digestMethodAlgorithm The signature algorithm used for this key group
*/
public KeyGroup(String id, Set keyGroupEntries, String digestMethodAlgorithm) {
this.id = id;
this.keyGroupEntries = keyGroupEntries;
- this.digestMethodAlgorithm = digestMethodAlgorithm;
+ this.digestMethodAlgorithm = digestMethodAlgorithm;
}
/**
* Return the <code>KeyEntry</code>s contained in this <code>KeyGroup</code>.
- *
+ *
* @return The <code>KeyEntry</code>s contained in this <code>KeyGroup</code>.
*/
public Set getKeyGroupEntries() {
return keyGroupEntries;
}
-
+
/**
* Returnd the digest method algorithm used for this key group
+ *
* @return The digest method signature algorithm used for this key group
*/
public String getDigestMethodAlgorithm() {
- return digestMethodAlgorithm;
+ return digestMethodAlgorithm;
}
/**
* Return the ID of this <code>KeyGroup</code>.
- *
+ *
* @return The <code>KeyGroup</code> ID.
*/
public String getId() {
return id;
}
- /**
+ /**
* Return a <code>String</code> representation of this <code>KeyGroup</code>.
- *
+ *
* @return The <code>String</code> representation.
* @see java.lang.Object#toString()
*/
+ @Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ final StringBuffer sb = new StringBuffer();
Iterator i;
if (getKeyGroupEntries() != null) {
@@ -99,7 +101,8 @@ public class KeyGroup {
sb.append(" " + i.next());
}
}
- return "(KeyGroup - ID:" + id + " " + sb.toString() + ")" + "DigestMethodAlgorithm: " + digestMethodAlgorithm;
+ return "(KeyGroup - ID:" + id + " " + sb.toString() + ")" + "DigestMethodAlgorithm: "
+ + digestMethodAlgorithm;
}
}