Package com.axelor.studio.service
Class StudioService
java.lang.Object
com.axelor.studio.service.StudioService
Facade service for Studio operations.
This class delegates to specialized services:
StudioVersionService- Version management (create, publish, deactivate)StudioResourceService- Resource CRUD operationsStudioDeployService- Deploy/undeploy to metadata tables
For new code, consider injecting the specialized services directly for better clarity and testability.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateMajor(StudioResource resource) Creates a new major version from the given revision.createMinor(StudioResource resource) Creates a new minor version from the given revision.createPatch(StudioResource resource) Creates a new patch version from the given revision.voiddeactivateRevision(StudioResource resource) Deactivates an activated or published revision.voiddeleteRevision(StudioResource resource) Deletes a revision and all its child resources recursively.voiddeployAction(StudioResource resource) Deploys an action resource.voiddeployApp(StudioResource resource) Deploys an entire app revision.voiddeployField(StudioResource resource) Deploys a field resource.voiddeployMenu(StudioResource resource) Deploys a menu resource.voiddeployModel(StudioResource resource) Deploys a model resource.voiddeploySelect(StudioResource resource) Deploys a selection resource.voiddeployView(StudioResource resource) Deploys a view resource.deployWorkflow(StudioResource resource) Deploys a workflow resource.voidensureModelResources(StudioResource app, StudioJsonModel model) Ensures that default resources exist for a model.voidensureProject(StudioResource revision, String... modules) Ensures project dependencies are configured for the given modules.findField(StudioResource parent, String name, String model, String modelField) Finds a field resource by name, model, and model field.findLatestActive(StudioResource resource) Finds the currently activated revision for a given project.findLatestPublished(StudioResource resource) Finds the latest published revision for a given project.findLatestRevision(StudioResource resource) Finds the latest revision (by patch version) for a given project or revision.findProject(String name, Integer major, Integer minor) Finds a project by name and version.Finds or creates a view resource.voidonRemove(StudioResource resource) Callback invoked when a resource is deleted.onSave(StudioResource resource) Callback invoked when a resource is saved.voidpublishRevision(StudioResource resource) Publishes an activated revision.saveFields(StudioResource app, List<StudioJsonField> fields) Saves a list of fields.saveResource(StudioResource resource) Saves a generic resource.saveView(StudioResource resource, List<StudioJsonField> fields) Saves a view resource with optional associated fields.voidundeployApp(StudioResource resource) Undeploys an app by resource.voidundeployApp(String name) Undeploys an app by name.voidundeployView(StudioResource resource) Undeploys a view by resource.voidundeployWorkflow(StudioResource resource) Undeploys a workflow by resource (scoped to its owning project and stable identity).
-
Constructor Details
-
StudioService
public StudioService()
-
-
Method Details
-
findLatestRevision
Finds the latest revision (by patch version) for a given project or revision.- See Also:
-
findLatestActive
Finds the currently activated revision for a given project.- See Also:
-
findLatestPublished
Finds the latest published revision for a given project.- See Also:
-
findProject
Finds a project by name and version.- See Also:
-
createMajor
Creates a new major version from the given revision.- See Also:
-
createMinor
Creates a new minor version from the given revision.- See Also:
-
createPatch
Creates a new patch version from the given revision.- See Also:
-
deleteRevision
Deletes a revision and all its child resources recursively.- See Also:
-
deactivateRevision
Deactivates an activated or published revision.- See Also:
-
publishRevision
Publishes an activated revision.- See Also:
-
onSave
Callback invoked when a resource is saved.- See Also:
-
onRemove
Callback invoked when a resource is deleted.- See Also:
-
ensureProject
Ensures project dependencies are configured for the given modules.- See Also:
-
findView
Finds or creates a view resource.- See Also:
-
findField
public StudioResource findField(StudioResource parent, String name, String model, String modelField) Finds a field resource by name, model, and model field.- See Also:
-
saveFields
Saves a list of fields.- See Also:
-
saveView
Saves a view resource with optional associated fields.- See Also:
-
saveResource
Saves a generic resource.- See Also:
-
ensureModelResources
Ensures that default resources exist for a model.- See Also:
-
deployApp
Deploys an entire app revision.- See Also:
-
deployView
Deploys a view resource.- See Also:
-
deployModel
Deploys a model resource.- See Also:
-
deployField
Deploys a field resource.- See Also:
-
deployAction
Deploys an action resource.- See Also:
-
deployMenu
Deploys a menu resource.- See Also:
-
deploySelect
Deploys a selection resource.- See Also:
-
deployWorkflow
Deploys a workflow resource.- See Also:
-
undeployApp
Undeploys an app by resource.- See Also:
-
undeployApp
Undeploys an app by name.- See Also:
-
undeployView
Undeploys a view by resource.- See Also:
-
undeployWorkflow
Undeploys a workflow by resource (scoped to its owning project and stable identity).- See Also:
-