public class BusinessDataModelRepositoryImpl extends java.lang.Object implements BusinessDataModelRepository
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BDR_DEPENDENCY_FILENAME |
| Constructor and Description |
|---|
BusinessDataModelRepositoryImpl(DependencyService dependencyService,
ClassLoaderService classLoaderService,
SchemaManager schemaManager,
TenantResourcesService tenantResourcesService,
long tenantId) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
createAndDeployServerBDMJar(long tenantId,
org.bonitasoft.engine.bdm.model.BusinessObjectModel model) |
void |
dropAndUninstall(long tenantId) |
protected byte[] |
generateClientBDMZip(org.bonitasoft.engine.bdm.model.BusinessObjectModel model) |
protected byte[] |
generateServerBDMJar(org.bonitasoft.engine.bdm.model.BusinessObjectModel model) |
org.bonitasoft.engine.bdm.model.BusinessObjectModel |
getBusinessObjectModel()
Returns the currently deployed Business Object Data Model, or null if no BDM is deployed.
|
protected org.bonitasoft.engine.bdm.model.BusinessObjectModel |
getBusinessObjectModel(byte[] bdmZip) |
byte[] |
getClientBDMZip()
Retrieve the client side BDM generated zip.
|
java.lang.String |
getInstalledBDMVersion()
Returns the currently deployed BDM version, or null if no BDM is deployed.
|
java.lang.String |
install(byte[] bdmZip,
long tenantId,
long userId)
Deploys a Business Data Model / repository on the specified tenant.
|
boolean |
isBDMDeployed() |
void |
uninstall(long tenantId)
Undeploy Business Data Model from specified tenant
|
protected void |
update(java.util.Set<java.lang.String> annotatedClassNames) |
public static final java.lang.String BDR_DEPENDENCY_FILENAME
public BusinessDataModelRepositoryImpl(DependencyService dependencyService, ClassLoaderService classLoaderService, SchemaManager schemaManager, TenantResourcesService tenantResourcesService, long tenantId)
public byte[] getClientBDMZip()
throws SBusinessDataRepositoryException
BusinessDataModelRepositorygetClientBDMZip in interface BusinessDataModelRepositorySBusinessDataRepositoryExceptionpublic java.lang.String getInstalledBDMVersion()
throws SBusinessDataRepositoryException
BusinessDataModelRepositorygetInstalledBDMVersion in interface BusinessDataModelRepositorySBusinessDataRepositoryException - if the BDM cannot be retrieved.public org.bonitasoft.engine.bdm.model.BusinessObjectModel getBusinessObjectModel()
throws SBusinessDataRepositoryException
BusinessDataModelRepositorygetBusinessObjectModel in interface BusinessDataModelRepositorySBusinessDataRepositoryException - if the BDM cannot be retrieved.public boolean isBDMDeployed()
isBDMDeployed in interface BusinessDataModelRepositorypublic java.lang.String install(byte[] bdmZip,
long tenantId,
long userId)
throws SBusinessDataRepositoryDeploymentException
BusinessDataModelRepositoryinstall in interface BusinessDataModelRepositorybdmZip - the Business Data Model, as a jar containing the Business Object classes to deploy.tenantId - the ID of the tenant to deploy the Business Data Model to.userId - the ID of the user installing the BDM, typically tenant admin (id=-1)SBusinessDataRepositoryDeploymentException - if a deployment exception occurs.protected long createAndDeployServerBDMJar(long tenantId,
org.bonitasoft.engine.bdm.model.BusinessObjectModel model)
throws SBusinessDataRepositoryDeploymentException
protected void update(java.util.Set<java.lang.String> annotatedClassNames)
throws SBusinessDataRepositoryDeploymentException
protected org.bonitasoft.engine.bdm.model.BusinessObjectModel getBusinessObjectModel(byte[] bdmZip)
throws SBusinessDataRepositoryDeploymentException
protected byte[] generateServerBDMJar(org.bonitasoft.engine.bdm.model.BusinessObjectModel model)
throws SBusinessDataRepositoryDeploymentException
protected byte[] generateClientBDMZip(org.bonitasoft.engine.bdm.model.BusinessObjectModel model)
throws SBusinessDataRepositoryDeploymentException,
java.io.IOException
SBusinessDataRepositoryDeploymentExceptionjava.io.IOExceptionpublic void uninstall(long tenantId)
throws SBusinessDataRepositoryException
BusinessDataModelRepositoryuninstall in interface BusinessDataModelRepositorytenantId - the ID of the tenant to undeploy the Business Data Model fromSBusinessDataRepositoryException - if error occurs during undeployementpublic void dropAndUninstall(long tenantId)
throws SBusinessDataRepositoryException
dropAndUninstall in interface BusinessDataModelRepositorySBusinessDataRepositoryException