Package step.plugins.compare
Class DocumentCompareServices
- java.lang.Object
-
- step.framework.server.AbstractServices<step.core.access.User>
-
- step.core.deployment.AbstractStepServices
-
- step.plugins.compare.DocumentCompareServices
-
- Direct Known Subclasses:
ImageCompareServices
,PdfTestServices
@Singleton public abstract class DocumentCompareServices extends step.core.deployment.AbstractStepServices
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
DocumentCompareServices.LanguageEntity
static class
DocumentCompareServices.TestScenarioOutput
static class
DocumentCompareServices.TestScenarioOutputError
-
Field Summary
Fields Modifier and Type Field Description protected CompareScenarioServices
compareScenarioServices
protected AbstractDocumentToImageService
docToImageServices
protected step.attachments.FileResolver
fileResolver
protected step.core.miscellaneous.ReportNodeAttachmentManager
reportNodeAttachmentManager
protected CompareSessionServices
sessionServices
-
Constructor Summary
Constructors Constructor Description DocumentCompareServices()
-
Method Summary
-
Methods inherited from class step.core.deployment.AbstractStepServices
getContext, getExecutionRunnable, getObjectEnricher, getObjectFilter, getScheduler
-
-
-
-
Field Detail
-
compareScenarioServices
protected CompareScenarioServices compareScenarioServices
-
sessionServices
protected CompareSessionServices sessionServices
-
docToImageServices
protected AbstractDocumentToImageService docToImageServices
-
reportNodeAttachmentManager
protected step.core.miscellaneous.ReportNodeAttachmentManager reportNodeAttachmentManager
-
fileResolver
protected step.attachments.FileResolver fileResolver
-
-
Method Detail
-
getScenarioDirProperty
protected abstract String getScenarioDirProperty()
-
initDocToImageService
protected abstract void initDocToImageService()
-
getExtractionService
protected abstract AbstractExtractionService getExtractionService()
-
getWorkingDirPath
protected abstract String getWorkingDirPath()
-
init
@PostConstruct public void init() throws Exception
- Overrides:
init
in classstep.core.deployment.AbstractStepServices
- Throws:
Exception
-
loadDocument
@POST @Path("/session/{sessionid}/load") public void loadDocument(@PathParam("sessionid") String sessionId, @QueryParam("filename") String filename) throws Exception
- Throws:
Exception
-
getPageIdsWithAnchors
@GET @Produces("application/json") @Path("/scenario/{sessionid}/pagesIdsWithAnchors") public Set<Integer> getPageIdsWithAnchors(@PathParam("sessionid") String sessionId) throws Exception
- Throws:
Exception
-
testScenario
@POST @Consumes("application/json") @Produces("application/json") @Path("/scenario/{sessionid}/test") public DocumentCompareServices.TestScenarioOutput testScenario(@PathParam("sessionid") String sessionId, @QueryParam("lang") String lang, Scenario.TestScenario testScenario) throws Exception
- Throws:
Exception
-
getWorkingDir
protected File getWorkingDir()
-
getDocumentPageAsImage
@GET @Path("/doc/{sessionid}/page/{pageid}") @Produces("application/octet-stream") public jakarta.ws.rs.core.Response getDocumentPageAsImage(@PathParam("sessionid") String sessionid, @PathParam("pageid") Integer pageid)
-
extractRegionText
@POST @Path("/doc/{sessionid}/zone/text") @Consumes("application/json") @Produces("text/plain") public String extractRegionText(@PathParam("sessionid") String sessionid, @QueryParam("lang") String lang, RegionDefinion regionDef) throws Exception
- Throws:
Exception
-
saveScenario
@POST @Path("/doc/{sessionid}/scenario") @Consumes("application/json") public void saveScenario(@PathParam("sessionid") String sessionid, Scenario scenario) throws IOException
- Throws:
IOException
-
getScenario
@GET @Path("/doc/{sessionid}/scenario") @Consumes("application/json") @Produces("application/json") public Scenario getScenario(@PathParam("sessionid") String sessionid) throws IOException
- Throws:
IOException
-
getPdfPageCount
@GET @Path("/doc/{sessionid}/pagecount") public Integer getPdfPageCount(@PathParam("sessionid") String sessionid) throws Exception
- Throws:
Exception
-
getPageDimensionInPt
@GET @Path("/doc/{sessionid}/doc/page/{pageid}/dimension") public Dimension getPageDimensionInPt(@PathParam("sessionid") String sessionid, @PathParam("pageid") Integer pageid) throws Exception
- Throws:
Exception
-
getPdfFilename
@GET @Produces("text/plain") @Path("/doc/{sessionid}/doc/filename") public String getPdfFilename(@PathParam("sessionid") String sessionid)
-
getSupportedLanguages
protected abstract DocumentCompareServices.LanguageEntity getSupportedLanguages()
-
getSupportedLanguages
@GET @Path("/doc/supportedLanguages") public DocumentCompareServices.LanguageEntity getSupportedLanguages(@PathParam("sessionid") String sessionid)
-
-