diff options
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments')
22 files changed, 149 insertions, 149 deletions
| diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java index 1b7aca28..b2ecb3aa 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/Argument.java @@ -23,7 +23,7 @@ import at.asit.pdfover.gui.workflow.config.ConfigOverlayManipulator;  /**   * CLI Argument base class - *  + *   * Implementing arguments have to be registered in PrepareConfigurationState   */  public abstract class Argument { @@ -86,9 +86,9 @@ public abstract class Argument {  	/**  	 * Set the command option in format: -... -	 *  +	 *  	 * Examples: -h -	 *  +	 *  	 * @param value  	 */  	protected void setCommandOptions(String[] value) { @@ -97,7 +97,7 @@ public abstract class Argument {  	/**  	 * Get the command option -	 *  +	 *  	 * Examples: -h  	 * @return the command option  	 */ @@ -107,25 +107,25 @@ public abstract class Argument {  	/**  	 * Invokes the argument to set stuff within the stateMachine -	 *  +	 *  	 * It should return the offset within the args array where the last used argument of this Argument was used. -	 *  +	 *  	 * Example:  	 * args[] = { "-h", "-b", "LOCAL" } -	 *  +	 *  	 * Help Argument call:  	 *     offset = 0  	 *     returns 0 -	 *      +	 *  	 * BKU Argument call:  	 *     offset = 1  	 *     returns 2 -	 *  +	 *  	 * @param args  	 * @param argOffset -	 * @param handler  +	 * @param handler  	 * @return returns the argumentOffset ending the section of this Argument -	 * @throws InitializationException  +	 * @throws InitializationException  	 */  	public abstract int handleArgument(String[] args, int argOffset, ArgumentHandler handler) throws InitializationException;  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java index dbc92a29..54ccbb48 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java @@ -45,7 +45,7 @@ public class ArgumentHandler {  	/**  	 * Constructor -	 *  +	 *  	 * @param stateMachine  	 */  	public ArgumentHandler(StateMachine stateMachine) { @@ -54,7 +54,7 @@ public class ArgumentHandler {  	/**  	 * Gets available Arguments -	 *  +	 *  	 * @return the list of available arguments  	 */  	public Set<Argument> getArguments() { @@ -63,7 +63,7 @@ public class ArgumentHandler {  	/**  	 * Adds a CLIArgument to the handler -	 *  +	 *  	 * @param cliArgument the CLIArgument subclass to add  	 */  	public void addCLIArgument(Class<? extends Argument> cliArgument) { @@ -84,13 +84,13 @@ public class ArgumentHandler {  				this.cliArguments.put(commandOptions[i], arg);  			}  		} catch (Exception e) { -			log.error("Error instantiating CLI argument" , e); //$NON-NLS-1$ +			log.error("Error instantiating CLI argument" , e); //  		}  	}  	/**  	 * Handle CLI Arguments -	 *  +	 *  	 * @param args  	 * @throws InitializationException  	 */ @@ -101,8 +101,8 @@ public class ArgumentHandler {  				i = this.cliArguments.get(args[i]).handleArgument(args, i, this);  			} else {  				// Assume we got the document we want to sign -				if (this.cliArguments.containsKey("-i")) { //$NON-NLS-1$ -					i = this.cliArguments.get("-i").handleArgument(args, i-1, this); //$NON-NLS-1$ +				if (this.cliArguments.containsKey("-i")) { // +					i = this.cliArguments.get("-i").handleArgument(args, i-1, this); //  				}  			}  		} @@ -110,7 +110,7 @@ public class ArgumentHandler {  	/**  	 * Set by a cli argument if it wants the program to exit -	 *  +	 *  	 * @param requireExit  	 */  	public void setRequireExit(boolean requireExit) { @@ -119,7 +119,7 @@ public class ArgumentHandler {  	/**  	 * Checks if one argument required the program to exit immediately -	 *  +	 *  	 * @return true or false  	 */  	public boolean doesRequireExit() { diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java index 3c6b9f3e..29ce09cb 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java @@ -26,12 +26,12 @@ public class AutomaticPositioningArgument extends Argument {  	 * Constructor  	 */  	public AutomaticPositioningArgument() { -		super(new String[] { "-a" }, "argument.help.autopos"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] { "-a" }, "argument.help.autopos"); // //  	}  	/*  	 * (non-Javadoc) -	 *  +	 *  	 * @see  	 * at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang  	 * .String[], int, at.asit.pdfover.gui.workflow.StateMachine, diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java index 646d361d..8760438a 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java @@ -28,12 +28,12 @@ public class BKUArgument extends Argument {  	 */  	public BKUArgument() {  		super( -				new String[] { "-b" }, "argument.help.bku"); //$NON-NLS-1$ //$NON-NLS-2$ +				new String[] { "-b" }, "argument.help.bku"); // //  	}  	/*  	 * (non-Javadoc) -	 *  +	 *  	 * @see  	 * at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang  	 * .String[], int, at.asit.pdfover.gui.workflow.StateMachine, @@ -49,16 +49,16 @@ public class BKUArgument extends Argument {  				BKUs argumentValue = BKUs.valueOf(args[argOffset + 1]);  				getConfiguration().setDefaultBKUOverlay(argumentValue); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) {  			throw new InitializationException( -					Messages.getString("argument.invalid.bku") + this.getHelpText(), ex);  //$NON-NLS-1$ +					Messages.getString("argument.invalid.bku") + this.getHelpText(), ex);  //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.bku") + this.getHelpText(), null);  //$NON-NLS-1$ +				Messages.getString("argument.invalid.bku") + this.getHelpText(), null);  //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java index e14782ae..d7fa5de4 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java @@ -36,9 +36,9 @@ public class ConfigFileArgument extends Argument {  	 * Constructor  	 */  	public ConfigFileArgument() { -		super(new String[] {"-c"}, "argument.help.config"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-c"}, "argument.help.config"); // //  	} -	 +  	/* (non-Javadoc)  	 * @see at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang.String[], int, at.asit.pdfover.gui.workflow.StateMachine, at.asit.pdfover.gui.cliarguments.ArgumentHandler)  	 */ @@ -50,19 +50,19 @@ public class ConfigFileArgument extends Argument {  			if (args.length > argOffset + 1) {  				String configFile = args[argOffset + 1]; -				 +  				getConfiguration().setConfigurationFile(configFile); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Configuration File Argument invalid!", ex); //$NON-NLS-1$ +			log.error("Configuration File Argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.config") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.config") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.config") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.config") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java index 31d11fc6..cc0b15ca 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java @@ -33,7 +33,7 @@ public class EmblemArgument extends Argument {  	 * Constructor  	 */  	public EmblemArgument() { -		super(new String[] {"-e"}, "argument.help.emblem"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-e"}, "argument.help.emblem"); // //  	}  	/** @@ -55,23 +55,23 @@ public class EmblemArgument extends Argument {  				String emblem = args[argOffset + 1];  				File emblemFile = new File(emblem); -				 +  				if(!emblemFile.exists()) {  					throw new FileNotFoundException(emblem);  				} -				 +  				getConfiguration().setDefaultEmblemOverlay(emblem); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Emblem argument invalid!", ex); //$NON-NLS-1$ +			log.error("Emblem argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.emblem") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.emblem") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.emblem") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.emblem") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java index 4296bb3a..cdcc7a32 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java @@ -26,15 +26,15 @@ import at.asit.pdfover.commons.Messages;   * CLI Argument to show the useage message   */  public class HelpArgument extends Argument { -	 +  	/**  	 * Constructor  	 */  	public HelpArgument() { -		super(new String[] {"-h", "-?", "--help" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ -				"argument.help.help"); //$NON-NLS-1$ +		super(new String[] {"-h", "-?", "--help" }, // // // +				"argument.help.help"); //  	} -	 +  	/* (non-Javadoc)  	 * @see at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang.String[], int, at.asit.pdfover.gui.workflow.StateMachine, at.asit.pdfover.gui.cliarguments.ArgumentHandler)  	 */ @@ -43,29 +43,29 @@ public class HelpArgument extends Argument {  			ArgumentHandler handler)  			throws InitializationException {  		Set<Argument> arguments = handler.getArguments(); -		 +  		Iterator<Argument> argumentIterator = arguments.iterator(); -		 -		System.out.println(Messages.getString("argument.info.help")); //$NON-NLS-1$ -		 + +		System.out.println(Messages.getString("argument.info.help")); // +  		while(argumentIterator.hasNext()) {  			Argument argument = argumentIterator.next();  			StringBuilder sb = new StringBuilder(); -			 +  			for(int i = 0; i < argument.getCommandOptions().length; i++) {  				sb.append(argument.getCommandOptions()[i]); -				 +  				if(i < argument.getCommandOptions().length -1) { -					sb.append(", "); //$NON-NLS-1$ +					sb.append(", "); //  				}  			} -			 -			System.out.println(sb.toString() + ":"); //$NON-NLS-1$ -			System.out.println("\t" + argument.getHelpText()); //$NON-NLS-1$ + +			System.out.println(sb.toString() + ":"); // +			System.out.println("\t" + argument.getHelpText()); //  		} -		 +  		handler.setRequireExit(true); -		 +  		return argOffset;  	} diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java index 756effb2..6b62fb83 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java @@ -33,7 +33,7 @@ public class InputDocumentArgument extends Argument {  	 * Constructor  	 */  	public InputDocumentArgument() { -		super(new String[] {"-i"}, "argument.help.input"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-i"}, "argument.help.input"); // //  	}  	/** @@ -53,25 +53,25 @@ public class InputDocumentArgument extends Argument {  			if (args.length > argOffset + 1) {  				String signatureDocument = args[argOffset + 1]; -				 +  				File signatureDocumentFile = new File(signatureDocument); -				 +  				if(!signatureDocumentFile.exists()) {  					throw new FileNotFoundException(signatureDocument);  				} -				 +  				getStatus().setDocument(signatureDocumentFile); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Document to sign argument invalid!", ex); //$NON-NLS-1$ +			log.error("Document to sign argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.input") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.input") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.input") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.input") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java index af819470..cf87865c 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java @@ -32,7 +32,7 @@ public class InvisibleProfile extends Argument {  	 * Constructor  	 */  	public InvisibleProfile() { -		super(new String[] {"-v"}, "argument.help.vis"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-v"}, "argument.help.vis"); // //  	}  	/** @@ -50,21 +50,21 @@ public class InvisibleProfile extends Argument {  			throws InitializationException {  		try {  			log.info("Set Profile Invisible"); -			 +  			if (args.length > argOffset + 1) {  				PdfAs4SignatureParameter.PROFILE_VISIBILITY=false;  				log.debug("We are setting the profile visibility to false"); -				return argOffset + 1;	 +				return argOffset + 1;  			} -			 +  		} catch (Exception ex) { -			log.error("Signature Profile Visibilty Error", ex); //$NON-NLS-1$ +			log.error("Signature Profile Visibilty Error", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.vis") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.vis") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.vis") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.vis") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java index 3874f4ef..558c3555 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java @@ -30,7 +30,7 @@ public class KeystoreAliasArgument extends Argument {  	 * Constructor  	 */  	public KeystoreAliasArgument() { -		super(new String[] {"-ksalias"}, "argument.help.keystorealias"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-ksalias"}, "argument.help.keystorealias"); // //  	}  	/** @@ -50,19 +50,19 @@ public class KeystoreAliasArgument extends Argument {  			if (args.length > argOffset + 1) {  				String ksAlias = args[argOffset + 1]; -				 +  				getConfiguration().setKeyStoreAliasOverlay(ksAlias); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Keystore alias argument invalid!", ex); //$NON-NLS-1$ +			log.error("Keystore alias argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java index 66ebe286..596bdafc 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java @@ -33,7 +33,7 @@ public class KeystoreFileArgument extends Argument {  	 * Constructor  	 */  	public KeystoreFileArgument() { -		super(new String[] {"-ks"}, "argument.help.keystorefile"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-ks"}, "argument.help.keystorefile"); // //  	}  	/** @@ -53,24 +53,24 @@ public class KeystoreFileArgument extends Argument {  			if (args.length > argOffset + 1) {  				String ksFile = args[argOffset + 1]; -				 +  				File ks = new File(ksFile);  				if(!ks.exists() || !ks.isFile())  					throw new KeystoreDoesntExistException(ks, 0); -				 +  				getConfiguration().setKeyStoreFileOverlay(ksFile);  				getConfiguration().setKeyStoreEnabledOverlay(true); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Keystore file argument invalid!", ex); //$NON-NLS-1$ +			log.error("Keystore file argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java index ca3fd5e8..55324a08 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java @@ -30,7 +30,7 @@ public class KeystoreKeyPassArgument extends Argument {  	 * Constructor  	 */  	public KeystoreKeyPassArgument() { -		super(new String[] {"-kskeypass"}, "argument.help.keystorekeypass"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-kskeypass"}, "argument.help.keystorekeypass"); // //  	}  	/** @@ -50,19 +50,19 @@ public class KeystoreKeyPassArgument extends Argument {  			if (args.length > argOffset + 1) {  				String ksKeyPass = args[argOffset + 1]; -				 +  				getConfiguration().setKeyStoreKeyPassOverlay(ksKeyPass); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Keystore key password argument invalid!", ex); //$NON-NLS-1$ +			log.error("Keystore key password argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java index f7b8e116..a9f2b3d8 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java @@ -30,7 +30,7 @@ public class KeystoreStorePassArgument extends Argument {  	 * Constructor  	 */  	public KeystoreStorePassArgument() { -		super(new String[] {"-kspass"}, "argument.help.keystorestorepass"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-kspass"}, "argument.help.keystorestorepass"); // //  	}  	/** @@ -50,19 +50,19 @@ public class KeystoreStorePassArgument extends Argument {  			if (args.length > argOffset + 1) {  				String ksStorePass = args[argOffset + 1]; -				 +  				getConfiguration().setKeyStoreStorePassOverlay(ksStorePass); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Keystore password argument invalid!", ex); //$NON-NLS-1$ +			log.error("Keystore password argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java index 47d1972b..b949cc40 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java @@ -30,7 +30,7 @@ public class KeystoreTypeArgument extends Argument {  	 * Constructor  	 */  	public KeystoreTypeArgument() { -		super(new String[] {"-kstype"}, "argument.help.keystoretype"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-kstype"}, "argument.help.keystoretype"); // //  	}  	/** @@ -50,19 +50,19 @@ public class KeystoreTypeArgument extends Argument {  			if (args.length > argOffset + 1) {  				String ksType = args[argOffset + 1]; -				 +  				getConfiguration().setKeyStoreTypeOverlay(ksType); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Keystore type argument invalid!", ex); //$NON-NLS-1$ +			log.error("Keystore type argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java index ad9c3520..2ac80cd1 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java @@ -30,7 +30,7 @@ public class OutputFolderArgument extends Argument {  	 * Constructor  	 */  	public OutputFolderArgument() { -		super(new String[] {"-o"}, "argument.help.output"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-o"}, "argument.help.output"); // //  	}  	/** @@ -55,7 +55,7 @@ public class OutputFolderArgument extends Argument {  //					throw new FileNotFoundException(outputFolder);  //				}  //				if(!outputFolderDir.isDirectory()) { -//					throw new IOException(outputFolderDir + Messages.getString("argument.error.output")); //$NON-NLS-1$ +//					throw new IOException(outputFolderDir + Messages.getString("argument.error.output")); //  //				}  				getConfiguration().setDefaultOutputFolderOverlay(outputFolder); @@ -63,13 +63,13 @@ public class OutputFolderArgument extends Argument {  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Output folder argument invalid!", ex); //$NON-NLS-1$ +			log.error("Output folder argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.output") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.output") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.output") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.output") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java index 60c4c3bc..6a464410 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java @@ -31,7 +31,7 @@ public class PasswordArgument extends Argument {  	 * Constructor  	 */  	public PasswordArgument() { -		super(new String[] {"-p"}, "argument.help.password"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-p"}, "argument.help.password"); // //  	}  	/** @@ -53,19 +53,19 @@ public class PasswordArgument extends Argument {  				String password = args[argOffset + 1];  				MobileBKUHelper.validatePassword(password); -				 +  				getConfiguration().setDefaultMobilePasswordOverlay(password); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Mobile BKU password argument invalid!", ex); //$NON-NLS-1$ +			log.error("Mobile BKU password argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.password") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.password") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.password") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.password") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java index 6f49e6ce..b0a10491 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java @@ -31,7 +31,7 @@ public class PhoneNumberArgument extends Argument {  	 * Constructor  	 */  	public PhoneNumberArgument() { -		super(new String[] {"-n" }, "argument.help.number"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-n" }, "argument.help.number"); // //  	} @@ -41,7 +41,7 @@ public class PhoneNumberArgument extends Argument {  	private static final Logger log = LoggerFactory  			.getLogger(PhoneNumberArgument.class); -	 +  	/* (non-Javadoc)  	 * @see at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang.String[], int, at.asit.pdfover.gui.workflow.StateMachine, at.asit.pdfover.gui.cliarguments.ArgumentHandler)  	 */ @@ -56,19 +56,19 @@ public class PhoneNumberArgument extends Argument {  				String number = args[argOffset + 1];  				number = MobileBKUHelper.normalizeMobileNumber(number); -				 +  				getConfiguration().setDefaultMobileNumberOverlay(number); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Phone Number Argument invalid!", ex); //$NON-NLS-1$ +			log.error("Phone Number Argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.number") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.number") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.number") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.number") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java index 924bacda..fae84543 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java @@ -30,7 +30,7 @@ public class ProxyHostArgument extends Argument {  	 * Constructor  	 */  	public ProxyHostArgument() { -		super(new String[] {"-proxy"}, "argument.help.proxyhost"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-proxy"}, "argument.help.proxyhost"); // //  	}  	/** @@ -50,19 +50,19 @@ public class ProxyHostArgument extends Argument {  			if (args.length > argOffset + 1) {  				String proxyHost = args[argOffset + 1]; -				 +  				getConfiguration().setProxyHostOverlay(proxyHost); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Proxy host argument invalid!", ex); //$NON-NLS-1$ +			log.error("Proxy host argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java index 3640b1d1..9456006f 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java @@ -30,7 +30,7 @@ public class ProxyPassArgument extends Argument {  	 * Constructor  	 */  	public ProxyPassArgument() { -		super(new String[] {"-proxypass"}, "argument.help.proxypass"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-proxypass"}, "argument.help.proxypass"); // //  	}  	/** @@ -50,19 +50,19 @@ public class ProxyPassArgument extends Argument {  			if (args.length > argOffset + 1) {  				String proxyPass = args[argOffset + 1]; -				 +  				getConfiguration().setProxyPassOverlay(proxyPass); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Proxy password argument invalid!", ex); //$NON-NLS-1$ +			log.error("Proxy password argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.proxypass") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.proxypass") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.proxypass") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.proxypass") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java index 808c1352..820b3ed5 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java @@ -31,7 +31,7 @@ public class ProxyPortArgument extends Argument {  	 * Constructor  	 */  	public ProxyPortArgument() { -		super(new String[] {"-proxyport"}, "argument.help.proxyport"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-proxyport"}, "argument.help.proxyport"); // //  	}  	/** @@ -51,25 +51,25 @@ public class ProxyPortArgument extends Argument {  			if (args.length > argOffset + 1) {  				String proxyPortString = args[argOffset + 1]; -				 +  				int port = Integer.parseInt(proxyPortString); -				 +  				if(port <= 0 || port > 0xFFFF) {  					throw new InvalidPortException(port);  				} -				 +  				getConfiguration().setProxyPortOverlay(port); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Proxy port argument invalid!", ex); //$NON-NLS-1$ +			log.error("Proxy port argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.proxyport") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.proxyport") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.proxyport") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.proxyport") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java index 8e636186..71592b35 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java @@ -30,7 +30,7 @@ public class ProxyUserArgument extends Argument {  	 * Constructor  	 */  	public ProxyUserArgument() { -		super(new String[] {"-proxyuser"}, "argument.help.proxyuser"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] {"-proxyuser"}, "argument.help.proxyuser"); // //  	}  	/** @@ -50,19 +50,19 @@ public class ProxyUserArgument extends Argument {  			if (args.length > argOffset + 1) {  				String proxyUser = args[argOffset + 1]; -				 +  				getConfiguration().setProxyUserOverlay(proxyUser); -				 +  				return argOffset + 1;  			}  		} catch (Exception ex) { -			log.error("Proxy username argument invalid!", ex); //$NON-NLS-1$ +			log.error("Proxy username argument invalid!", ex); //  			throw new InitializationException( -					Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), ex); //$NON-NLS-1$ +					Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), ex); //  		}  		throw new InitializationException( -				Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), null); //$NON-NLS-1$ +				Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), null); //  	}  } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java index 44e35f87..f49e784f 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java @@ -25,12 +25,12 @@ public class SkipFinishArgument extends Argument {  	 * Constructor  	 */  	public SkipFinishArgument() { -		super(new String[] { "-s" }, "argument.help.skipfinish"); //$NON-NLS-1$ //$NON-NLS-2$ +		super(new String[] { "-s" }, "argument.help.skipfinish"); // //  	}  	/*  	 * (non-Javadoc) -	 *  +	 *  	 * @see  	 * at.asit.pdfover.gui.cliarguments.CLIArgument#handleArgument(java.lang  	 * .String[], int, at.asit.pdfover.gui.workflow.StateMachine, | 
