aboutsummaryrefslogtreecommitdiff
path: root/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationresultImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationresultImpl.java')
-rw-r--r--id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationresultImpl.java122
1 files changed, 122 insertions, 0 deletions
diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationresultImpl.java b/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationresultImpl.java
new file mode 100644
index 000000000..24eb01e95
--- /dev/null
+++ b/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationresultImpl.java
@@ -0,0 +1,122 @@
+package at.gv.egovernment.moa.id.auth.data;
+
+import org.w3c.dom.Element;
+
+/**
+ * Default implementation of the {@link InfoboxValidationresult} interface.
+ *
+ * @author Harald Bratko
+ */
+public class InfoboxValidationresultImpl implements InfoboxValidationResult {
+
+ /**
+ * Indicates whether the validation was successful or not.
+ */
+ protected boolean valid_;
+
+ /**
+ * The error message.
+ */
+ protected String errorMessage_;
+
+ /**
+ * The SAML attributes returned by the infobox validator.
+ */
+ protected ExtendedSAMLAttribute[] extendedSamlAttributes_;
+
+ /**
+ * The <code>&lt;pr:PersonData&gt;</code> element to be used in the final
+ * <code>&lt;saml:Assertion&gt;</code>, if the validator runs in the
+ * <code>compatibility mode</code>.
+ */
+ protected Element personData_;
+
+ /**
+ * Constructor.
+ *
+ * @param valid
+ * @param extendedSamlAttributes
+ * @param errorMessage
+ * @param personData
+ */
+ public InfoboxValidationresultImpl(
+ boolean valid,
+ ExtendedSAMLAttribute[] extendedSamlAttributes,
+ String errorMessage,
+ Element personData)
+ {
+ valid_ = valid;
+ extendedSamlAttributes_ = extendedSamlAttributes;
+ errorMessage_ = errorMessage;
+ personData_ = personData;
+ }
+
+
+
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult#getErrorMessage()
+ */
+ public String getErrorMessage() {
+ return errorMessage_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult#getExtendedSamlAttributes()
+ */
+ public ExtendedSAMLAttribute[] getExtendedSamlAttributes() {
+ return extendedSamlAttributes_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult#getPersonData()
+ */
+ public Element getPersonData() {
+ return personData_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult#isValid()
+ */
+ public boolean isValid() {
+ return valid_;
+ }
+
+ /**
+ * Sets the errorMessage.
+ *
+ * @param errorMessage The errorMessage to set.
+ */
+ public void setErrorMessage(String errorMessage) {
+ errorMessage_ = errorMessage;
+ }
+
+ /**
+ * Sets the extendedSamlAttributes.
+ *
+ * @param extendedSamlAttributes The extendedSamlAttributes to set.
+ */
+ public void setExtendedSamlAttributes(ExtendedSAMLAttribute[] extendedSamlAttributes) {
+ extendedSamlAttributes_ = extendedSamlAttributes;
+ }
+
+ /**
+ * Sets the <code>&lt;pr:PersonData&gt;</code> element.
+ *
+ * @param personData <code>&lt;pr:PersonData&gt;</code> to set.
+ */
+ public void setPersonData(Element personData) {
+ personData_ = personData;
+ }
+
+ /**
+ * Specify whether the result is valid or not.
+ *
+ * @param valid <code>True</code> if the infobox could be validated successfully,
+ * otherwise <code>false</code>.
+ */
+ public void setValid(boolean valid) {
+ valid_ = valid;
+ }
+
+}