aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas/commandline
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-01-27 18:04:14 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-01-27 18:04:14 +0000
commit2a919c58dae02da975b1a2c0ea485f4338305b9d (patch)
treec20d22f003557d6e1f5037766c8830f29a11f685 /src/main/java/at/gv/egiz/pdfas/commandline
parent89a2096dfb6c45902c6cd1970fb9b0846474ffe7 (diff)
downloadpdf-as-3-2a919c58dae02da975b1a2c0ea485f4338305b9d.tar.gz
pdf-as-3-2a919c58dae02da975b1a2c0ea485f4338305b9d.tar.bz2
pdf-as-3-2a919c58dae02da975b1a2c0ea485f4338305b9d.zip
- more logging
- commandline: signature mode (textual, binary) set optional (setting default mode, equivalent to api usage) - documentation updated git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@736 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/commandline')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/commandline/Main.java28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/commandline/Main.java b/src/main/java/at/gv/egiz/pdfas/commandline/Main.java
index 17548f4..ec75d34 100644
--- a/src/main/java/at/gv/egiz/pdfas/commandline/Main.java
+++ b/src/main/java/at/gv/egiz/pdfas/commandline/Main.java
@@ -154,24 +154,24 @@ public abstract class Main
public static final String VALUE_MODE_VERIFY = "verify";
/**
- * The application mode sign
+ * The value for signature mode binary.
*/
- public static final String VALUE_SIGNATURE_MODE_BINARY = "binary";
+ public static final String VALUE_SIGNATURE_MODE_BINARY = Constants.SIGNATURE_TYPE_BINARY;
/**
- * The application mode verify
+ * The value for signature mode textual.
*/
- public static final String VALUE_SIGNATURE_MODE_TEXTUAL = "textual";
+ public static final String VALUE_SIGNATURE_MODE_TEXTUAL = Constants.SIGNATURE_TYPE_TEXTUAL;
/**
- * The application mode verify
+ * The value for signature mode detached.
*/
public static final String VALUE_SIGNATURE_MODE_DETACHED = "detached";
/**
- * The application mode verify
+ * The value for signature mode detachedtextual.
*/
- public static final String VALUE_SIGNATURE_MODE_DETACHED_TEXT = "detachedtextual";
+ public static final String VALUE_SIGNATURE_MODE_DETACHED_TEXT = Constants.SIGNATURE_TYPE_DETACHEDTEXTUAL;
/**
* The placeholder match mode STRICT
@@ -187,7 +187,7 @@ public abstract class Main
* The placeholder match mode STRICT
*/
public static final String VALUE_PLACEHOLDER_MATCH_MODE_LENIENT = "lenient";
-
+
/**
* The log.
*/
@@ -231,7 +231,7 @@ public abstract class Main
// printUsage(System.out);
String mode = null;
- String signature_mode = null;
+ String signature_mode = Constants.DEFAULT_SIGNATURE_TYPE;
String connector = null;
String signature_type = null;
@@ -1038,12 +1038,10 @@ public abstract class Main
writer.println(" OPTIONS for signation:");
- writer.println(" " + PARAMETER_SIGNATURE_MODE + " <" + VALUE_SIGNATURE_MODE_BINARY + "|" + VALUE_SIGNATURE_MODE_TEXTUAL + ">");
- writer.println(" " + VALUE_SIGNATURE_MODE_BINARY + " ... signs the complete binary document");
- writer.println(" " + VALUE_SIGNATURE_MODE_TEXTUAL + " ... signs only the textual portion of the document");
- // @iaik: why is this commented out?
- //writer.println(" " + VALUE_SIGNATURE_MODE_DETACHED + " ... signs the document using the binary mode and returns the xml signature of it.");
- writer.println(" " + VALUE_SIGNATURE_MODE_DETACHED_TEXT + " ... signs the document using the textual mode and returns the xml signature of it.");
+ writer.println(" " + PARAMETER_SIGNATURE_MODE + " <" + VALUE_SIGNATURE_MODE_BINARY + "|" + VALUE_SIGNATURE_MODE_TEXTUAL + "> [optional]");
+ writer.println(" " + VALUE_SIGNATURE_MODE_BINARY + " ... signs the complete binary document" + (Constants.DEFAULT_SIGNATURE_TYPE.equals(VALUE_SIGNATURE_MODE_BINARY) ? " (default)" : ""));
+ writer.println(" " + VALUE_SIGNATURE_MODE_TEXTUAL + " ... signs only the textual portion of the document" + (Constants.DEFAULT_SIGNATURE_TYPE.equals(VALUE_SIGNATURE_MODE_TEXTUAL) ? " (default)" : ""));
+ writer.println(" " + VALUE_SIGNATURE_MODE_DETACHED_TEXT + " ... signs the document using the textual mode and returns the xml signature of it." + (Constants.DEFAULT_SIGNATURE_TYPE.equals(VALUE_SIGNATURE_MODE_DETACHED_TEXT) ? " (default)" : ""));
writer.print(" " + PARAMETER_SIGNATURE_TYPE + " <");
SignatureTypes sig_types = SignatureTypes.getInstance();