|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectat.gv.egiz.pdfas.commandline.Main
The main program entry point of the commandline tool.
The commandline uses the PDF-AS API.
| Field Summary | |
protected static String |
PARAMETER_CONNECTOR
Command line parameter setting the application to connect |
protected static String |
PARAMETER_DEPLOY_DEFAULT_CONFIGURATION
Command line parameter that starts the deployment of the default configuration to the current user's home folder. |
protected static String |
PARAMETER_MODE
Command line parameter setting the application mode sign|verify |
protected static String |
PARAMETER_POS
Command line parameter selecting the position of the signature. |
protected static String |
PARAMETER_SIGNATURE_MODE
Command line parameter setting the signature mode. |
protected static String |
PARAMETER_SIGNATURE_TYPE
Command line parameter setting the signature type. |
protected static String |
PARAMETER_USER_NAME
Command line parameter setting the username |
protected static String |
PARAMETER_USER_PASSWORD
Command line parameter setting the users password |
protected static String |
PARAMETER_VERIFY_WHICH
Command line parameter selecting the signature which is going to be verified. |
static String |
VALUE_MODE_SIGN
The application mode sign |
static String |
VALUE_MODE_VERIFY
The application mode verify |
static String |
VALUE_SIGNATURE_MODE_BINARY
The application mode sign |
static String |
VALUE_SIGNATURE_MODE_DETACHED
The application mode verify |
static String |
VALUE_SIGNATURE_MODE_DETACHED_TEXT
The application mode verify |
static String |
VALUE_SIGNATURE_MODE_TEXTUAL
The application mode verify |
| Constructor Summary | |
Main()
|
|
| Method Summary | |
protected static void |
carryOutCommand(String mode,
String signature_mode,
String connector,
String signature_type,
String user_name,
String user_password,
int verify_which,
String input,
String output,
String pos_string)
|
static void |
carryOutSign(String input,
String connector,
String signature_mode,
String signature_type,
String pos_string,
String user_name,
String user_password,
String output,
PrintWriter messageOutput)
|
static void |
carryOutVerify(String input,
String connector,
int verify_which,
PrintWriter messageOutput)
|
protected static boolean |
checkConnector(String connector)
Checks the value for correctness. |
protected static boolean |
checkMode(String mode)
Checks the value for correctness. |
protected static boolean |
checkSignatureMode(String signature_mode)
Checks the value for correctness. |
protected static boolean |
checkSignatureType(String signature_type)
Checks the value for correctness. |
protected static int |
debugVerifyResults(VerifyResults results)
Formats the verification results for debugging. |
static void |
formatVerifyResult(VerifyResult result,
PrintWriter writer)
|
protected static void |
formatVerifyResults(VerifyResults results,
PrintWriter writer)
Formats the verification results. |
protected static String |
generateOutputFileNameFromInput(String input,
String sig_mode)
|
static void |
main(String[] args)
Main program entry point. |
protected static void |
printMissing(String missing_term)
Prints that something is missing. |
protected static void |
printMissingParameter(String missing_term,
String parameter)
Prints that a certain parameter was missing. |
protected static void |
printNoValue(String parameter)
Prints that the provided value was unrecognized. |
protected static void |
printPresentableException(PdfAsException e)
Prints out the ErrorCodeException in a descriptive form. |
protected static void |
printUnrecognizedAdditionalCommandlineArgument(String argument)
Prints that the provided additional commandline argument was unrecognized. |
protected static void |
printUnrecognizedOption(String option)
Prints that the provided option was unrecognized. |
protected static void |
printUnrecognizedValue(String parameter,
String value)
Prints that the provided value was unrecognized. |
static void |
printUsage(PrintStream writer)
Prints the usage text. |
static void |
processSign(DataSource dataSource,
String connector,
String signature_mode,
String signature_type,
String pos_string,
DataSink dataSink)
|
static VerifyResults |
processVerify(DataSource dataSource,
String connector,
int verify_which)
|
protected static PdfASID |
translateSignatureModeToPdfASID(String signature_mode)
Translates the commandline argument to a PDF-AS-ID. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final String PARAMETER_MODE
protected static final String PARAMETER_CONNECTOR
protected static final String PARAMETER_SIGNATURE_MODE
protected static final String PARAMETER_SIGNATURE_TYPE
protected static final String PARAMETER_USER_NAME
protected static final String PARAMETER_USER_PASSWORD
protected static final String PARAMETER_POS
protected static final String PARAMETER_VERIFY_WHICH
protected static final String PARAMETER_DEPLOY_DEFAULT_CONFIGURATION
Constants.USERHOME_CONFIG_FOLDER,
Constant Field Valuespublic static final String VALUE_MODE_SIGN
public static final String VALUE_MODE_VERIFY
public static final String VALUE_SIGNATURE_MODE_BINARY
public static final String VALUE_SIGNATURE_MODE_TEXTUAL
public static final String VALUE_SIGNATURE_MODE_DETACHED
public static final String VALUE_SIGNATURE_MODE_DETACHED_TEXT
| Constructor Detail |
public Main()
| Method Detail |
public static void main(String[] args)
throws IOException
args - The commandline arguments.
IOException
protected static void carryOutCommand(String mode,
String signature_mode,
String connector,
String signature_type,
String user_name,
String user_password,
int verify_which,
String input,
String output,
String pos_string)
throws PdfAsException
PdfAsException
public static void carryOutSign(String input,
String connector,
String signature_mode,
String signature_type,
String pos_string,
String user_name,
String user_password,
String output,
PrintWriter messageOutput)
throws PdfAsException
PdfAsException
public static void carryOutVerify(String input,
String connector,
int verify_which,
PrintWriter messageOutput)
throws PdfAsException
PdfAsException
public static void processSign(DataSource dataSource,
String connector,
String signature_mode,
String signature_type,
String pos_string,
DataSink dataSink)
throws PdfAsException
PdfAsException
public static VerifyResults processVerify(DataSource dataSource,
String connector,
int verify_which)
throws PdfAsException
PdfAsException
protected static String generateOutputFileNameFromInput(String input,
String sig_mode)
protected static void printUnrecognizedOption(String option)
throws PresentableException
option - The unrecognized option.
PresentableException - Forwarded exception.
protected static void printNoValue(String parameter)
throws PresentableException
parameter - The parameter, which is missing a value.
PresentableException - Forwarded exception.
protected static void printUnrecognizedValue(String parameter,
String value)
throws PresentableException
value - The unrecognized value.
PresentableException - Forwarded exception.
protected static void printUnrecognizedAdditionalCommandlineArgument(String argument)
throws PresentableException
argument - The unrecognized argument.
PresentableException - Forwarded exception.
protected static void printMissingParameter(String missing_term,
String parameter)
throws PresentableException
missing_term - A description of the missing parameter ("e.g. a mode").parameter - The missing parameter itself (e.g. "-mode").
PresentableException - Forwarded exception.
protected static void printMissing(String missing_term)
throws PresentableException
missing_term - A descriptive message of the missing thing.
PresentableException - Forwarded exception.protected static void printPresentableException(PdfAsException e)
public static void printUsage(PrintStream writer)
throws PresentableException
writer - The writer to print the text to.
PresentableException - Forwarded exception.protected static boolean checkMode(String mode)
mode - The parameter's value.
protected static boolean checkSignatureMode(String signature_mode)
signature_mode - The parameter's value.
protected static boolean checkConnector(String connector)
throws ConnectorFactoryException
connector - The parameter's value.
ConnectorFactoryException - F.e.
protected static boolean checkSignatureType(String signature_type)
throws SignatureTypesException
signature_type - The parameter's value.
SignatureTypesExceptionprotected static PdfASID translateSignatureModeToPdfASID(String signature_mode)
signature_mode - The signator mode commandline argument.
protected static void formatVerifyResults(VerifyResults results,
PrintWriter writer)
throws SettingNotFoundException
results - The List of SignatureResponse verification results.writer - The output sink to write the formatted text to.
SettingNotFoundException - Forwarded exception.
protected static int debugVerifyResults(VerifyResults results)
throws SettingNotFoundException
results -
SettingNotFoundException - Forwarded exception.
public static void formatVerifyResult(VerifyResult result,
PrintWriter writer)
throws SettingNotFoundException
SettingNotFoundException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||