Class JobService

  • All Implemented Interfaces:
    org.springframework.context.Lifecycle

    @Path("/jobs/")
    @Service
    public class JobService
    extends Object
    implements org.springframework.context.Lifecycle
    This bean provides the REST service to submit a Job to jadice server, retrieve its state afterwards.

    Please consult the swagger documentation for further details about the methods exposed via REST.

    Since:
    jadice server 5.6.0.0
    • Method Detail

      • createJob

        @POST
        @Consumes({"application/xml","application/json"})
        @Produces("text/plain")
        public String createJob​(JobDefinitionDTO jobDefinition,
                                @Context
                                javax.servlet.http.HttpServletRequest request,
                                @Context
                                javax.servlet.http.HttpServletResponse response)
                         throws JobException,
                                IOException
        Submits a new job which will be submitted for execution immediately.
        Throws:
        JobException
        IOException
      • getJobInformation

        @GET
        @Path("{jobId}")
        @Produces({"application/xml","application/json"})
        public JobInformationDTO getJobInformation​(@PathParam("jobId")
                                                   String jobId)
        Retrieve the current JobInformationDTO about a given Job. This contains its state as well as the information about the resulting files.
      • removeJob

        @DELETE
        @Path("{jobId}")
        public void removeJob​(@PathParam("jobId")
                              String jobId,
                              @Context
                              javax.servlet.http.HttpServletResponse response)
                       throws JobException
        Remove the information about a job from the REST service. It is essential to perform this action after you don't need the JobInformationDTO anymore.
        Throws:
        JobException
      • getJobFactory

        public JobFactory getJobFactory()
        Returns:
        The JobFactory which is used to submit the Job to the converting instance of jadice server
      • setJobFactory

        public void setJobFactory​(JobFactory jobFactory)
        Configure the JobFactory which is used to sumbit the Job to the converting instance of jadice server
      • setContentStore

        public void setContentStore​(ContentStore contentStore)
        Configure the ContentStore that contains the files that shall be converted and stores the files that were generated.
      • start

        public void start()
        Specified by:
        start in interface org.springframework.context.Lifecycle
      • stop

        public void stop()
        Specified by:
        stop in interface org.springframework.context.Lifecycle
      • isRunning

        public boolean isRunning()
        Specified by:
        isRunning in interface org.springframework.context.Lifecycle