summaryrefslogtreecommitdiff
path: root/pdf-over-commons
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-commons')
-rw-r--r--pdf-over-commons/pom.xml2
-rw-r--r--pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java158
-rw-r--r--pdf-over-commons/src/main/java/at/asit/pdfover/commons/Messages.java24
-rw-r--r--pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java6
4 files changed, 95 insertions, 95 deletions
diff --git a/pdf-over-commons/pom.xml b/pdf-over-commons/pom.xml
index 5ec90b15..c198773f 100644
--- a/pdf-over-commons/pom.xml
+++ b/pdf-over-commons/pom.xml
@@ -6,7 +6,7 @@
<version>4.4.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
-
+
<artifactId>pdf-over-commons</artifactId>
<version>4.4.2-SNAPSHOT</version>
<dependencies>
diff --git a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java
index 2ee13a55..47048348 100644
--- a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java
+++ b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java
@@ -34,7 +34,7 @@ public class Constants {
static private final Logger log = LoggerFactory.getLogger(Constants.class);
/** Application name */
- public static final String APP_NAME = "PDF-Over"; //$NON-NLS-1$
+ public static final String APP_NAME = "PDF-Over"; //
/** Application version */
public static final String APP_VERSION;
@@ -52,61 +52,61 @@ public class Constants {
}
/** Application name + version */
- public static final String APP_NAME_VERSION = (APP_VERSION == null ? APP_NAME : APP_NAME + " v" + APP_VERSION); //$NON-NLS-1$
-
- public static final String SIGNATURE_PROFILE = "SIGNATURE_PROFILE"; //$NON-NLS-1$
+ public static final String APP_NAME_VERSION = (APP_VERSION == null ? APP_NAME : APP_NAME + " v" + APP_VERSION); //
+
+ public static final String SIGNATURE_PROFILE = "SIGNATURE_PROFILE"; //
public static final String DEFAULT_POSTFIX = "_signed";
static {
// Has to be set before (implicitly) initializing Display
Display.setAppName(APP_NAME);
}
-
+
/**
- *
+ *
*/
- public static final String SIGNATURE_FIELD_NAME_CONF = "signature_field_name"; //$NON-NLS-1$
+ public static final String SIGNATURE_FIELD_NAME_CONF = "signature_field_name"; //
/** Current display - used for Colors */
private static Display display = Display.getCurrent();
/** Supported locales */
public static final Locale[] SUPPORTED_LOCALES = { Locale.GERMAN, Locale.ENGLISH };
-
+
/** Configuration directory */
- public static final String CONFIG_DIRECTORY = System.getProperty("user.home") + File.separator + ".pdf-over"; //$NON-NLS-1$ //$NON-NLS-2$
+ public static final String CONFIG_DIRECTORY = System.getProperty("user.home") + File.separator + ".pdf-over"; // //
/** The default configuration file name */
- public static final String DEFAULT_CONFIG_FILENAME = "PDF-Over.config"; //$NON-NLS-1$
+ public static final String DEFAULT_CONFIG_FILENAME = "PDF-Over.config"; //
/** The configuration version file name */
- public static final String CONFIG_VERSION_FILENAME = ".version"; //$NON-NLS-1$
+ public static final String CONFIG_VERSION_FILENAME = ".version"; //
/** The signature placeholder cache file name */
- public static final String PLACEHOLDER_CACHE_FILENAME = ".placeholder"; //$NON-NLS-1$
+ public static final String PLACEHOLDER_CACHE_FILENAME = ".placeholder"; //
/** The signature placeholder cache properties file name */
- public static final String PLACEHOLDER_CACHE_PROPS_FILENAME = ".placeholder.properties"; //$NON-NLS-1$
+ public static final String PLACEHOLDER_CACHE_PROPS_FILENAME = ".placeholder.properties"; //
/**
* The minimum PDF-AS configuration version (older ones will be backed up
* and updated
*/
- public static final String MIN_PDF_AS_CONFIG_VERSION = "4.2.1-snapshot"; //$NON-NLS-1$
+ public static final String MIN_PDF_AS_CONFIG_VERSION = "4.2.1-snapshot"; //
/** The configuration backup filename */
- public static final String PDF_AS_CONFIG_BACKUP_FILENAME = "cfg_backup"; //$NON-NLS-1$
+ public static final String PDF_AS_CONFIG_BACKUP_FILENAME = "cfg_backup"; //
/** File suffix for the signed document */
- public final static String SIGNED_SUFFIX = "_signed"; //$NON-NLS-1$
+ public final static String SIGNED_SUFFIX = "_signed"; //
/** Local BKU URL */
- public static final String LOCAL_BKU_URL = "http://127.0.0.1:3495/http-security-layer-request"; //$NON-NLS-1$
+ public static final String LOCAL_BKU_URL = "http://127.0.0.1:3495/http-security-layer-request"; //
/** Default Mobile BKU URL */
//public static final String DEFAULT_MOBILE_BKU_URL = "https://test1.a-trust.at/mobile/https-security-layer-request/default.aspx";
- //public static final String DEFAULT_MOBILE_BKU_URL = "https://hs-abnahme.a-trust.at/mobile/https-security-layer-request/default.aspx"; //$NON-NLS-1$
- public static final String DEFAULT_MOBILE_BKU_URL = "https://www.a-trust.at/mobile/https-security-layer-request/default.aspx"; //$NON-NLS-1$
+ //public static final String DEFAULT_MOBILE_BKU_URL = "https://hs-abnahme.a-trust.at/mobile/https-security-layer-request/default.aspx"; //
+ public static final String DEFAULT_MOBILE_BKU_URL = "https://www.a-trust.at/mobile/https-security-layer-request/default.aspx"; //
/** Default signature placeholder transparency */
public static final int DEFAULT_SIGNATURE_PLACEHOLDER_TRANSPARENCY = 170;
@@ -115,24 +115,24 @@ public class Constants {
public static final int SIGNATURE_KEYBOARD_POSITIONING_OFFSET = 15;
/** PDF-Over User Agent string */
- public static final String USER_AGENT_STRING = "PDF-Over " + (APP_VERSION == null ? "4.3" : APP_VERSION); //$NON-NLS-1$ //$NON-NLS-2$
+ public static final String USER_AGENT_STRING = "PDF-Over " + (APP_VERSION == null ? "4.3" : APP_VERSION); // //
/** Current release file */
- public static final String CURRENT_RELEASE_URL = "https://updates.a-sit.at/pdf-over/Release.txt"; //$NON-NLS-1$
+ public static final String CURRENT_RELEASE_URL = "https://updates.a-sit.at/pdf-over/Release.txt"; //
/** Update URL */
- public static final String UPDATE_URL = "https://technology.a-sit.at/en/pdf-over/"; //$NON-NLS-1$
+ public static final String UPDATE_URL = "https://technology.a-sit.at/en/pdf-over/"; //
/** True */
- public static final String TRUE = "true"; //$NON-NLS-1$
+ public static final String TRUE = "true"; //
/** False */
- public static final String FALSE = "false"; //$NON-NLS-1$
+ public static final String FALSE = "false"; //
/* Configuration parameters */
/** The bku config parameter */
- public static final String CFG_BKU = "BKU"; //$NON-NLS-1$
+ public static final String CFG_BKU = "BKU"; //
/**
* The value for the Signature position in the configuration file values for
@@ -142,93 +142,93 @@ public class Constants {
*
* vx:= float value vy:= float value vp:= integer value
*/
- public static final String CFG_SIGNATURE_POSITION = "SIGNATURE_POSITION"; //$NON-NLS-1$
+ public static final String CFG_SIGNATURE_POSITION = "SIGNATURE_POSITION"; //
/** The use marker parameter (true/false) */
- public static final String CFG_USE_MARKER = "USE_MARKER"; //$NON-NLS-1$
-
+ public static final String CFG_USE_MARKER = "USE_MARKER"; //
+
/** The use of signature fields instead of QR codes */
- public static final String CFG_USE_SIGNATURE_FIELDS = "USE_FIELDS"; //$NON-NLS-1$
-
+ public static final String CFG_USE_SIGNATURE_FIELDS = "USE_FIELDS"; //
+
/** */
- public static final String CFG_ENABLE_PLACEHOLDER = "USE_PLACEHOLDER_SEARCH"; //$NON-NLS-1$
+ public static final String CFG_ENABLE_PLACEHOLDER = "USE_PLACEHOLDER_SEARCH"; //
/** The signature placeholder transparency config parameter (0-255) */
- public static final String CFG_SIGNATURE_PLACEHOLDER_TRANSPARENCY = "SIGNATURE_PLACEHOLDER_TRANSPARENCY"; //$NON-NLS-1$
+ public static final String CFG_SIGNATURE_PLACEHOLDER_TRANSPARENCY = "SIGNATURE_PLACEHOLDER_TRANSPARENCY"; //
/** The mobile number config parameter */
- public static final String CFG_MOBILE_NUMBER = "MOBILE_NUMBER"; //$NON-NLS-1$
+ public static final String CFG_MOBILE_NUMBER = "MOBILE_NUMBER"; //
/** The signature note config parameter */
- public static final String CFG_SIGNATURE_NOTE = "SIGNATURE_NOTE"; //$NON-NLS-1$
+ public static final String CFG_SIGNATURE_NOTE = "SIGNATURE_NOTE"; //
/** The signature locale config parameter */
- public static final String CFG_SIGNATURE_LOCALE = "SIGNLOCALE"; //$NON-NLS-1$
+ public static final String CFG_SIGNATURE_LOCALE = "SIGNLOCALE"; //
/** The PDF/A-compatibility config parameter */
- public static final String CFG_SIGNATURE_PDFA_COMPAT = "SIGNATURE_PDFA_COMPAT"; //$NON-NLS-1$
+ public static final String CFG_SIGNATURE_PDFA_COMPAT = "SIGNATURE_PDFA_COMPAT"; //
/** Mobile bku url config parameter */
- public static final String CFG_MOBILE_BKU_URL = "MOBILE_BKU_URL"; //$NON-NLS-1$
+ public static final String CFG_MOBILE_BKU_URL = "MOBILE_BKU_URL"; //
/** Mobile bku type config parameter */
- public static final String CFG_MOBILE_BKU_TYPE = "MOBILE_BKU_TYPE"; //$NON-NLS-1$
+ public static final String CFG_MOBILE_BKU_TYPE = "MOBILE_BKU_TYPE"; //
/** Mobile bku BASE64 config parameter */
- public static final String CFG_MOBILE_BKU_BASE64 = "MOBILE_BKU_BASE64"; //$NON-NLS-1$
+ public static final String CFG_MOBILE_BKU_BASE64 = "MOBILE_BKU_BASE64"; //
/** KeyStore enabled config parameter */
- public static final String CFG_KEYSTORE_ENABLED = "KEYSTORE_ENABLED"; //$NON-NLS-1$
+ public static final String CFG_KEYSTORE_ENABLED = "KEYSTORE_ENABLED"; //
/** KeyStore file config parameter */
- public static final String CFG_KEYSTORE_FILE = "KEYSTORE_FILE"; //$NON-NLS-1$
+ public static final String CFG_KEYSTORE_FILE = "KEYSTORE_FILE"; //
/** KeyStore type config parameter */
- public static final String CFG_KEYSTORE_TYPE = "KEYSTORE_TYPE"; //$NON-NLS-1$
+ public static final String CFG_KEYSTORE_TYPE = "KEYSTORE_TYPE"; //
/** KeyStore alias config parameter */
- public static final String CFG_KEYSTORE_ALIAS = "KEYSTORE_ALIAS"; //$NON-NLS-1$
+ public static final String CFG_KEYSTORE_ALIAS = "KEYSTORE_ALIAS"; //
/** KeyStore store password config parameter */
- public static final String CFG_KEYSTORE_STOREPASS = "KEYSTORE_STOREPASS"; //$NON-NLS-1$
+ public static final String CFG_KEYSTORE_STOREPASS = "KEYSTORE_STOREPASS"; //
/** KeyStore key password config parameter */
- public static final String CFG_KEYSTORE_KEYPASS = "KEYSTORE_KEYPASS"; //$NON-NLS-1$
+ public static final String CFG_KEYSTORE_KEYPASS = "KEYSTORE_KEYPASS"; //
/** The emblem config parameter */
- public static final String CFG_EMBLEM = "EMBLEM"; //$NON-NLS-1$
+ public static final String CFG_EMBLEM = "EMBLEM"; //
/** The locale config parameter */
- public static final String CFG_LOCALE = "LOCALE"; //$NON-NLS-1$
+ public static final String CFG_LOCALE = "LOCALE"; //
/** The update check config parameter */
- public static final String CFG_UPDATE_CHECK = "UPDATE_CHECK"; //$NON-NLS-1$
+ public static final String CFG_UPDATE_CHECK = "UPDATE_CHECK"; //
/** The proxy host config parameter */
- public static final String CFG_PROXY_HOST = "PROXY_HOST"; //$NON-NLS-1$
+ public static final String CFG_PROXY_HOST = "PROXY_HOST"; //
/** The proxy port config parameter */
- public static final String CFG_PROXY_PORT = "PROXY_PORT"; //$NON-NLS-1$
+ public static final String CFG_PROXY_PORT = "PROXY_PORT"; //
/** The proxy username config parameter */
- public static final String CFG_PROXY_USER = "PROXY_USER"; //$NON-NLS-1$
+ public static final String CFG_PROXY_USER = "PROXY_USER"; //
/** The proxy password config parameter */
- public static final String CFG_PROXY_PASS = "PROXY_PASS"; //$NON-NLS-1$
+ public static final String CFG_PROXY_PASS = "PROXY_PASS"; //
/** The output folder config parameter */
- public static final String CFG_OUTPUT_FOLDER = "OUTPUT_FOLDER"; //$NON-NLS-1$
+ public static final String CFG_OUTPUT_FOLDER = "OUTPUT_FOLDER"; //
public static final String CFG_POSTFIX = "SAVE_FILE_POSTFIX";
/** The main window size (Format: width,height) */
- public static final String CFG_MAINWINDOW_SIZE = "MAINWINDOW_SIZE"; //$NON-NLS-1$
+ public static final String CFG_MAINWINDOW_SIZE = "MAINWINDOW_SIZE"; //
/** The theme */
- public static final String CFG_THEME = "THEME"; //$NON-NLS-1$
-
+ public static final String CFG_THEME = "THEME"; //
+
/** Download URL for accepted Certificates*/
- public static final String CFG_DOWNLOAD_URL="DOWNLOAD_URL"; //$NON-NLS-1$
+ public static final String CFG_DOWNLOAD_URL="DOWNLOAD_URL"; //
/* Theme constants */
@@ -329,7 +329,7 @@ public class Constants {
/* Resources */
/** Shell icon resource */
- public static final String RES_ICON = "/icons/icon.png"; //$NON-NLS-1$
+ public static final String RES_ICON = "/icons/icon.png"; //
/** Config image resource */
public static final String RES_IMG_CONFIG = getResImgConfig();
@@ -338,44 +338,44 @@ public class Constants {
switch (THEME) {
default:
case DEFAULT:
- return "/img/config.png"; //$NON-NLS-1$
+ return "/img/config.png"; //
case GEMPLUSH:
- return "/img/config_p.png"; //$NON-NLS-1$
+ return "/img/config_p.png"; //
}
}
/** Config inactive image resource */
- public static final String RES_IMG_CONFIG_DISABLED = "/img/config_disabled.png"; //$NON-NLS-1$
+ public static final String RES_IMG_CONFIG_DISABLED = "/img/config_disabled.png"; //
/** Error image resource */
- public static final String RES_IMG_ERROR = "/img/error.png"; //$NON-NLS-1$
+ public static final String RES_IMG_ERROR = "/img/error.png"; //
/** Card image resource */
- public static final String RES_IMG_CARD = "/img/karte.png"; //$NON-NLS-1$
+ public static final String RES_IMG_CARD = "/img/karte.png"; //
/** Mobile phone image resource */
- public static final String RES_IMG_MOBILE = "/img/handy.png"; //$NON-NLS-1$
+ public static final String RES_IMG_MOBILE = "/img/handy.png"; //
/** Package resource path */
- public static String RES_PKG_PATH = "/at/asit/pdfover/gui/"; //$NON-NLS-1$
+ public static String RES_PKG_PATH = "/at/asit/pdfover/gui/"; //
/** Zipped configuration resource */
- public static final String RES_CFG_ZIP = "/cfg/PDFASConfig.zip"; //$NON-NLS-1$
+ public static final String RES_CFG_ZIP = "/cfg/PDFASConfig.zip"; //
/** Accepted certificate resource path */
- public static final String RES_CERT_PATH = "/certificates/"; //$NON-NLS-1$
+ public static final String RES_CERT_PATH = "/certificates/"; //
/** Accepted certificate list resource */
- public static final String RES_CERT_LIST = RES_CERT_PATH + "certificates.xml"; //$NON-NLS-1$
-
- public static final String LABEL_TAN = "input_tan"; //$NON-NLS-1$
-
- public static final String LABEL_SIGN_BTN = "SignButton"; //$NON-NLS-1$
-
- public static final String LABEL_PHONE_NUMBER = "handynummer"; //$NON-NLS-1$
-
- public static final String LABEL_SIGN_PASS = "signaturpasswort"; //$NON-NLS-1$
-
- public static final String LABEL_BTN_IDF = "Button_Identification"; //$NON-NLS-1$
-
+ public static final String RES_CERT_LIST = RES_CERT_PATH + "certificates.xml"; //
+
+ public static final String LABEL_TAN = "input_tan"; //
+
+ public static final String LABEL_SIGN_BTN = "SignButton"; //
+
+ public static final String LABEL_PHONE_NUMBER = "handynummer"; //
+
+ public static final String LABEL_SIGN_PASS = "signaturpasswort"; //
+
+ public static final String LABEL_BTN_IDF = "Button_Identification"; //
+
}
diff --git a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Messages.java b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Messages.java
index 36cc921d..0d2f2295 100644
--- a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Messages.java
+++ b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Messages.java
@@ -30,18 +30,18 @@ import org.slf4j.LoggerFactory;
* Localizes string messages for PDFOver GUI
*/
public class Messages {
-
+
/**
* SLF4J Logger instance
**/
static final Logger log = LoggerFactory.getLogger(Messages.class);
-
- private static final String BUNDLE_NAME = "at.asit.pdfover.gui.messages"; //$NON-NLS-1$
+
+ private static final String BUNDLE_NAME = "at.asit.pdfover.gui.messages"; //
private static HashMap<Locale, ResourceBundle> bundles = new HashMap<>();
private static Locale currentLocale = getDefaultLocale();
-
+
private Messages() {
}
@@ -65,20 +65,20 @@ public class Messages {
public static void setLocale(Locale locale) {
currentLocale = locale;
}
-
+
private static ResourceBundle getBundle(Locale locale) {
if(!bundles.containsKey(locale)) {
- log.debug("Loading resource bundle for {}", locale); //$NON-NLS-1$
+ log.debug("Loading resource bundle for {}", locale); //
ResourceBundle tmp = null;
try {
tmp = ResourceBundle.getBundle(BUNDLE_NAME, locale);
- log.debug("Received bundle for {}", tmp.getLocale()); //$NON-NLS-1$
+ log.debug("Received bundle for {}", tmp.getLocale()); //
} catch(Exception e) {
- log.error("NO RESOURCE BUNDLE FOR {} {}", locale, e); //$NON-NLS-1$
+ log.error("NO RESOURCE BUNDLE FOR {} {}", locale, e); //
tmp = ResourceBundle.getBundle(BUNDLE_NAME);
}
if(tmp == null) {
- log.error("NO RESOURCE BUNDLE FOR {}", locale); //$NON-NLS-1$
+ log.error("NO RESOURCE BUNDLE FOR {}", locale); //
tmp = ResourceBundle.getBundle(BUNDLE_NAME);
}
bundles.put(locale, tmp);
@@ -86,7 +86,7 @@ public class Messages {
}
return bundles.get(locale);
}
-
+
/**
* Gets the localized message
* @param key
@@ -95,7 +95,7 @@ public class Messages {
public static String getString(String key) {
return getString(key, currentLocale);
}
-
+
/**
* Gets the localized message
* @param key the key
@@ -105,7 +105,7 @@ public class Messages {
public static String getString(String key, Locale locale) {
try {
String value = getBundle(locale).getString(key);
-
+
/* DIRTY HACK: this recognizes java 8 ("1.8") and older; these versions read .properties files as ISO-8859-1 instead of UTF-8 */
if (System.getProperty("java.version").startsWith("1."))
try { value = new String(value.getBytes("ISO-8859-1"), "UTF-8"); } catch (UnsupportedEncodingException e) {}
diff --git a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java
index dc6d0960..b08aa0ea 100644
--- a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java
+++ b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java
@@ -4,9 +4,9 @@ import java.util.Locale;
public enum Profile {
- SIGNATURBLOCK_SMALL, //$NON-NLS-1$
- AMTSSIGNATURBLOCK, //$NON-NLS-1$
- BASE_LOGO, //$NON-NLS-1$
+ SIGNATURBLOCK_SMALL, //
+ AMTSSIGNATURBLOCK, //
+ BASE_LOGO, //
INVISIBLE;
public static int length = Profile.values().length;