aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/ApiHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/ApiHelper.java')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/ApiHelper.java27
1 files changed, 26 insertions, 1 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/ApiHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/ApiHelper.java
index a0f22fd..04dabaa 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/ApiHelper.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/ApiHelper.java
@@ -22,6 +22,13 @@ public class ApiHelper {
public static final String INTERNAL_PDF_AS_OBJECT = "INTERNAL_PDF_AS_OBJECT";
+ /**
+ * Instantiate the {@link PdfAs} implementation.
+ *
+ * @param file config directory
+ * @return
+ * @throws WebException
+ */
public static PdfAs createApiObject(File file) throws WebException {
try {
Class pdfAsClass = Class.forName("at.gv.egiz.pdfas.impl.api.PdfAsObject");
@@ -45,7 +52,13 @@ public class ApiHelper {
throw new WebException(e);
}
}
-
+
+ /**
+ * Instantiate the {@link PdfAsInternal} implementation.
+ *
+ * @return
+ * @throws WebException
+ */
public static PdfAsInternal createInternalApiObject() throws WebException {
try {
Class pdfAsClass = Class.forName("at.gv.egiz.pdfas.impl.api.internal.PdfAsInternalObject");
@@ -62,10 +75,22 @@ public class ApiHelper {
}
}
+ /**
+ * Retrieve the {@link PdfAs} object from the {@link ServletContext}
+ *
+ * @param servletContext
+ * @return
+ */
public static PdfAs getPdfAsFromContext(ServletContext servletContext) {
return (PdfAs)servletContext.getAttribute(PDF_AS_OBJECT);
}
+ /**
+ * Retrieve the {@link PdfAsInternal} object from the {@link ServletContext}
+ *
+ * @param servletContext
+ * @return
+ */
public static PdfAsInternal getPdfAsInternalFromContext(ServletContext servletContext) {
return (PdfAsInternal)servletContext.getAttribute(INTERNAL_PDF_AS_OBJECT);
}