aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/framework/SignatorFactory.java
diff options
context:
space:
mode:
authorknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-05-12 17:37:16 +0000
committerknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-05-12 17:37:16 +0000
commit8e3ed85168edaeadcd4f3ec92450036a399d6ede (patch)
tree4fd938ebad8a042dd270ede88f7412909bfc3a4f /src/main/java/at/knowcenter/wag/egov/egiz/framework/SignatorFactory.java
parent064682ea2ccb0bbb7497d52790b282b179d98ae0 (diff)
downloadpdf-as-3-8e3ed85168edaeadcd4f3ec92450036a399d6ede.tar.gz
pdf-as-3-8e3ed85168edaeadcd4f3ec92450036a399d6ede.tar.bz2
pdf-as-3-8e3ed85168edaeadcd4f3ec92450036a399d6ede.zip
Detached Multipart BKU for Auftrag "Support"
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@73 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/framework/SignatorFactory.java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/SignatorFactory.java45
1 files changed, 30 insertions, 15 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/SignatorFactory.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/SignatorFactory.java
index a9bc144..c26055f 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/framework/SignatorFactory.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/SignatorFactory.java
@@ -20,9 +20,11 @@ package at.knowcenter.wag.egov.egiz.framework;
import at.knowcenter.wag.egov.egiz.PdfASID;
import at.knowcenter.wag.egov.egiz.exceptions.SignatorFactoryException;
import at.knowcenter.wag.egov.egiz.framework.signators.BinarySignator_1_0_0;
+import at.knowcenter.wag.egov.egiz.framework.signators.BinarySignator_1_1_0;
import at.knowcenter.wag.egov.egiz.framework.signators.DetachedSignator_1_0_0;
import at.knowcenter.wag.egov.egiz.framework.signators.DetachedfTextualSignator_1_0_0;
import at.knowcenter.wag.egov.egiz.framework.signators.TextualSignator_1_0_0;
+import at.knowcenter.wag.egov.egiz.framework.signators.TextualSignator_1_1_0;
/**
* This factory creates instances of Signator classes corresponding to the given
@@ -35,42 +37,47 @@ public abstract class SignatorFactory
/**
* The Vendor.
*/
- public static final String VENDOR = "bka.gv.at";
+ public static final String VENDOR = "bka.gv.at"; //$NON-NLS-1$
/**
* The binary Signator algorithm.
*/
- public static final String TYPE_BINARY = "binaer";
+ public static final String TYPE_BINARY = "binaer"; //$NON-NLS-1$
/**
* The textual Signator algorithm.
*/
- public static final String TYPE_TEXTUAL = "text";
+ public static final String TYPE_TEXTUAL = "text"; //$NON-NLS-1$
/**
* This signator is only for testing the framework.
*/
- public static final String TYPE_TEST = "testalgo";
+ public static final String TYPE_TEST = "testalgo"; //$NON-NLS-1$
/**
* This signator is only for testing the framework.
*/
- public static final String TYPE_DETACHED_TEXTUAL = "detachedtext";
+ public static final String TYPE_DETACHED_TEXTUAL = "detachedtext"; //$NON-NLS-1$
/**
* This application's current algorithm versions.
*/
- public static final String VERSION_1_0_0 = "v1.0.0";
+ public static final String VERSION_1_0_0 = "v1.0.0"; //$NON-NLS-1$
+
+ /**
+ * This application's current algorithm versions.
+ */
+ public static final String VERSION_1_1_0 = "v1.1.0"; //$NON-NLS-1$
/**
* The most recent binary algorithm this application provides.
*/
- public static final PdfASID MOST_RECENT_BINARY_SIGNATOR_ID = BinarySignator_1_0_0.MY_ID;
+ public static final PdfASID MOST_RECENT_BINARY_SIGNATOR_ID = BinarySignator_1_1_0.MY_ID;
/**
* The most recent textual algorithm this application provides.
*/
- public static final PdfASID MOST_RECENT_TEXTUAL_SIGNATOR_ID = TextualSignator_1_0_0.MY_ID;
+ public static final PdfASID MOST_RECENT_TEXTUAL_SIGNATOR_ID = TextualSignator_1_1_0.MY_ID;
/**
* The most recent test algorithm this application provides.
@@ -96,7 +103,7 @@ public abstract class SignatorFactory
{
if (!id.getVendor().equals(VENDOR))
{
- throw new SignatorFactoryException("The vendor '" + id.getVendor() + "' is unrecognized by this SignatorFactory. (id='" + id + "')");
+ throw new SignatorFactoryException("The vendor '" + id.getVendor() + "' is unrecognized by this SignatorFactory. (id='" + id + "')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
if (id.getType().equals(TYPE_BINARY))
@@ -105,8 +112,12 @@ public abstract class SignatorFactory
{
return new BinarySignator_1_0_0();
}
+ if (id.getVersion().equals(VERSION_1_1_0))
+ {
+ return new BinarySignator_1_1_0();
+ }
- throw new SignatorFactoryException("The version '" + id.getVersion() + "' of type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')");
+ throw new SignatorFactoryException("The version '" + id.getVersion() + "' of type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
if (id.getType().equals(TYPE_TEXTUAL))
@@ -115,8 +126,12 @@ public abstract class SignatorFactory
{
return new TextualSignator_1_0_0();
}
+ if (id.getVersion().equals(VERSION_1_1_0))
+ {
+ return new TextualSignator_1_1_0();
+ }
- throw new SignatorFactoryException("The version '" + id.getVersion() + "' of type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')");
+ throw new SignatorFactoryException("The version '" + id.getVersion() + "' of type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
if (id.getType().equals(TYPE_TEST))
@@ -126,7 +141,7 @@ public abstract class SignatorFactory
return new DetachedSignator_1_0_0();
}
- throw new SignatorFactoryException("The version '" + id.getVersion() + "' of type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')");
+ throw new SignatorFactoryException("The version '" + id.getVersion() + "' of type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
if (id.getType().equals(TYPE_DETACHED_TEXTUAL))
@@ -136,10 +151,10 @@ public abstract class SignatorFactory
return new DetachedfTextualSignator_1_0_0();
}
- throw new SignatorFactoryException("The version '" + id.getVersion() + "' of type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')");
+ throw new SignatorFactoryException("The version '" + id.getVersion() + "' of type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
- throw new SignatorFactoryException("The type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')");
+ throw new SignatorFactoryException("The type '" + id.getType() + "' is not supported by this SignatorFactory. (id='" + id + "')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
/**
@@ -171,7 +186,7 @@ public abstract class SignatorFactory
if (id == null)
{
- throw new SignatorFactoryException("The type '" + signator_type + "' is not supported by this SignatorFactory.");
+ throw new SignatorFactoryException("The type '" + signator_type + "' is not supported by this SignatorFactory."); //$NON-NLS-1$ //$NON-NLS-2$
}
return createSignator(id);