Class PdfTestServices


  • @Singleton
    @Path("/pdftest")
    public class PdfTestServices
    extends step.core.deployment.AbstractServices
    • Field Detail

      • reportNodeAttachmentManager

        protected step.core.miscellaneous.ReportNodeAttachmentManager reportNodeAttachmentManager
      • fileResolver

        protected step.attachments.FileResolver fileResolver
    • Constructor Detail

      • PdfTestServices

        public PdfTestServices()
    • Method Detail

      • loadPdf

        @POST
        @Path("/session/{sessionid}/load")
        public void loadPdf​(@PathParam("sessionid")
                            String sessionId,
                            @QueryParam("filename")
                            String filename)
                     throws Exception
        Throws:
        Exception
      • getPageIdsWithAnchors

        @GET
        @Path("/scenario/{sessionid}/pagesIdsWithAnchors")
        public Set<Integer> getPageIdsWithAnchors​(@PathParam("sessionid")
                                                  String sessionId)
                                           throws Exception
        Throws:
        Exception
      • getWorkingDir

        protected File getWorkingDir()
      • getPdfPageAsImage

        @GET
        @Path("/pdf/{sessionid}/page/{pageid}")
        @Produces("application/octet-stream")
        public javax.ws.rs.core.Response getPdfPageAsImage​(@PathParam("sessionid")
                                                           String sessionid,
                                                           @PathParam("pageid")
                                                           Integer pageid)
                                                    throws Exception
        Throws:
        Exception
      • extractRegionText

        @POST
        @Path("/pdf/{sessionid}/zone/text")
        @Consumes("application/json")
        public String extractRegionText​(@PathParam("sessionid")
                                        String sessionid,
                                        RegionDefinion regionDef)
                                 throws Exception
        Throws:
        Exception
      • saveScenario

        @POST
        @Path("/pdf/{sessionid}/scenario")
        @Consumes("application/json")
        public void saveScenario​(@PathParam("sessionid")
                                 String sessionid,
                                 Scenario scenario)
                          throws com.fasterxml.jackson.core.JsonGenerationException,
                                 com.fasterxml.jackson.databind.JsonMappingException,
                                 IOException
        Throws:
        com.fasterxml.jackson.core.JsonGenerationException
        com.fasterxml.jackson.databind.JsonMappingException
        IOException
      • getScenario

        @GET
        @Path("/pdf/{sessionid}/scenario")
        @Consumes("application/json")
        public Scenario getScenario​(@PathParam("sessionid")
                                    String sessionid)
                             throws com.fasterxml.jackson.core.JsonGenerationException,
                                    com.fasterxml.jackson.databind.JsonMappingException,
                                    IOException
        Throws:
        com.fasterxml.jackson.core.JsonGenerationException
        com.fasterxml.jackson.databind.JsonMappingException
        IOException
      • getPdfPageCount

        @GET
        @Path("/pdf/{sessionid}/pagecount")
        public Integer getPdfPageCount​(@PathParam("sessionid")
                                       String sessionid)
                                throws Exception
        Throws:
        Exception
      • getPdfPageCount

        @GET
        @Path("/pdf/{sessionid}/pdf/page/{pageid}/dimension")
        public Dimension getPdfPageCount​(@PathParam("sessionid")
                                         String sessionid,
                                         @PathParam("pageid")
                                         Integer pageid)
                                  throws Exception
        Throws:
        Exception
      • getPdfFilename

        @GET
        @Path("/pdf/{sessionid}/pdf/filename")
        public String getPdfFilename​(@PathParam("sessionid")
                                     String sessionid)
                              throws Exception
        Throws:
        Exception