aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas/impl/api/commons/SignatureProfileImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl/api/commons/SignatureProfileImpl.java')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/api/commons/SignatureProfileImpl.java162
1 files changed, 77 insertions, 85 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/commons/SignatureProfileImpl.java b/src/main/java/at/gv/egiz/pdfas/impl/api/commons/SignatureProfileImpl.java
index f0422f6..fb78564 100644
--- a/src/main/java/at/gv/egiz/pdfas/impl/api/commons/SignatureProfileImpl.java
+++ b/src/main/java/at/gv/egiz/pdfas/impl/api/commons/SignatureProfileImpl.java
@@ -3,9 +3,7 @@
*/
package at.gv.egiz.pdfas.impl.api.commons;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.Set;
+import java.util.Properties;
import at.gv.egiz.pdfas.api.commons.SignatureProfile;
@@ -14,87 +12,81 @@ import at.gv.egiz.pdfas.api.commons.SignatureProfile;
*
* @author wprinz
*/
-public class SignatureProfileImpl implements SignatureProfile
-{
-
- /**
- * The profile identifier.
- */
- protected String profileId = null;
-
- /**
- * The MOA key identifiert of this profile.
- */
- protected String moaKeyIdentifier = null;
-
- // start - added by tknall
-
- /**
- * A Hashtable containing all field values (as String) for the current profiles
- * (<code>sig_obj.PROFILE.key.*</code>).
- */
- protected Hashtable fields = new Hashtable();
-
- // stop - added by tknall
-
- /**
- * Constructor.
- *
- * @param profileId
- * The profile identifier.
- * @param moaKeyIdentifier
- * The MOA key identifiert of this profile.
- */
- public SignatureProfileImpl(String profileId, String moaKeyIdentifier)
- {
- this.profileId = profileId;
- this.moaKeyIdentifier = moaKeyIdentifier;
- }
-
- /**
- * @see at.gv.egiz.pdfas.api.commons.SignatureProfile#getProfileId()
- */
- public String getProfileId()
- {
- return this.profileId;
- }
-
- /**
- * @see at.gv.egiz.pdfas.api.commons.SignatureProfile#getMOAKeyIdentifier()
- */
- public String getMOAKeyIdentifier()
- {
- return this.moaKeyIdentifier;
- }
-
- // start - added by tknall
-
- /**
- * Returns the value of a field with a given key for the current profile.
- * <p>e.g.<br/><code>signaturProfile.getField(SignatureTypes.SIG_ISSUER)</code><br/>
- * returns <code>"Issuer-Certificate"</code></p>
- * <code>null</code> is returned if a field with key <code>key</code> could not be found.
- * @param key The key for the field to be returned or <code>null</code> if there is not such field.
- * @return The value of the field with key <code>key</key>.
- * @see at.knowcenter.wag.egov.egiz.sig.SignatureTypes
- */
- public String getField(String key) {
- return (String) this.fields.get(key);
- }
-
- /**
- * Sets the value <code>value</code> for a certain field with key <code>key</code>.
- * @param key The key of the field.
- * @param value The value of the field with key <code>key</code>.
- */
- public void setField(String key, String value) {
- this.fields.put(key, value);
- }
-
- public Set getFieldKeys() {
- return Collections.unmodifiableSet(this.fields.keySet());
- }
-
- // stop - added by tknall
+public class SignatureProfileImpl implements SignatureProfile {
+
+ /**
+ * The profile identifier.
+ */
+ protected String profileId = null;
+
+ /**
+ * The MOA key identifiert of this profile.
+ */
+ protected String moaKeyIdentifier = null;
+
+ // start - added by tknall
+
+ /**
+ * Properties containing the layout settings relevant to the search algorithm
+ * for signature blocks.
+ */
+ protected Properties signatureBlockEntries;
+
+ // stop - added by tknall
+
+ /**
+ * Constructor.
+ *
+ * @param profileId
+ * The profile identifier.
+ * @param moaKeyIdentifier
+ * The MOA key identifiert of this profile.
+ */
+ public SignatureProfileImpl(String profileId, String moaKeyIdentifier) {
+ this.profileId = profileId;
+ this.moaKeyIdentifier = moaKeyIdentifier;
+ this.signatureBlockEntries = new Properties();
+ }
+
+ /**
+ * @see at.gv.egiz.pdfas.api.commons.SignatureProfile#getProfileId()
+ */
+ public String getProfileId() {
+ return this.profileId;
+ }
+
+ /**
+ * @see at.gv.egiz.pdfas.api.commons.SignatureProfile#getMOAKeyIdentifier()
+ */
+ public String getMOAKeyIdentifier() {
+ return this.moaKeyIdentifier;
+ }
+
+ // start - added by tknall
+
+ /**
+ * @see at.gv.egiz.pdfas.api.commons.SignatureProfile#getSignatureBlockEntries()
+ */
+ public Properties getSignatureBlockEntries() {
+ return this.signatureBlockEntries;
+ }
+
+ /**
+ * Sets the entries relevant to the search algorithm for signature blocks.<br/>
+ * e.g. properties starting with <code>sig_obj.PROFILE.key.</code> and
+ * properties of the form <code>sig_obj.PROFILE.table.TABLENAME.NUMBER</code>
+ * where <code>PROFILE</code> is the name of the current profile,
+ * <code>TABLENAME</code> is the name of a table and <code>NUMBER</code>
+ * is the number of the specific row within the table <code>TABLENAME</code>.
+ *
+ * @param signatureBlockEntries
+ * The entries relevant to the signature block search algorithm as
+ * Java properties.
+ */
+ public void setSignatureBlockEntries(Properties signatureBlockEntries) {
+ this.signatureBlockEntries = signatureBlockEntries;
+ }
+
+ // stop - added by tknall
}