private void resolveDependenciesForAllProcesses() { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); tenantAccessor.getBusinessArchiveArtifactsManager().resolveDependenciesForAllProcesses(tenantAccessor); }
private void resolveDependenciesForAllProcesses() { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); tenantAccessor.getBusinessArchiveArtifactsManager().resolveDependenciesForAllProcesses(tenantAccessor); }
@Override @AvailableWhenTenantIsPaused public byte[] getClientBDMZip() throws BusinessDataRepositoryException { final BusinessDataModelRepository bdmRepository = getTenantAccessor().getBusinessDataModelRepository(); try { return bdmRepository.getClientBDMZip(); } catch (final SBusinessDataRepositoryException e) { throw new BusinessDataRepositoryException(e); } }
@Override @AvailableWhenTenantIsPaused public byte[] getClientBDMZip() throws BusinessDataRepositoryException { final BusinessDataModelRepository bdmRepository = getTenantAccessor().getBusinessDataModelRepository(); try { return bdmRepository.getClientBDMZip(); } catch (final SBusinessDataRepositoryException e) { throw new BusinessDataRepositoryException(e); } }
@Override @AvailableWhenTenantIsPaused public String getBusinessDataModelVersion() throws BusinessDataRepositoryException { try { final BusinessDataModelRepository modelRepository = getTenantAccessor().getBusinessDataModelRepository(); return modelRepository.getInstalledBDMVersion(); } catch (final SBusinessDataRepositoryException e) { throw new BusinessDataRepositoryException(e); } }
@Override @AvailableWhenTenantIsPaused public String getBusinessDataModelVersion() throws BusinessDataRepositoryException { try { final BusinessDataModelRepository modelRepository = getTenantAccessor().getBusinessDataModelRepository(); return modelRepository.getInstalledBDMVersion(); } catch (final SBusinessDataRepositoryException e) { throw new BusinessDataRepositoryException(e); } }
protected long getUserId() throws IllegalStateException { try { return getTenantAccessor().getSessionService().getSession(getSessionAccessor().getSessionId()).getUserId(); } catch (final Exception e) { throw new BonitaRuntimeException(e.getMessage()); } } }
protected long getUserId() throws IllegalStateException { try { return getTenantAccessor().getSessionService().getSession(getSessionAccessor().getSessionId()).getUserId(); } catch (final Exception e) { throw new BonitaRuntimeException(e.getMessage()); } } }
@Override @AvailableWhenTenantIsPaused(only = true) public void uninstallBusinessDataModel() throws BusinessDataRepositoryDeploymentException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); try { final BusinessDataModelRepository bdmRepository = tenantAccessor.getBusinessDataModelRepository(); bdmRepository.uninstall(tenantAccessor.getTenantId()); } catch (final SBusinessDataRepositoryException sbdre) { throw new BusinessDataRepositoryDeploymentException(sbdre); } }
protected TenantResource getTenantResource(TenantResourceType type) { TenantResourcesService tenantResourcesService = getTenantAccessor().getTenantResourcesService(); org.bonitasoft.engine.resources.TenantResourceType resourceType = org.bonitasoft.engine.resources.TenantResourceType .valueOf(type.name()); try { STenantResourceLight tenantResource = tenantResourcesService.getSingleLightResource(resourceType); return ModelConvertor.toTenantResource(tenantResource); } catch (SBonitaReadException e) { return TenantResource.NONE; } }
@Override @AvailableWhenTenantIsPaused(only = true) public void uninstallBusinessDataModel() throws BusinessDataRepositoryDeploymentException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); try { final BusinessDataModelRepository bdmRepository = tenantAccessor.getBusinessDataModelRepository(); bdmRepository.uninstall(tenantAccessor.getTenantId()); } catch (final SBusinessDataRepositoryException sbdre) { throw new BusinessDataRepositoryDeploymentException(sbdre); } }
@Override @AvailableWhenTenantIsPaused(only = true) public void cleanAndUninstallBusinessDataModel() throws BusinessDataRepositoryDeploymentException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); try { final BusinessDataModelRepository bdmRepository = tenantAccessor.getBusinessDataModelRepository(); bdmRepository.dropAndUninstall(tenantAccessor.getTenantId()); } catch (final SBusinessDataRepositoryException sbdre) { throw new BusinessDataRepositoryDeploymentException(sbdre); } }
protected TenantResource getTenantResource(TenantResourceType type) { TenantResourcesService tenantResourcesService = getTenantAccessor().getTenantResourcesService(); org.bonitasoft.engine.resources.TenantResourceType resourceType = org.bonitasoft.engine.resources.TenantResourceType .valueOf(type.name()); try { STenantResourceLight tenantResource = tenantResourcesService.getSingleLightResource(resourceType); return ModelConvertor.toTenantResource(tenantResource); } catch (SBonitaReadException e) { return TenantResource.NONE; } }
@Override @AvailableWhenTenantIsPaused(only = true) public void cleanAndUninstallBusinessDataModel() throws BusinessDataRepositoryDeploymentException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); try { final BusinessDataModelRepository bdmRepository = tenantAccessor.getBusinessDataModelRepository(); bdmRepository.dropAndUninstall(tenantAccessor.getTenantId()); } catch (final SBusinessDataRepositoryException sbdre) { throw new BusinessDataRepositoryDeploymentException(sbdre); } }
@Override @AvailableWhenTenantIsPaused(only = true) public String installBusinessDataModel(final byte[] zip) throws InvalidBusinessDataModelException, BusinessDataRepositoryDeploymentException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final long userId; try { userId = getUserId(); } catch (IllegalStateException e) { throw new BusinessDataRepositoryDeploymentException("Unable to determine user ID"); } try { final BusinessDataModelRepository bdmRepository = tenantAccessor.getBusinessDataModelRepository(); return bdmRepository.install(zip, tenantAccessor.getTenantId(), userId); } catch (final IllegalStateException e) { throw new InvalidBusinessDataModelException(e); } catch (final SBusinessDataRepositoryDeploymentException e) { throw new BusinessDataRepositoryDeploymentException(e); } }
@Override @AvailableWhenTenantIsPaused(only = true) public String installBusinessDataModel(final byte[] zip) throws InvalidBusinessDataModelException, BusinessDataRepositoryDeploymentException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final long userId; try { userId = getUserId(); } catch (IllegalStateException e) { throw new BusinessDataRepositoryDeploymentException("Unable to determine user ID"); } try { final BusinessDataModelRepository bdmRepository = tenantAccessor.getBusinessDataModelRepository(); return bdmRepository.install(zip, tenantAccessor.getTenantId(), userId); } catch (final IllegalStateException e) { throw new InvalidBusinessDataModelException(e); } catch (final SBusinessDataRepositoryDeploymentException e) { throw new BusinessDataRepositoryDeploymentException(e); } }