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 <pr:PersonData> element to be used in the final * <saml:Assertion>, if the validator runs in the * compatibility mode. */ 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 <pr:PersonData> element. * * @param personData <pr:PersonData> to set. */ public void setPersonData(Element personData) { personData_ = personData; } /** * Specify whether the result is valid or not. * * @param valid True if the infobox could be validated successfully, * otherwise false. */ public void setValid(boolean valid) { valid_ = valid; } }