diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-12-01 12:23:47 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-12-02 10:09:35 +0100 |
commit | e929b5f4c6d9351b29150e6c1843f06806ee7b00 (patch) | |
tree | c6ecc4e5f6c3da6ef381a3d852c0a2211ca060e2 /pdf-as-web | |
parent | 6398c85d80213f316dd0f9e4be10e34b54b1f5f9 (diff) | |
download | pdf-as-4-e929b5f4c6d9351b29150e6c1843f06806ee7b00.tar.gz pdf-as-4-e929b5f4c6d9351b29150e6c1843f06806ee7b00.tar.bz2 pdf-as-4-e929b5f4c6d9351b29150e6c1843f06806ee7b00.zip |
added status servlet to pdf-as-web
Diffstat (limited to 'pdf-as-web')
4 files changed, 54 insertions, 1 deletions
diff --git a/pdf-as-web/build.gradle b/pdf-as-web/build.gradle index 57eb54f9..2dbd7188 100644 --- a/pdf-as-web/build.gradle +++ b/pdf-as-web/build.gradle @@ -15,19 +15,26 @@ repositories { mavenCentral() } +configurations { providedCompile } + +sourceSets.main.compileClasspath += configurations.providedCompile +sourceSets.test.compileClasspath += configurations.providedCompile +sourceSets.test.runtimeClasspath += configurations.providedCompile + dependencies { compile project (':pdf-as-lib') compile project (':pdf-as-moa') compile project (':signature-standards:sigs-pkcs7detached') compile project (':signature-standards:sigs-pades') compile project (':pdf-as-pdfbox') + compile project (':pdf-as-web-status') compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1' compile group: 'opensymphony', name: 'sitemesh', version: '2.4.2' compile "commons-codec:commons-codec:1.9" compile 'org.apache.commons:commons-lang3:3.3.2' compile 'org.apache.cxf:cxf-rt-transports-http:3.0.1' compile 'org.apache.cxf:cxf-rt-frontend-jaxws:3.0.1' - providedCompile "javax.servlet:servlet-api:2.5" + providedCompile 'javax.servlet:javax.servlet-api:3.0.1' testCompile group: 'junit', name: 'junit', version: '4.+' } diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/status/PdfAsWebTestFactory.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/status/PdfAsWebTestFactory.java new file mode 100644 index 00000000..a6fa8a05 --- /dev/null +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/status/PdfAsWebTestFactory.java @@ -0,0 +1,18 @@ +package at.gv.egiz.pdfas.web.status; + +import java.util.ArrayList; +import java.util.List; + +import at.gv.egiz.status.Test; +import at.gv.egiz.status.TestFactory; + +public class PdfAsWebTestFactory implements TestFactory { + + @Override + public List<Test> createTests() { + List<Test> testList = new ArrayList<Test>(); + testList.add(new SimpleAliveTest()); + return testList; + } + +} diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/status/SimpleAliveTest.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/status/SimpleAliveTest.java new file mode 100644 index 00000000..1f78f90c --- /dev/null +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/status/SimpleAliveTest.java @@ -0,0 +1,27 @@ +package at.gv.egiz.pdfas.web.status; + +import at.gv.egiz.status.Test; +import at.gv.egiz.status.TestResult; +import at.gv.egiz.status.TestStatus; +import at.gv.egiz.status.impl.BaseTestResult; + +public class SimpleAliveTest implements Test { + + @Override + public String getName() { + return "ALIVE"; + } + + @Override + public long getCacheDelay() { + return 0; + } + + @Override + public TestResult runTest() { + BaseTestResult result = new BaseTestResult(); + result.setStatus(TestStatus.OK); + return result; + } + +} diff --git a/pdf-as-web/src/main/resources/META-INF/services/at.gv.egiz.status.TestFactory b/pdf-as-web/src/main/resources/META-INF/services/at.gv.egiz.status.TestFactory new file mode 100644 index 00000000..d0787dae --- /dev/null +++ b/pdf-as-web/src/main/resources/META-INF/services/at.gv.egiz.status.TestFactory @@ -0,0 +1 @@ +at.gv.egiz.pdfas.web.status.PdfAsWebTestFactory
\ No newline at end of file |