private void checkIfItIsPossibleToDeleteProcessInstance(final long processDefinitionId, final boolean canThrowException) throws DeletionException { if (canThrowException) { throw new DeletionException("Some active process instances are still found, process #" + processDefinitionId + " can't be deleted."); } }
public void delete(final long id) throws DeletionException { try { service.deleteCustomUserInfoDefinition(id); } catch (SIdentityException e) { throw new DeletionException(e); } }
public void deleteApplication(final long applicationId) throws DeletionException { try { applicationService.deleteApplication(applicationId); } catch (final SBonitaException e) { throw new DeletionException(e); } }
public void deleteApplication(final long applicationId) throws DeletionException { try { applicationService.deleteApplication(applicationId); } catch (final SBonitaException e) { throw new DeletionException(e); } }
public void delete(final long id) throws DeletionException { try { service.deleteCustomUserInfoDefinition(id); } catch (SIdentityException e) { throw new DeletionException(e); } }
private void unregister(final DeleteSCommand deleteCommand) throws CommandNotFoundException, DeletionException { try { deleteCommand.execute(); } catch (final SCommandNotFoundException scnfe) { throw new CommandNotFoundException(scnfe); } catch (final SBonitaException sbe) { throw new DeletionException(sbe); } }
@Override public void unregisterAll() throws DeletionException { final CommandService commandService = getTenantAccessor().getCommandService(); try { commandService.deleteAll(); } catch (final SCommandDeletionException sde) { throw new DeletionException(sde); } }
public void deletePage(final long pageId) throws DeletionException { try { pageService.deletePage(pageId); final Set<Long> processDefinitionIds = updatePageMappings(pageId); for (final Long processDefinitionId : processDefinitionIds) { updateProcessResolution(processDefinitionId); } } catch (final SBonitaException e) { throw new DeletionException(e); } }
@Override public void deleteUserMembership(final long userMembershipId) throws DeletionException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final IdentityService identityService = tenantAccessor.getIdentityService(); try { identityService.deleteUserMembership(userMembershipId); } catch (final SIdentityException e) { throw new DeletionException(e); } }
public void deletePage(final long pageId) throws DeletionException { try { pageService.deletePage(pageId); final Set<Long> processDefinitionIds = updatePageMappings(pageId); for (final Long processDefinitionId : processDefinitionIds) { updateProcessResolution(processDefinitionId); } } catch (final SBonitaException e) { throw new DeletionException(e); } }
@Override public void removeCategoriesFromProcess(final long processDefinitionId, final List<Long> categoryIds) throws DeletionException { try { final CategoryService categoryService = getTenantAccessor().getCategoryService(); final TransactionContent transactionContent = new RemoveCategoriesFromProcessDefinition(processDefinitionId, categoryIds, categoryService); transactionContent.execute(); } catch (final SBonitaException sbe) { throw new DeletionException(sbe); } }
@Override public void unregister(final String name) throws CommandNotFoundException, DeletionException { if (name == null) { // FIXME: throw IllegalArgumentException instead, and make bonita interceptor catch all exceptions and wrap it into BonitaRuntimeException: throw new DeletionException("Command name can not be null!"); } final CommandService commandService = getTenantAccessor().getCommandService(); final DeleteSCommand deleteCommand = new DeleteSCommand(commandService, name); unregister(deleteCommand); }
@Override public void removeCategoriesFromProcess(final long processDefinitionId, final List<Long> categoryIds) throws DeletionException { try { final CategoryService categoryService = getTenantAccessor().getCategoryService(); final TransactionContent transactionContent = new RemoveCategoriesFromProcessDefinition(processDefinitionId, categoryIds, categoryService); transactionContent.execute(); } catch (final SBonitaException sbe) { throw new DeletionException(sbe); } }
@Override public void unregister(final String name) throws CommandNotFoundException, DeletionException { if (name == null) { // FIXME: throw IllegalArgumentException instead, and make bonita interceptor catch all exceptions and wrap it into BonitaRuntimeException: throw new DeletionException("Command name can not be null!"); } final CommandService commandService = getTenantAccessor().getCommandService(); final DeleteSCommand deleteCommand = new DeleteSCommand(commandService, name); unregister(deleteCommand); }
@Override public void deleteUserMembership(final long userId, final long groupId, final long roleId) throws DeletionException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final IdentityService identityService = tenantAccessor.getIdentityService(); try { identityService.deleteLightUserMembership(identityService.getLightUserMembership(userId, groupId, roleId)); } catch (final SIdentityException e) { throw new DeletionException(e); } }
@Override public void deleteUserMembership(final long userId, final long groupId, final long roleId) throws DeletionException { final TenantServiceAccessor tenantAccessor = getTenantAccessor(); final IdentityService identityService = tenantAccessor.getIdentityService(); try { identityService.deleteLightUserMembership(identityService.getLightUserMembership(userId, groupId, roleId)); } catch (final SIdentityException e) { throw new DeletionException(e); } }
public void deleteApplicationPage(final long applicationPageId) throws DeletionException { try { final SApplicationPage deletedApplicationPage = applicationService.deleteApplicationPage(applicationPageId); final SApplicationUpdateBuilder appBbuilder = BuilderFactory.get(SApplicationUpdateBuilderFactory.class).createNewInstance(loggedUserId); applicationService.updateApplication(deletedApplicationPage.getApplicationId(), appBbuilder.done()); } catch (final SBonitaException e) { throw new DeletionException(e); } }
public void deleteApplicationMenu(final long applicationMenuId) throws DeletionException { try { final SApplicationMenu deletedApplicationMenu = applicationService.deleteApplicationMenu(applicationMenuId); applicationService.updateApplication(deletedApplicationMenu.getApplicationId(), BuilderFactory.get(SApplicationUpdateBuilderFactory.class) .createNewInstance(loggedUserId).done()); } catch (final SBonitaException e) { throw new DeletionException(e); } }
public void deleteApplicationPage(final long applicationPageId) throws DeletionException { try { final SApplicationPage deletedApplicationPage = applicationService.deleteApplicationPage(applicationPageId); final SApplicationUpdateBuilder appBbuilder = BuilderFactory.get(SApplicationUpdateBuilderFactory.class).createNewInstance(loggedUserId); applicationService.updateApplication(deletedApplicationPage.getApplicationId(), appBbuilder.done()); } catch (final SBonitaException e) { throw new DeletionException(e); } }
public void deleteApplicationMenu(final long applicationMenuId) throws DeletionException { try { final SApplicationMenu deletedApplicationMenu = applicationService.deleteApplicationMenu(applicationMenuId); applicationService.updateApplication(deletedApplicationMenu.getApplicationId(), BuilderFactory.get(SApplicationUpdateBuilderFactory.class) .createNewInstance(loggedUserId).done()); } catch (final SBonitaException e) { throw new DeletionException(e); } }