aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java
diff options
context:
space:
mode:
authornetconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-11-29 12:00:22 +0000
committernetconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-11-29 12:00:22 +0000
commit61a2d23ef72630934c603fe9ffb96ebebff6ee09 (patch)
treece05c4470d3a7a2743b4956f512288d6d0d62187 /src/main/java/at/gv/egiz/pdfas/api/PdfAs.java
parent00809217ec7c890a844f9a7c667c71b550ad92a6 (diff)
downloadpdf-as-3-61a2d23ef72630934c603fe9ffb96ebebff6ee09.tar.gz
pdf-as-3-61a2d23ef72630934c603fe9ffb96ebebff6ee09.tar.bz2
pdf-as-3-61a2d23ef72630934c603fe9ffb96ebebff6ee09.zip
PDF-AS API
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@233 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/api/PdfAs.java')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/api/PdfAs.java123
1 files changed, 123 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java b/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java
new file mode 100644
index 0000000..4a8a0e0
--- /dev/null
+++ b/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java
@@ -0,0 +1,123 @@
+/**
+ *
+ */
+package at.gv.egiz.pdfas.api;
+
+import java.util.List;
+
+import at.gv.egiz.pdfas.api.analyze.AnalyzeParameters;
+import at.gv.egiz.pdfas.api.analyze.AnalyzeResult;
+import at.gv.egiz.pdfas.api.commons.SignatureProfile;
+import at.gv.egiz.pdfas.api.exceptions.PdfAsException;
+import at.gv.egiz.pdfas.api.sign.SignParameters;
+import at.gv.egiz.pdfas.api.sign.SignResult;
+import at.gv.egiz.pdfas.api.verify.VerifyAfterAnalysisParameters;
+import at.gv.egiz.pdfas.api.verify.VerifyParameters;
+import at.gv.egiz.pdfas.api.verify.VerifyResult;
+import at.gv.egiz.pdfas.api.verify.VerifyResults;
+
+/**
+ * The PDF-AS API main interface.
+ *
+ * <p>
+ * Create an Object implementing this interface using the proper factory.
+ * </p>
+ *
+ * @author wprinz
+ */
+public interface PdfAs
+{
+
+ /**
+ * Signs a PDF document using PDF-AS.
+ *
+ * @param signParameters
+ * The sign parameters.
+ * @return Returns the signed document plus additional information.
+ * @throws PdfAsException
+ * Thrown, if an error occurs.
+ *
+ * @see SignParameters
+ * @see SignResult
+ */
+ public SignResult sign(SignParameters signParameters) throws PdfAsException;
+
+ /**
+ * Verifies a document with (potentially multiple) PDF-AS signatures.
+ *
+ * @param verifyParameters
+ * The verify parameters.
+ * @return Returns the verification results.
+ * @throws PdfAsException
+ * Thrown, if an error occurs.
+ *
+ * @see VerifyParameters
+ * @see VerifyResults
+ * @see VerifyResult
+ */
+ public VerifyResults verify(VerifyParameters verifyParameters) throws PdfAsException;
+
+ /**
+ * Analyzes a document for signatures and returns a verify-able list of such.
+ *
+ * @param analyzeParameters
+ * The analyzation parameters.
+ * @return Returns a list of verify-able signatures that were found in the
+ * document.
+ * @throws PdfAsException
+ * Thrown on error.
+ *
+ * @see AnalyzeParameters
+ * @see AnalyzeResult
+ * @see {@link #verify(AnalyzeResult)}
+ */
+ public AnalyzeResult analyze(AnalyzeParameters analyzeParameters) throws PdfAsException;
+
+ /**
+ * Verifies a list of signatures that have been analyzed previously.
+ *
+ * @param verifyAfterAnalysisParameters The parameters.
+ *
+ * @return Returns the verification results.
+ * @throws PdfAsException
+ * Thrown on error.
+ *
+ * @see AnalyzeResult
+ * @see VerifyAfterAnalysisParameters
+ * @see VerifyResults
+ * @see VerifyResult
+ * @see {@link #analyze(AnalyzeParameters)}
+ */
+ public VerifyResults verify(VerifyAfterAnalysisParameters verifyAfterAnalysisParameters) throws PdfAsException;
+
+ /**
+ * Reloads the configuration from the work directory.
+ *
+ * @throws PdfAsException
+ * Thrown, if an error occurs.
+ */
+ public void reloadConfig() throws PdfAsException;
+
+ /**
+ * Returns the list of information objects about the profiles available in the
+ * configuration.
+ *
+ * <p>
+ * Note: Currently the profile information consists of the profile Id and the
+ * MOA Key Id only.
+ * </p>
+ * <p>
+ * Note: In near future the profile management will be moved out of the config
+ * file into an API class representation of the profiles which may render this
+ * (and related) methods obsolete.
+ * </p>
+ *
+ * @return Returns the list of {@link SignatureProfile} objects with
+ * information about the profiles available in the configuration.
+ * @throws PdfAsException
+ * Thrown on error.
+ *
+ * @see SignatureProfile
+ */
+ public List getProfileInformation() throws PdfAsException;
+}