Class FileResource


  • @Path("/file")
    @ApplicationScoped
    public class FileResource
    extends Object
    • Field Detail

      • CONSUME_BATCH

        public static String CONSUME_BATCH
      • SORT_BY

        public static String SORT_BY
      • SEPARATOR

        public static String SEPARATOR
      • producerTemplate

        @Inject
        org.apache.camel.ProducerTemplate producerTemplate
      • consumerTemplate

        @Inject
        org.apache.camel.ConsumerTemplate consumerTemplate
      • context

        @Inject
        org.apache.camel.CamelContext context
    • Constructor Detail

      • FileResource

        public FileResource()
    • Method Detail

      • getFile

        @Path("/get/{folder}/{name}")
        @GET
        @Produces("text/plain")
        public String getFile​(@PathParam("folder")
                              String folder,
                              @PathParam("name")
                              String name)
                       throws Exception
        Throws:
        Exception
      • startRoute

        @Path("/startRoute")
        @POST
        @Consumes("text/plain")
        public void startRoute​(String routeId)
                        throws Exception
        Throws:
        Exception
      • getFromMock

        @Path("/getFromMock/{mockId}")
        @GET
        public String getFromMock​(@PathParam("mockId")
                                  String mockId)
      • resetMock

        @Path("/resetMock/{mockId}")
        @GET
        public void resetMock​(@PathParam("mockId")
                              String mockId)
      • createFile

        @Path("/create/{folder}")
        @POST
        @Consumes("application/octet-stream")
        @Produces("text/plain")
        public javax.ws.rs.core.Response createFile​(@PathParam("folder")
                                                    String folder,
                                                    byte[] content,
                                                    @QueryParam("charset")
                                                    String charset,
                                                    @QueryParam("fileName")
                                                    String fileName)
                                             throws Exception
        Throws:
        Exception
      • pollEnrich

        @Path("/route/{route}")
        @POST
        @Consumes("text/plain")
        public String pollEnrich​(String body,
                                 @PathParam("route")
                                 String route)
                          throws Exception
        Throws:
        Exception
      • writeThenReadFileWithCharsetShouldSucceed

        @Path("/writeThenReadFileWithCharsetShouldSucceed")
        @GET
        public void writeThenReadFileWithCharsetShouldSucceed()
                                                       throws Exception
        Throws:
        Exception