Package com.axelor.studio.service.build
Class StudioBuildService
java.lang.Object
com.axelor.db.JpaSupport
com.axelor.studio.service.build.StudioBuildService
Service for managing Studio project builds.
Acts as a facade/orchestrator for the build system, delegating actual execution to a BuildExecutor.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.axelor.db.JpaSupport
JpaSupport.JDBCTask -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels a running build job.getHistory(StudioResource project, int limit) Gets the build history for a project.Gets build output starting from the given offset.Gets the current status of a build job.submit(StudioResource project, BuildOptions options) Submits a new build job for the given project.Methods inherited from class com.axelor.db.JpaSupport
all, getEntityManager, inTransaction, jdbcTask
-
Constructor Details
-
StudioBuildService
public StudioBuildService()
-
-
Method Details
-
submit
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 buildoptions- build options- Returns:
- the build job (new or existing active)
- Throws:
IOException- if project export fails
-
getStatus
Gets the current status of a build job.- Parameters:
jobId- the job ID- Returns:
- the build job, or null if not found
-
getOutput
Gets build output starting from the given offset.- Parameters:
jobId- the job IDoffset- character offset to start from- Returns:
- the output substring, or empty string if not available
-
cancel
Cancels a running build job.- Parameters:
jobId- the job ID to cancel
-
getHistory
Gets the build history for a project.- Parameters:
project- the projectlimit- maximum number of jobs to return- Returns:
- list of build jobs, most recent first
-