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/ExtendedSAMLAttributeImpl.java | 8 +- .../id/auth/data/InfoboxValidationResultImpl.java | 101 +++++++++++++++++++++ .../id/auth/data/InfoboxValidationresultImpl.java | 96 -------------------- .../moa/id/auth/data/InfoboxValidatorParams.java | 22 ----- .../id/auth/data/InfoboxValidatorParamsImpl.java | 23 +---- .../egovernment/moa/id/auth/data/SchemaImpl.java | 4 +- .../moa/id/auth/validator/InfoboxValidator.java | 1 - 7 files changed, 108 insertions(+), 147 deletions(-) create mode 100644 id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResultImpl.java delete 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') diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttributeImpl.java b/id.server/src/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttributeImpl.java index 27b512717..e7e490924 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttributeImpl.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttributeImpl.java @@ -12,22 +12,22 @@ public class ExtendedSAMLAttributeImpl implements ExtendedSAMLAttribute { * The value of this SAML attribute. Must be either of type java.lang.String * or org.w3c.Element. */ - private Object value_; + protected Object value_; /** * The name of this SAML attribute. */ - private String name_; + protected String name_; /** * The namespace URI of this SAML attribute. */ - private String namespace_; + protected String namespace_; /** * Specifies whether this SAML attribute should be appended to AUTH Block. */ - private int addToAUTHBlock_; + protected int addToAUTHBlock_; /** * Sets this ExtendedSAMLAttribute. 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; + } + +} 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 deleted file mode 100644 index ad2e0134f..000000000 --- a/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidationresultImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -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_; - - - /** - * Constructor. - * - * @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; - } - -} diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParams.java b/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParams.java index 0f78760a8..c7a557290 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParams.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParams.java @@ -1,4 +1,3 @@ - package at.gv.egovernment.moa.id.auth.data; import java.security.PublicKey; @@ -156,27 +155,6 @@ public interface InfoboxValidatorParams { */ public boolean getHideStammzahl(); - /** - * Indicates if the infobox validator has to run in the so called - * compatibility mode. - *
- * The compatibility mode is used when the final <saml:Assertion> - * sent to the online application should be rather built on the basis of a - * <pr:PersonData> structure returned by the infobox validator instead - * of the <pr:PersonData> structure extracted from the original identity link. - * The compatibility mode is only available within the - * Mandates-infobox context. For all other infoboxes the return value of - * this method will be ignored. - * (please refer MOA-ID specification for more details). - *

- * Note: In the current version the compatibility mode is not yet - * supported! - * - * @return True if the infobox validator has to run in the so called - * compatibility mode, otherwise false. - */ - public boolean getCompMode(); - /** * Returns application specific parameters. * Each child element of this element contains diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParamsImpl.java b/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParamsImpl.java index e524ff5f5..80ba5995f 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParamsImpl.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParamsImpl.java @@ -82,10 +82,7 @@ public class InfoboxValidatorParamsImpl implements InfoboxValidatorParams { * The identity link. */ protected Element identityLink_; - /** - * Indicates if the infobox validator has to run in the so called compatibility mode. - */ - protected boolean compMode_; + /** * Indicates whether source pins (Stammzahlen) must be hidden or not. */ @@ -193,13 +190,6 @@ public class InfoboxValidatorParamsImpl implements InfoboxValidatorParams { return identityLink_; } - /** - * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getCompMode() - */ - public boolean getCompMode() { - return compMode_; - } - /** * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getHideStammzahl() */ @@ -344,17 +334,6 @@ public class InfoboxValidatorParamsImpl implements InfoboxValidatorParams { trustProfileID_ = trustProfileID; } - /** - * Sets the {@link #compMode_} parameter. Indicates whether the infobox - * validator has to run in the so called compatibility mode. - * - * @param compMode True if the infobox validator has to run in the so - * called compatibility mode, otherwise false. - */ - public void setCompMode(boolean compMode) { - compMode_ = compMode; - } - /** * Sets the {@link #hideStammzahl_} parameter. This indicates whether source pins * (Stammzahlen) must be hidden or not. diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/data/SchemaImpl.java b/id.server/src/at/gv/egovernment/moa/id/auth/data/SchemaImpl.java index e6755b58c..964725416 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/data/SchemaImpl.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/data/SchemaImpl.java @@ -10,12 +10,12 @@ public class SchemaImpl implements Schema { /** * The namespace of this schema. */ - private String namespace_; + protected String namespace_; /** * The location (URI) of this schema; */ - private String schemaLocation_; + protected String schemaLocation_; /** * Sets the namespace and schema location URIS of this schema. diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/validator/InfoboxValidator.java b/id.server/src/at/gv/egovernment/moa/id/auth/validator/InfoboxValidator.java index 2f14eb3c9..c776418ab 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/validator/InfoboxValidator.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/validator/InfoboxValidator.java @@ -2,7 +2,6 @@ package at.gv.egovernment.moa.id.auth.validator; import at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult; import at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams; -import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute; /** * Validates an InfoboxReadResponse. -- cgit v1.2.3