summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java48
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java2
2 files changed, 50 insertions, 0 deletions
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
new file mode 100644
index 00000000..3c6b9f3e
--- /dev/null
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://joinup.ec.europa.eu/software/page/eupl
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ */
+package at.asit.pdfover.gui.cliarguments;
+
+import at.asit.pdfover.gui.exceptions.InitializationException;
+import at.asit.pdfover.signator.SignaturePosition;
+
+/**
+ * CLI Argument to set the BKU to use
+ */
+public class AutomaticPositioningArgument extends Argument {
+ /**
+ * Constructor
+ */
+ public AutomaticPositioningArgument() {
+ super(new String[] { "-a" }, "argument.help.autopos"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /*
+ * (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)
+ */
+ @Override
+ public int handleArgument(String[] args, int argOffset,
+ ArgumentHandler handler)
+ throws InitializationException {
+ getConfiguration().setDefaultSignaturePositionOverlay(new SignaturePosition());
+ return argOffset;
+ }
+
+}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
index bf0694d4..d0f1f014 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
@@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.Constants;
import at.asit.pdfover.gui.cliarguments.ArgumentHandler;
+import at.asit.pdfover.gui.cliarguments.AutomaticPositioningArgument;
import at.asit.pdfover.gui.cliarguments.BKUArgument;
import at.asit.pdfover.gui.cliarguments.ConfigFileArgument;
import at.asit.pdfover.gui.cliarguments.EmblemArgument;
@@ -71,6 +72,7 @@ public class PrepareConfigurationState extends State {
super(stateMachine);
this.handler = new ArgumentHandler(this.stateMachine);
this.handler.addCLIArgument(HelpArgument.class);
+ this.handler.addCLIArgument(AutomaticPositioningArgument.class);
this.handler.addCLIArgument(BKUArgument.class);
this.handler.addCLIArgument(PhoneNumberArgument.class);
this.handler.addCLIArgument(EmblemArgument.class);