Interface BusinessDataModelRepository
-
- All Known Implementing Classes:
BusinessDataModelRepositoryImpl
public interface BusinessDataModelRepository- Author:
- Colin PUY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddropAndUninstall(long tenantId)org.bonitasoft.engine.bdm.model.BusinessObjectModelgetBusinessObjectModel()Returns the currently deployed Business Object Data Model, or null if no BDM is deployed.byte[]getClientBDMZip()Retrieve the client side BDM generated zip.java.lang.StringgetInstalledBDMVersion()Returns the currently deployed BDM version, or null if no BDM is deployed.java.lang.Stringinstall(byte[] bdmArchive, long userId)Deploys a Business Data Model / repository on the specified tenant.booleanisBDMDeployed()booleanisDeployed(byte[] bdmArchive)Determine if the given BDM archive is equivalent to the currently deployed BDM.voiduninstall(long tenantId)Undeploy Business Data Model from specified tenant
-
-
-
Method Detail
-
install
java.lang.String install(byte[] bdmArchive, long userId) throws SBusinessDataRepositoryDeploymentException, org.bonitasoft.engine.business.data.InvalidBusinessDataModelExceptionDeploys a Business Data Model / repository on the specified tenant.- Parameters:
bdmArchive- the Business Data Model, as a jar containing the Business Object classes to deploy.userId- the ID of the user installing the BDM, typically tenant admin (id=-1)- Returns:
- the version of the BDM just deployed.
- Throws:
SBusinessDataRepositoryDeploymentException- if a deployment exception occurs.org.bonitasoft.engine.business.data.InvalidBusinessDataModelException
-
uninstall
void uninstall(long tenantId) throws SBusinessDataRepositoryExceptionUndeploy Business Data Model from specified tenant- Parameters:
tenantId- the ID of the tenant to undeploy the Business Data Model from- Throws:
SBusinessDataRepositoryException- if error occurs during undeployement
-
isBDMDeployed
boolean isBDMDeployed()
-
getClientBDMZip
byte[] getClientBDMZip() throws SBusinessDataRepositoryExceptionRetrieve the client side BDM generated zip. This zip contains jars with BDM Pojos and DAOs- Returns:
- the zip content
- Throws:
SBusinessDataRepositoryException
-
dropAndUninstall
void dropAndUninstall(long tenantId) throws SBusinessDataRepositoryException- Throws:
SBusinessDataRepositoryException
-
getInstalledBDMVersion
java.lang.String getInstalledBDMVersion() throws SBusinessDataRepositoryExceptionReturns the currently deployed BDM version, or null if no BDM is deployed.- Returns:
- the currently deployed BDM version, or null if no BDM is deployed.
- Throws:
SBusinessDataRepositoryException- if the BDM cannot be retrieved.
-
getBusinessObjectModel
org.bonitasoft.engine.bdm.model.BusinessObjectModel getBusinessObjectModel() throws SBusinessDataRepositoryExceptionReturns the currently deployed Business Object Data Model, or null if no BDM is deployed.- Returns:
- the currently deployed Business Object Data Model, or null if no BDM is deployed.
- Throws:
SBusinessDataRepositoryException- if the BDM cannot be retrieved.
-
isDeployed
boolean isDeployed(byte[] bdmArchive) throws org.bonitasoft.engine.business.data.InvalidBusinessDataModelException, SBusinessDataRepositoryDeploymentExceptionDetermine if the given BDM archive is equivalent to the currently deployed BDM.- Parameters:
bdmArchive- the Business Data Model, as a zip containing the Business Object Model.- Returns:
- true If the given BDM archive is the same as the one already deployed. False otherwise.
- Throws:
org.bonitasoft.engine.business.data.InvalidBusinessDataModelException- if the given BDM archive is invalidSBusinessDataRepositoryDeploymentException- if the server jar generation of the given BDM fails
-
-