Interface BusinessDataModelRepository

All Known Implementing Classes:
BusinessDataModelRepositoryImpl

public interface BusinessDataModelRepository
Author:
Colin PUY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    org.bonitasoft.engine.bdm.model.BusinessObjectModel
    Returns the currently deployed Business Object Data Model, or null if no BDM is deployed.
    byte[]
    Retrieve the client side BDM generated zip.
    Returns the currently deployed BDM version, or null if no BDM is deployed.
    install(byte[] bdmArchive, long userId)
    Deploys a Business Data Model / repository
    boolean
     
    boolean
    isDeployed(byte[] bdmArchive)
    Determine if the given BDM archive is equivalent to the currently deployed BDM.
    void
    Undeploy Business Data Model
  • Method Details

    • install

      String install(byte[] bdmArchive, long userId) throws SBusinessDataRepositoryDeploymentException, org.bonitasoft.engine.business.data.InvalidBusinessDataModelException
      Deploys a Business Data Model / repository
      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 tech 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() throws SBusinessDataRepositoryException
      Undeploy Business Data Model
      Throws:
      SBusinessDataRepositoryException - if error occurs during undeployement
    • isBDMDeployed

      boolean isBDMDeployed()
    • getClientBDMZip

      byte[] getClientBDMZip() throws SBusinessDataRepositoryException
      Retrieve the client side BDM generated zip. This zip contains jars with BDM Pojos and DAOs
      Returns:
      the zip content
      Throws:
      SBusinessDataRepositoryException
    • dropAndUninstall

      void dropAndUninstall() throws SBusinessDataRepositoryException
      Throws:
      SBusinessDataRepositoryException
    • getInstalledBDMVersion

      String getInstalledBDMVersion() throws SBusinessDataRepositoryException
      Returns 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 SBusinessDataRepositoryException
      Returns 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, SBusinessDataRepositoryDeploymentException
      Determine 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 invalid
      SBusinessDataRepositoryDeploymentException - if the server jar generation of the given BDM fails