aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag
diff options
context:
space:
mode:
authorknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-07-30 10:11:40 +0000
committerknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-07-30 10:11:40 +0000
commit07f6c8f33b2d700276fe6ec6339ff836c8710131 (patch)
tree2506a97a7d1637e48d6fadc62ba0567d41fc3aa7 /src/main/java/at/knowcenter/wag
parent0eec1152db9d5ac312186cbd30fb24df770ef3a6 (diff)
downloadpdf-as-3-07f6c8f33b2d700276fe6ec6339ff836c8710131.tar.gz
pdf-as-3-07f6c8f33b2d700276fe6ec6339ff836c8710131.tar.bz2
pdf-as-3-07f6c8f33b2d700276fe6ec6339ff836c8710131.zip
Problem with SIG_ID field by MOA textual signs solved
Problem with Vorschau solved git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@166 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureTypes.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/DetachedLocRefMOAConnector.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java14
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java11
5 files changed, 23 insertions, 8 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
index 5aff1f3..0576781 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
@@ -782,7 +782,7 @@ public abstract class PdfAS
List results = new ArrayList();
si.current_operation = 0;
-
+
if(signature_holders.size() == 1)
{
List temp_holders = new ArrayList(si.signature_holders);
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureTypes.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureTypes.java
index 0350129..19b28e7 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureTypes.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureTypes.java
@@ -210,7 +210,7 @@ public class SignatureTypes
// public static String[] REQUIRED_SIG_KEYS = new String[]{SIG_NAME, SIG_DATE,
// SIG_ISSUER, SIG_VALUE, SIG_NUMBER, SIG_ID};
public static String[] REQUIRED_SIG_KEYS = new String[] { SIG_DATE,
- SIG_ISSUER, SIG_VALUE, SIG_NUMBER, SIG_ID };
+ SIG_ISSUER, SIG_VALUE, SIG_NUMBER, SIG_ID, SIG_KZ };
/**
* Tells, if the given key is a required key.
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/DetachedLocRefMOAConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/DetachedLocRefMOAConnector.java
index 77303c1..31b62f0 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/DetachedLocRefMOAConnector.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/DetachedLocRefMOAConnector.java
@@ -186,6 +186,8 @@ public class DetachedLocRefMOAConnector implements Connector
verify_request_xml = verify_request_xml.replaceFirst(TemplateReplaces.TRUST_PROFILE_ID_REPLACE, this.environment.getVerifyTrustProfileId());
verify_request_xml = verify_request_xml.replaceFirst(TemplateReplaces.LOC_REF_CONTENT_REPLACE, this.environment.getSignatureDataUrl());
+ log.debug("\r\n\r\n" + verify_request_xml + "\r\n\r\n");
+
return verify_request_xml;
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java
index cc28adc..460694d 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/DetachedLocRefMOAIdFormatter.java
@@ -3,8 +3,12 @@
*/
package at.knowcenter.wag.egov.egiz.sig.sigid;
+import org.apache.log4j.Logger;
+
+import at.knowcenter.wag.egov.egiz.cfg.ConfigLogger;
import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
import at.knowcenter.wag.egov.egiz.exceptions.SettingsException;
+import at.knowcenter.wag.egov.egiz.sig.ConnectorFactory;
/**
* @author wprinz
@@ -18,6 +22,8 @@ public class DetachedLocRefMOAIdFormatter implements IdFormatter
*/
public static String SIG_ID_PREFIX = "etsi-bka-moa-1.0"; //$NON-NLS-1$
+ private static final Logger logger_ = ConfigLogger.getLogger(DetachedLocRefMOAIdFormatter.class);
+
/**
* Key value in property file
*/
@@ -32,12 +38,18 @@ public class DetachedLocRefMOAIdFormatter implements IdFormatter
try
{
+ if(SettingsReader.getInstance().getValueFromKey("moa.id.field.visible").equals("false")){
+ return null;
+ }
+
SIG_ID_PREFIX = SettingsReader.getInstance().getValueFromKey(SIG_ID_PROPERTY_KEY);
} catch (SettingsException e)
{
e.printStackTrace();
}
-
+
+
+
return SIG_ID_PREFIX;
}
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java
index 9d9cc1f..150b592 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java
@@ -323,7 +323,7 @@ public class VerifyPreviewServlet extends HttpServlet
// just render useful information
String[] rkeys = { SignatureTypes.SIG_DATE, SignatureTypes.SIG_ISSUER,
- SignatureTypes.SIG_NUMBER }; // SignatureTypes.REQUIRED_SIG_KEYS;
+ SignatureTypes.SIG_NUMBER, SignatureTypes.SIG_KZ}; // SignatureTypes.REQUIRED_SIG_KEYS;
for (int key_idx = 0; key_idx < rkeys.length; key_idx++)
{
@@ -331,7 +331,8 @@ public class VerifyPreviewServlet extends HttpServlet
SignatureEntry entry = signature_object.getSigEntry(key);
String caption = entry.getCaption();
String value = entry.getValue();
- if (SignatureTypes.SIG_ID.equals(key) && value == null)
+
+ if (SignatureTypes.SIG_KZ.equals(key) && value == null)
{
continue;
}
@@ -615,7 +616,7 @@ public class VerifyPreviewServlet extends HttpServlet
return;
}
-
+
DiskFileItemFactory fif = new DiskFileItemFactory();
fif.setRepository(SettingsReader.getTemporaryDirectory());
ServletFileUpload sfu = new ServletFileUpload(fif);
@@ -671,8 +672,9 @@ public class VerifyPreviewServlet extends HttpServlet
}
SignatureHolder new_holder = new TextualSignatureHolder(text_to_be_verified, signature_object);
+
si.signature_holders.set(verify_which, new_holder);
-
+
if (verify == false)
{
dispatch(request, response, "/dataok.html");
@@ -719,6 +721,5 @@ public class VerifyPreviewServlet extends HttpServlet
SignServlet.prepareDispatchToErrorPage(e, request);
dispatch(request, response, "/jsp/error.jsp");
}
-
}
}