aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas/impl/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl/api')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java3
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/api/commons/SignatureProfileImpl.java48
2 files changed, 42 insertions, 9 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
index e94acfd..2923347 100644
--- a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
+++ b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
@@ -172,9 +172,10 @@ public class PdfAsObject implements PdfAs
final String profileId = profile.getType();
log.debug("Processing profile \"" + profileId + "\".");
final String moaKeyIdentifier = settings.getSetting("sig_obj." + profileId + "." + MOA_SIGN_KEY_IDENTIFIER_KEY, defaultMoaKeyIdentifiert);
+ final String profileDescription = settings.getSetting("sig_obj." + profileId + "." + SignatureTypes.SIG_DESCR, null);
// modified by tknall
- SignatureProfileImpl signatureProfile = new SignatureProfileImpl(profileId, moaKeyIdentifier);
+ SignatureProfileImpl signatureProfile = new SignatureProfileImpl(profileId, profileDescription, moaKeyIdentifier);
// start - added by tknall
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 fb78564..90e2ca0 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
@@ -5,6 +5,8 @@ package at.gv.egiz.pdfas.impl.api.commons;
import java.util.Properties;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
import at.gv.egiz.pdfas.api.commons.SignatureProfile;
/**
@@ -24,15 +26,16 @@ public class SignatureProfileImpl implements SignatureProfile {
*/
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
+
+ /**
+ * Short description of the profile.
+ */
+ protected String profileDescription;
/**
* Constructor.
@@ -40,13 +43,30 @@ public class SignatureProfileImpl implements SignatureProfile {
* @param profileId
* The profile identifier.
* @param moaKeyIdentifier
- * The MOA key identifiert of this profile.
+ * The MOA key identifier of this profile.
*/
public SignatureProfileImpl(String profileId, String moaKeyIdentifier) {
this.profileId = profileId;
this.moaKeyIdentifier = moaKeyIdentifier;
this.signatureBlockEntries = new Properties();
}
+
+ /**
+ * Constructor.
+ *
+ * @param profileId
+ * The profile identifier.
+ * @param profileDescription
+ * The profile description.
+ * @param moaKeyIdentifier
+ * The MOA key identifier of this profile.
+ */
+ public SignatureProfileImpl(String profileId, String profileDescription, String moaKeyIdentifier) {
+ this.profileId = profileId;
+ this.moaKeyIdentifier = moaKeyIdentifier;
+ this.profileDescription = profileDescription;
+ this.signatureBlockEntries = new Properties();
+ }
/**
* @see at.gv.egiz.pdfas.api.commons.SignatureProfile#getProfileId()
@@ -62,8 +82,6 @@ public class SignatureProfileImpl implements SignatureProfile {
return this.moaKeyIdentifier;
}
- // start - added by tknall
-
/**
* @see at.gv.egiz.pdfas.api.commons.SignatureProfile#getSignatureBlockEntries()
*/
@@ -86,7 +104,21 @@ public class SignatureProfileImpl implements SignatureProfile {
public void setSignatureBlockEntries(Properties signatureBlockEntries) {
this.signatureBlockEntries = signatureBlockEntries;
}
+
+ /**
+ * Returns the profile description.
+ * @return The profile description.
+ */
+ public String getProfileDescription() {
+ return this.profileDescription;
+ }
- // stop - added by tknall
+ public String toString() {
+ return new ToStringBuilder(this)
+ .append("profileId", this.profileId)
+ .append("profileDescription", this.profileDescription)
+ .append("moaKeyIdentifier", this.moaKeyIdentifier)
+ .toString();
+ }
}