From e07ff145437697c4ecc6ee160ada1261c00151fb Mon Sep 17 00:00:00 2001 From: ferbas Date: Tue, 27 Oct 2009 10:51:46 +0000 Subject: removed has_sig_id; removed moa.id.field.visible git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@354 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../wag/egov/egiz/sig/ConnectorFactory.java | 96 ++++++++++++---------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/ConnectorFactory.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/ConnectorFactory.java index 450cb3c..4e6a77e 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/ConnectorFactory.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/ConnectorFactory.java @@ -70,10 +70,7 @@ public abstract class ConnectorFactory */ private static final Logger logger_ = ConfigLogger.getLogger(ConnectorFactory.class); - /** - * Key value in property file - */ - public static final String MOA_ID_VISIBLE_PROPERTY_KEY = "moa.id.field.visible"; + /** * Retrieves the ConnectorInformation from the connector Class. @@ -310,49 +307,58 @@ public abstract class ConnectorFactory { return connector_identifier.equals(Constants.SIGNATURE_DEVICE_BKU) || connector_identifier.equals(Constants.SIGNATURE_DEVICE_A1) || connector_identifier.equals(Constants.SIGNATURE_DEVICE_MOC); } - + /** - * Tells, if the given connector needs or produces SIG_IDs. - * - *

- * This method is used when pre formatted signature blocks have to be created - * that have to know if there will be a SIG_ID field or not. - *

- *

- * Connectors like BKU produce SIG_IDs when signing that are needed when - * verifying. - *

- * - * @param connector - * The connector. - * @return Returns true, if the given connector uses SIG_IDs, false otherwise. + * Key value in property file */ - public static boolean needsSIG_ID(String connector) - { - // all modernn detached signatures have the SIG_ID field. - if(connector.equals("moa")) - { - String is_id_field_visible = null; - - try - { - is_id_field_visible = SettingsReader.getInstance().getValueFromKey(MOA_ID_VISIBLE_PROPERTY_KEY); - } catch (SettingsException e) - { - logger_.error(e.getMessage(), e); - } - - // if not setted in config, show it - if(is_id_field_visible == null) - return true; - if(is_id_field_visible.equals("true")) - return true; - else - return false; - } + // dferbas: not used anymore with dynamic algorithm support. + // field has to be showed/embedded except for default algorithm suites + // use signature block layout to show/hide + //public static final String MOA_ID_VISIBLE_PROPERTY_KEY = "moa.id.field.visible"; - return true; - //return !connector.equals("moa"); - } + // dferbas: not used anymore +// /** +// * Tells, if the given connector needs or produces SIG_IDs. +// * +// *

+// * This method is used when pre formatted signature blocks have to be created +// * that have to know if there will be a SIG_ID field or not. +// *

+// *

+// * Connectors like BKU produce SIG_IDs when signing that are needed when +// * verifying. +// *

+// * +// * @param connector +// * The connector. +// * @return Returns true, if the given connector uses SIG_IDs, false otherwise. +// */ +// public static boolean needsSIG_ID(String connector) +// { +// // all modernn detached signatures have the SIG_ID field. +// if(connector.equals("moa")) +// { +// String is_id_field_visible = null; +// +// try +// { +// is_id_field_visible = SettingsReader.getInstance().getValueFromKey(MOA_ID_VISIBLE_PROPERTY_KEY); +// } catch (SettingsException e) +// { +// logger_.error(e.getMessage(), e); +// } +// +// // if not setted in config, show it +// if(is_id_field_visible == null) +// return true; +// if(is_id_field_visible.equals("true")) +// return true; +// else +// return false; +// } +// +// return true; +// //return !connector.equals("moa"); +// } } -- cgit v1.2.3