summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java108
1 files changed, 54 insertions, 54 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
index afcca6ac..2400ac7e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
@@ -62,7 +62,7 @@ import at.asit.pdfover.gui.workflow.states.State;
import iaik.security.provider.IAIK;
/**
- *
+ *
*/
public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
@@ -174,12 +174,12 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
FileDialog dialog = new FileDialog(
KeystoreConfigurationComposite.this.getShell(), SWT.OPEN);
dialog.setFilterExtensions(new String[] {
- "*.p12;*.pkcs12;*.pfx;*.ks;*.jks", "*.p12;*.pkcs12;*.pfx;", "*.ks;*.jks*.", "*" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "*.p12;*.pkcs12;*.pfx;*.ks;*.jks", "*.p12;*.pkcs12;*.pfx;", "*.ks;*.jks*.", "*" }); // // // //
dialog.setFilterNames(new String[] {
- Messages.getString("common.KeystoreExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.PKCS12Extension_Description"), //$NON-NLS-1$
- Messages.getString("common.KSExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.AllExtension_Description") }); //$NON-NLS-1$
+ Messages.getString("common.KeystoreExtension_Description"), //
+ Messages.getString("common.PKCS12Extension_Description"), //
+ Messages.getString("common.KSExtension_Description"), //
+ Messages.getString("common.AllExtension_Description") }); //
String fileName = dialog.open();
File file = null;
if (fileName != null) {
@@ -217,24 +217,24 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
try {
loadKeystore();
} catch (KeyStoreException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
} catch (FileNotFoundException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
showErrorDialog(String.format(Messages.getString(
- "error.KeyStoreFileNotExist"), f.getName())); //$NON-NLS-1$
+ "error.KeyStoreFileNotExist"), f.getName())); //
} catch (NoSuchAlgorithmException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
} catch (CertificateException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
} catch (IOException ex) {
- log.error("Error loading keystore", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
} catch (NullPointerException ex) {
- log.error("Error loading keystore - NPE?", ex); //$NON-NLS-1$
- showErrorDialog(Messages.getString("error.KeyStore")); //$NON-NLS-1$
+ log.error("Error loading keystore - NPE?", ex); //
+ showErrorDialog(Messages.getString("error.KeyStore")); //
}
}
});
@@ -278,7 +278,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
}
void loadKeystore() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {
- ConfigurationContainer config =
+ ConfigurationContainer config =
KeystoreConfigurationComposite.this.configurationContainer;
File f = new File(config.getKeyStoreFile());
this.ks = KeyStore.getInstance(config.getKeyStoreType());
@@ -292,37 +292,37 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
private void initKeystoreTypes() {
this.keystoreTypes = new HashMap<String, String>();
- this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_PKCS12"), "PKCS12"); //$NON-NLS-1$ //$NON-NLS-2$
- this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_JKS"), "JCEKS"); //$NON-NLS-1$ //$NON-NLS-2$
+ this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_PKCS12"), "PKCS12"); // //
+ this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_JKS"), "JCEKS"); // //
}
/**
- * @param fileName
+ * @param fileName
*/
protected void performKeystoreFileChanged(String fileName) {
- log.debug("Selected keystore file: " + fileName); //$NON-NLS-1$
+ log.debug("Selected keystore file: " + fileName); //
this.configurationContainer.setKeyStoreFile(fileName);
KeystoreConfigurationComposite.this.txtKeystoreFile.setText(fileName);
int i = fileName.lastIndexOf('.');
if (i > 0) {
String ext = fileName.substring(i+1);
if (
- ext.equalsIgnoreCase("p12") || //$NON-NLS-1$
- ext.equalsIgnoreCase("pkcs12") || //$NON-NLS-1$
- ext.equalsIgnoreCase("pfx")) //$NON-NLS-1$
- performKeystoreTypeChanged("PKCS12"); //$NON-NLS-1$
+ ext.equalsIgnoreCase("p12") || //
+ ext.equalsIgnoreCase("pkcs12") || //
+ ext.equalsIgnoreCase("pfx")) //
+ performKeystoreTypeChanged("PKCS12"); //
else if (
- ext.equalsIgnoreCase("ks") || //$NON-NLS-1$
- ext.equalsIgnoreCase("jks")) //$NON-NLS-1$
- performKeystoreTypeChanged("JCEKS"); //$NON-NLS-1$
+ ext.equalsIgnoreCase("ks") || //
+ ext.equalsIgnoreCase("jks")) //
+ performKeystoreTypeChanged("JCEKS"); //
}
}
/**
- * @param type
+ * @param type
*/
protected void performKeystoreTypeChanged(String type) {
- log.debug("Selected keystore type: " + type); //$NON-NLS-1$
+ log.debug("Selected keystore type: " + type); //
this.configurationContainer.setKeyStoreType(type);
for (int i = 0; i < this.cmbKeystoreType.getItemCount(); ++i) {
if (this.keystoreTypes.get(this.cmbKeystoreType.getItem(i)).equals(type)) {
@@ -333,10 +333,10 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
}
/**
- * @param storepass
+ * @param storepass
*/
protected void performKeystoreStorePassChanged(String storepass) {
- log.debug("Changed keystore store password"); //$NON-NLS-1$
+ log.debug("Changed keystore store password"); //
this.configurationContainer.setKeyStoreStorePass(storepass);
this.txtKeystoreStorePass.setText(storepass);
}
@@ -345,23 +345,23 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
* @param alias
*/
protected void performKeystoreAliasChanged(String alias) {
- log.debug("Selected keystore alias: " + alias); //$NON-NLS-1$
+ log.debug("Selected keystore alias: " + alias); //
this.configurationContainer.setKeyStoreAlias(alias);
this.cmbKeystoreAlias.setText(alias);
}
/**
- * @param keypass
+ * @param keypass
*/
protected void performKeystoreKeyPassChanged(String keypass) {
- log.debug("Changed keystore key password"); //$NON-NLS-1$
+ log.debug("Changed keystore key password"); //
this.configurationContainer.setKeyStoreKeyPass(keypass);
this.txtKeystoreKeyPass.setText(keypass);
}
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#signerChanged()
*/
@@ -372,7 +372,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -412,7 +412,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
if (ksf.exists())
loadKeystore();
} catch (Exception e) {
- log.error("Error loading keystore", e); //$NON-NLS-1$
+ log.error("Error loading keystore", e); //
}
performKeystoreAliasChanged(config.getKeyStoreAlias());
performKeystoreKeyPassChanged(config.getKeyStoreKeyPass());
@@ -434,7 +434,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see
* at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings
* ()
@@ -478,24 +478,24 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
/*
* (non-Javadoc)
- *
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
*/
@Override
public void reloadResources() {
- this.grpKeystore.setText(Messages.getString("keystore_config.Keystore_Title")); //$NON-NLS-1$
- this.lblKeystoreFile.setText(Messages.getString("keystore_config.KeystoreFile")); //$NON-NLS-1$
- this.btnBrowse.setText(Messages.getString("common.browse")); //$NON-NLS-1$
- this.txtKeystoreFile.setToolTipText(Messages.getString("keystore_config.KeystoreFile_ToolTip")); //$NON-NLS-1$
- this.lblKeystoreType.setText(Messages.getString("keystore_config.KeystoreType")); //$NON-NLS-1$
+ this.grpKeystore.setText(Messages.getString("keystore_config.Keystore_Title")); //
+ this.lblKeystoreFile.setText(Messages.getString("keystore_config.KeystoreFile")); //
+ this.btnBrowse.setText(Messages.getString("common.browse")); //
+ this.txtKeystoreFile.setToolTipText(Messages.getString("keystore_config.KeystoreFile_ToolTip")); //
+ this.lblKeystoreType.setText(Messages.getString("keystore_config.KeystoreType")); //
initKeystoreTypes();
this.cmbKeystoreType.setItems(this.keystoreTypes.keySet().toArray(new String[0]));
- this.lblKeystoreStorePass.setText(Messages.getString("keystore_config.KeystoreStorePass")); //$NON-NLS-1$
- this.txtKeystoreStorePass.setToolTipText(Messages.getString("keystore_config.KeystoreStorePass_ToolTip")); //$NON-NLS-1$
- this.btnLoad.setText(Messages.getString("keystore_config.Load")); //$NON-NLS-1$
- this.btnLoad.setToolTipText(Messages.getString("keystore_config.Load_ToolTip")); //$NON-NLS-1$
- this.lblKeystoreAlias.setText(Messages.getString("keystore_config.KeystoreAlias")); //$NON-NLS-1$
- this.lblKeystoreKeyPass.setText(Messages.getString("keystore_config.KeystoreKeyPass")); //$NON-NLS-1$
- this.txtKeystoreKeyPass.setToolTipText(Messages.getString("keystore_config.KeystoreKeyPass_ToolTip")); //$NON-NLS-1$
+ this.lblKeystoreStorePass.setText(Messages.getString("keystore_config.KeystoreStorePass")); //
+ this.txtKeystoreStorePass.setToolTipText(Messages.getString("keystore_config.KeystoreStorePass_ToolTip")); //
+ this.btnLoad.setText(Messages.getString("keystore_config.Load")); //
+ this.btnLoad.setToolTipText(Messages.getString("keystore_config.Load_ToolTip")); //
+ this.lblKeystoreAlias.setText(Messages.getString("keystore_config.KeystoreAlias")); //
+ this.lblKeystoreKeyPass.setText(Messages.getString("keystore_config.KeystoreKeyPass")); //
+ this.txtKeystoreKeyPass.setToolTipText(Messages.getString("keystore_config.KeystoreKeyPass_ToolTip")); //
}
}