use of eu.bcvsolutions.idm.acc.dto.filter.SysProvisioningOperationFilter in project CzechIdMng by bcvsolutions.
the class DefaultSysProvisioningOperationService method findByBatchId.
@Override
@Transactional(readOnly = true)
public Page<SysProvisioningOperationDto> findByBatchId(UUID batchId, Pageable pageable) {
SysProvisioningOperationFilter filter = new SysProvisioningOperationFilter();
filter.setBatchId(batchId);
return this.find(filter, pageable);
}
use of eu.bcvsolutions.idm.acc.dto.filter.SysProvisioningOperationFilter in project CzechIdMng by bcvsolutions.
the class DefaultSysSystemEntityService method delete.
@Override
@Transactional
public void delete(SysSystemEntityDto systemEntityDto, BasePermission... permission) {
Assert.notNull(systemEntityDto);
//
SysProvisioningOperationFilter filter = new SysProvisioningOperationFilter();
filter.setSystemId(systemEntityDto.getSystem());
filter.setEntityType(systemEntityDto.getEntityType());
filter.setSystemEntity(systemEntityDto.getId());
if (provisioningOperationRepository.find(filter, null).getTotalElements() > 0) {
SysSystemDto system = DtoUtils.getEmbedded(systemEntityDto, SysSystemEntity_.system, SysSystemDto.class);
throw new ResultCodeException(AccResultCode.SYSTEM_ENTITY_DELETE_FAILED_HAS_OPERATIONS, ImmutableMap.of("uid", systemEntityDto.getUid(), "system", system.getName()));
}
//
// clear accounts - only link, can be rebuild
accountRepository.clearSystemEntity(systemEntityDto.getId());
//
super.delete(systemEntityDto, permission);
}
Aggregations