From fa63bf1a4088aee96d96c76053108454682054e1 Mon Sep 17 00:00:00 2001 From: "harald.bratko" Date: Thu, 2 Aug 2007 14:03:03 +0000 Subject: Removed compMode; updated JavaDoc git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@894 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../id/auth/data/InfoboxValidationResultImpl.java | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResultImpl.java (limited to 'id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResultImpl.java') 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..c79612e7b --- /dev/null +++ b/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResultImpl.java @@ -0,0 +1,101 @@ +package at.gv.egovernment.moa.id.auth.data; + + +/** + * 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_; + + /** + * Empty constructor. + */ + public InfoboxValidationResultImpl() { + } + + /** + * Constructor to set all values. + * + * @param valid Global validation result. + * @param extendedSamlAttributes SAML attributes that should be appended to the final + * SAML Assertion or to the AUTH Block + * or to both. + * @param errorMessage An error message if infobox validation fails. + */ + public InfoboxValidationResultImpl( + boolean valid, + ExtendedSAMLAttribute[] extendedSamlAttributes, + String errorMessage) + { + valid_ = valid; + extendedSamlAttributes_ = extendedSamlAttributes; + errorMessage_ = errorMessage; + } + + + /** + * @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#isValid() + */ + public boolean isValid() { + return valid_; + } + + /** + * Sets the error message if validation fails.. + * + * @param errorMessage The error message to set. + */ + public void setErrorMessage(String errorMessage) { + errorMessage_ = errorMessage; + } + + /** + * Sets the SAML attributes returned by the infobox validatior.. + * + * @param extendedSamlAttributes The SAML attributes returned by the infobox validator. + */ + public void setExtendedSamlAttributes(ExtendedSAMLAttribute[] extendedSamlAttributes) { + extendedSamlAttributes_ = extendedSamlAttributes; + } + + /** + * Sets validation result.. + * + * @param valid True if the infobox could be validated successfully, + * otherwise false. + */ + public void setValid(boolean valid) { + valid_ = valid; + } + +} -- cgit v1.2.3