@Override public void delete(String mappingProjectId) { dataService.deleteById(MAPPING_PROJECT, mappingProjectId); } }
@Override public void delete(String mappingProjectId) { dataService.deleteById(MAPPING_PROJECT, mappingProjectId); } }
@ResponseStatus(HttpStatus.OK) @DeleteMapping("/delete/{id}") public void deleteApp(@PathVariable("id") String id) { dataService.deleteById(AppMetadata.APP, id); }
@Override @Transactional public void deactivateApp(App app) { String pluginId = generatePluginId(app); dataService.deleteById(PluginMetadata.PLUGIN, pluginId); }
@Transactional @DeleteMapping("/{entityTypeId:^(?!i18n).+}/{id}") @ResponseStatus(NO_CONTENT) public void deleteEntity( @PathVariable("entityTypeId") String entityTypeId, @PathVariable("id") String untypedId) { EntityType entityType = dataService.getEntityType(entityTypeId); Object id = getTypedValue(untypedId, entityType.getIdAttribute()); if (ATTRIBUTE_META_DATA.equals(entityTypeId)) { dataService.getMeta().deleteAttributeById(id); } else { dataService.deleteById(entityTypeId, id); } }
private void registerNewIndexActionForDirtyJobs(IndexJobExecution indexJobExecution) { String id = indexJobExecution.getIndexActionJobID(); List<IndexAction> actions = dataService .findAll( IndexActionMetaData.INDEX_ACTION, new QueryImpl<IndexAction>().eq(IndexActionMetaData.INDEX_ACTION_GROUP_ATTR, id), IndexAction.class) .collect(Collectors.toList()); actions.forEach(this::registerIndexAction); dataService.delete(IndexJobExecutionMeta.INDEX_JOB_EXECUTION, indexJobExecution); dataService.deleteAll( IndexActionMetaData.INDEX_ACTION, actions.stream().map(IndexAction::getId)); dataService.deleteById(IndexActionGroupMetaData.INDEX_ACTION_GROUP, id); }
private void delete(String entityTypeId, String untypedId) { EntityType entityType = dataService.getEntityType(entityTypeId); Object id = getTypedValue(untypedId, entityType.getIdAttribute()); if (ATTRIBUTE_META_DATA.equals(entityTypeId)) { dataService.getMeta().deleteAttributeById(id); } else { dataService.deleteById(entityTypeId, id); } }
@PostMapping("/delete/{sortaJobExecutionId}") @ResponseStatus(value = HttpStatus.OK) public String deleteResult( @PathVariable("sortaJobExecutionId") String sortaJobExecutionId, Model model) { SortaJobExecution sortaJobExecution = findSortaJobExecution(sortaJobExecutionId); if (sortaJobExecution != null) { User currentUser = userAccountService.getCurrentUser(); if (currentUser.isSuperuser() || Objects.equal(sortaJobExecution.getUser().get(), currentUser.getUsername())) { RunAsSystemAspect.runAsSystem( () -> dataService.deleteById(SORTA_JOB_EXECUTION, sortaJobExecution.getIdentifier())); tryDeleteRepository(sortaJobExecution.getResultEntityName()); tryDeleteRepository(sortaJobExecution.getSourceEntityName()); } } return init(model); }
progress.progress(count, "Executed all index actions, cleaning up the actions..."); dataService.delete(INDEX_ACTION, indexActions.stream()); dataService.deleteById(INDEX_ACTION_GROUP, transactionId); progress.progress(count, "Cleaned up the actions.");