Class StudioBuildService

java.lang.Object
com.axelor.db.JpaSupport
com.axelor.studio.service.build.StudioBuildService

public class StudioBuildService extends JpaSupport
Service for managing Studio project builds.

Acts as a facade/orchestrator for the build system, delegating actual execution to a BuildExecutor.

  • Constructor Details

    • StudioBuildService

      public StudioBuildService()
  • Method Details

    • submit

      public StudioBuildJob submit(StudioResource project, BuildOptions options) throws IOException
      Submits a new build job for the given project.

      If an active build (PENDING or RUNNING) already exists for the project, returns that job instead of starting a new one.

      Parameters:
      project - the Studio project to build
      options - build options
      Returns:
      the build job (new or existing active)
      Throws:
      IOException - if project export fails
    • getStatus

      public StudioBuildJob getStatus(String jobId)
      Gets the current status of a build job.
      Parameters:
      jobId - the job ID
      Returns:
      the build job, or null if not found
    • getOutput

      public String getOutput(String jobId, long offset)
      Gets build output starting from the given offset.
      Parameters:
      jobId - the job ID
      offset - character offset to start from
      Returns:
      the output substring, or empty string if not available
    • cancel

      public void cancel(String jobId)
      Cancels a running build job.
      Parameters:
      jobId - the job ID to cancel
    • getHistory

      public List<StudioBuildJob> getHistory(StudioResource project, int limit)
      Gets the build history for a project.
      Parameters:
      project - the project
      limit - maximum number of jobs to return
      Returns:
      list of build jobs, most recent first