Search in sources :

Example 26 with IdmContractSliceFilter

use of eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter in project CzechIdMng by bcvsolutions.

the class IdentityContractDeleteProcessor method process.

@Override
public EventResult<IdmIdentityContractDto> process(EntityEvent<IdmIdentityContractDto> event) {
    IdmIdentityContractDto contract = event.getContent();
    UUID contractId = contract.getId();
    Assert.notNull(contractId, "Contract must have a ID!");
    boolean forceDelete = getBooleanProperty(PROPERTY_FORCE_DELETE, event.getProperties());
    // 
    // check contract can be deleted - cannot be deleted, when is controlled by slices
    IdmContractSliceFilter sliceFilter = new IdmContractSliceFilter();
    sliceFilter.setParentContract(contractId);
    if (contractSliceService.find(sliceFilter, null).getTotalElements() > 0) {
        // Cannot be enforced => contract cannot be deleted at all.
        throw new ResultCodeException(CoreResultCode.CONTRACT_IS_CONTROLLED_CANNOT_BE_DELETED, ImmutableMap.of("contractId", contractId));
    }
    // 
    // Find all concepts and remove relation on contract
    IdmConceptRoleRequestFilter conceptRequestFilter = new IdmConceptRoleRequestFilter();
    conceptRequestFilter.setIdentityContractId(contractId);
    conceptRequestService.find(conceptRequestFilter, null).getContent().forEach(concept -> {
        String message = null;
        if (concept.getState().isTerminatedState()) {
            message = MessageFormat.format("IdentityContract [{0}] (requested in concept [{1}]) was deleted (not from this role request)!", contractId, concept.getId());
        } else {
            message = MessageFormat.format("Request change in concept [{0}], was not executed, because requested IdentityContract [{1}] was deleted (not from this role request)!", concept.getId(), contractId);
            // Cancel concept and WF
            concept = conceptRequestService.cancel(concept);
        }
        IdmRoleRequestDto request = roleRequestService.get(concept.getRoleRequest());
        roleRequestService.addToLog(request, message);
        conceptRequestService.addToLog(concept, message);
        roleRequestService.save(request);
        conceptRequestService.save(concept);
    });
    // 
    // delete referenced roles
    List<IdmConceptRoleRequestDto> concepts = new ArrayList<>();
    identityRoleService.findAllByContract(contractId).forEach(identityRole -> {
        // but automatic roles has to be removed in the same request.
        if (identityRole.getDirectRole() == null) {
            IdmConceptRoleRequestDto conceptRoleRequest = new IdmConceptRoleRequestDto();
            conceptRoleRequest.setIdentityRole(identityRole.getId());
            conceptRoleRequest.setRole(identityRole.getRole());
            conceptRoleRequest.setOperation(ConceptRoleRequestOperation.REMOVE);
            // ignore not found
            conceptRoleRequest.setIdentityContract(contractId);
            // 
            concepts.add(conceptRoleRequest);
        }
    });
    if (forceDelete) {
        // ~ async with force
        IdmRoleRequestDto roleRequest = new IdmRoleRequestDto();
        roleRequest.setApplicant(contract.getIdentity());
        roleRequest.setConceptRoles(concepts);
        // 
        RoleRequestEvent requestEvent = new RoleRequestEvent(RoleRequestEventType.EXCECUTE, roleRequest);
        requestEvent.setPriority(PriorityType.HIGH);
        // 
        roleRequestService.startConcepts(requestEvent, event);
    } else {
        // ~ sync
        roleRequestService.executeConceptsImmediate(contract.getIdentity(), concepts);
    }
    // delete contract guarantees
    IdmContractGuaranteeFilter filter = new IdmContractGuaranteeFilter();
    filter.setIdentityContractId(contractId);
    contractGuaranteeService.find(filter, null).forEach(guarantee -> {
        contractGuaranteeService.delete(guarantee);
    });
    // delete contract positions
    IdmContractPositionFilter positionFilter = new IdmContractPositionFilter();
    positionFilter.setIdentityContractId(contractId);
    contractPositionService.find(positionFilter, null).forEach(position -> {
        contractPositionService.delete(position);
    });
    // 
    // delete all contract's delegations
    IdmDelegationDefinitionFilter delegationFilter = new IdmDelegationDefinitionFilter();
    delegationFilter.setDelegatorContractId(contractId);
    delegationDefinitionService.find(delegationFilter, null).forEach(delegation -> {
        delegationDefinitionService.delete(delegation);
    });
    // delete identity contract
    if (forceDelete) {
        LOG.debug("Contract [{}] should be deleted by caller after all asynchronus processes are completed.", contractId);
        // 
        // dirty flag only - will be processed after asynchronous events ends
        IdmEntityStateDto stateDeleted = new IdmEntityStateDto();
        stateDeleted.setEvent(event.getId());
        stateDeleted.setResult(new OperationResultDto.Builder(OperationState.RUNNING).setModel(new DefaultResultModel(CoreResultCode.DELETED)).build());
        entityStateManager.saveState(contract, stateDeleted);
        // 
        // set disabled
        contract.setState(ContractState.DISABLED);
        service.saveInternal(contract);
    } else {
        service.deleteInternal(contract);
    }
    return new DefaultEventResult<>(event, this);
}
Also used : IdmEntityStateDto(eu.bcvsolutions.idm.core.api.dto.IdmEntityStateDto) DefaultResultModel(eu.bcvsolutions.idm.core.api.dto.DefaultResultModel) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) ArrayList(java.util.ArrayList) OperationResultDto(eu.bcvsolutions.idm.core.api.dto.OperationResultDto) IdmContractSliceFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter) RoleRequestEvent(eu.bcvsolutions.idm.core.model.event.RoleRequestEvent) IdmContractPositionFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractPositionFilter) IdmConceptRoleRequestFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmConceptRoleRequestFilter) IdmDelegationDefinitionFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmDelegationDefinitionFilter) DefaultEventResult(eu.bcvsolutions.idm.core.api.event.DefaultEventResult) IdmConceptRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmConceptRoleRequestDto) UUID(java.util.UUID) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto) IdmContractGuaranteeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractGuaranteeFilter)

Example 27 with IdmContractSliceFilter

use of eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter in project CzechIdMng by bcvsolutions.

the class ContractGuaranteeDeleteProcessor method checkControlledBySlices.

/**
 * Test if contract of the given contract guarantee has some slices.
 *
 * @param guarantee
 * @return
 */
private void checkControlledBySlices(EntityEvent<IdmContractGuaranteeDto> event) {
    IdmContractGuaranteeDto guarantee = event.getContent();
    if (getBooleanProperty(ContractSliceManager.SKIP_CHECK_FOR_SLICES, event.getProperties())) {
        return;
    }
    UUID contract = guarantee.getIdentityContract();
    IdmContractSliceFilter sliceFilter = new IdmContractSliceFilter();
    sliceFilter.setParentContract(contract);
    if (contract != null && sliceService.count(sliceFilter) > 0) {
        throw new ResultCodeException(CoreResultCode.CONTRACT_IS_CONTROLLED_GUARANTEE_CANNOT_BE_DELETED, ImmutableMap.of("contractId", contract));
    }
}
Also used : IdmContractGuaranteeDto(eu.bcvsolutions.idm.core.api.dto.IdmContractGuaranteeDto) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) IdmContractSliceFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter) UUID(java.util.UUID)

Example 28 with IdmContractSliceFilter

use of eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter in project CzechIdMng by bcvsolutions.

the class IdentityContractSaveProcessor method checkControlledBySlices.

/**
 * Test if contract has some slices.
 *
 * @param guarantee
 * @return
 * @since 11.0.0
 */
protected void checkControlledBySlices(EntityEvent<IdmIdentityContractDto> event) {
    IdmIdentityContractDto contract = event.getContent();
    if (getBooleanProperty(ContractSliceManager.SKIP_CHECK_FOR_SLICES, event.getProperties())) {
        return;
    }
    // 
    UUID contractId = contract.getId();
    IdmContractSliceFilter sliceFilter = new IdmContractSliceFilter();
    sliceFilter.setParentContract(contractId);
    if (contractId != null && contractSliceService.count(sliceFilter) > 0) {
        throw new ResultCodeException(CoreResultCode.CONTRACT_IS_CONTROLLED_CANNOT_BE_MODIFIED, ImmutableMap.of("contractId", contractId));
    }
}
Also used : ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) IdmContractSliceFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter) UUID(java.util.UUID) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)

Example 29 with IdmContractSliceFilter

use of eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter in project CzechIdMng by bcvsolutions.

the class ContractSliceManagerTest method deleteSliceTest.

@Test
public void deleteSliceTest() {
    IdmIdentityDto identity = helper.createIdentity();
    String contractCode = "contract-one";
    IdmContractSliceDto sliceFuture = helper.createContractSlice(identity, null, LocalDate.now().plusDays(10), null, LocalDate.now().plusDays(100));
    sliceFuture.setContractCode(contractCode);
    contractSliceService.save(sliceFuture);
    IdmContractSliceDto sliceCurrent = helper.createContractSlice(identity, null, LocalDate.now(), null, LocalDate.now().plusDays(50));
    sliceCurrent.setContractCode(contractCode);
    contractSliceService.save(sliceCurrent);
    IdmContractSliceDto slicePast = helper.createContractSlice(identity, null, LocalDate.now().minusDays(10), null, LocalDate.now().plusDays(200));
    slicePast.setContractCode(contractCode);
    contractSliceService.save(slicePast);
    IdmContractSliceFilter filter = new IdmContractSliceFilter();
    filter.setIdentity(identity.getId());
    List<IdmContractSliceDto> results = contractSliceService.find(filter, null).getContent();
    assertEquals(3, results.size());
    UUID parentContract = results.get(0).getParentContract();
    List<IdmContractSliceDto> slices = contractSliceManager.findAllSlices(parentContract);
    assertEquals(3, slices.size());
    IdmContractSliceDto validSlice = contractSliceManager.findValidSlice(parentContract);
    // Valid slice should be currentSlice
    assertEquals(sliceCurrent, validSlice);
    // Check created contract by that slice
    IdmIdentityContractFilter contractFilter = new IdmIdentityContractFilter();
    contractFilter.setIdentity(identity.getId());
    List<IdmIdentityContractDto> resultsContract = // 
    contractService.find(filter, null).getContent().stream().filter(// 
    c -> contractService.get(c.getId()).getControlledBySlices()).collect(Collectors.toList());
    assertEquals(1, resultsContract.size());
    // Current slice should be contract
    IdmIdentityContractDto contract = resultsContract.get(0);
    assertTrue(contract.isValid());
    assertEquals(sliceCurrent.getContractValidFrom(), contract.getValidFrom());
    // Delete the current slice
    contractSliceService.delete(contractSliceService.get(sliceCurrent.getId()));
    slices = contractSliceManager.findAllSlices(parentContract);
    assertEquals(2, slices.size());
    validSlice = contractSliceManager.findValidSlice(parentContract);
    // Valid slice should be slicePast now
    assertEquals(slicePast, validSlice);
    List<IdmContractSliceDto> unvalidSlices = contractSliceManager.findUnvalidSlices(null).getContent();
    assertEquals(0, unvalidSlices.size());
    // Reload the contract
    contract = contractService.get(contract.getId());
    assertTrue(contract.isValid());
    assertEquals(slicePast.getContractValidFrom(), contract.getValidFrom());
    assertEquals(slicePast.getContractValidTill(), contract.getValidTill());
}
Also used : IdmContractSliceGuaranteeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceGuaranteeFilter) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmIdentityContract(eu.bcvsolutions.idm.core.model.entity.IdmIdentityContract) ContractSliceEventType(eu.bcvsolutions.idm.core.model.event.ContractSliceEvent.ContractSliceEventType) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) Autowired(org.springframework.beans.factory.annotation.Autowired) ClearDirtyStateForContractSliceTaskExecutor(eu.bcvsolutions.idm.core.scheduler.task.impl.ClearDirtyStateForContractSliceTaskExecutor) ConfigurationService(eu.bcvsolutions.idm.core.api.service.ConfigurationService) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) ContractSliceEvent(eu.bcvsolutions.idm.core.model.event.ContractSliceEvent) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) BigDecimal(java.math.BigDecimal) Map(java.util.Map) After(org.junit.After) ContractSliceConfiguration(eu.bcvsolutions.idm.core.api.config.domain.ContractSliceConfiguration) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) ImmutableMap(com.google.common.collect.ImmutableMap) IdmEntityStateFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmEntityStateFilter) UUID(java.util.UUID) Page(org.springframework.data.domain.Page) Collectors(java.util.stream.Collectors) IdmEntityStateDto(eu.bcvsolutions.idm.core.api.dto.IdmEntityStateDto) SelectCurrentContractSliceTaskExecutor(eu.bcvsolutions.idm.core.scheduler.task.impl.SelectCurrentContractSliceTaskExecutor) List(java.util.List) Assert.assertFalse(org.junit.Assert.assertFalse) LocalDate(java.time.LocalDate) IdmContractSliceFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter) DefaultResultModel(eu.bcvsolutions.idm.core.api.dto.DefaultResultModel) IdmIdentityContractFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityContractFilter) IdmContractSliceService(eu.bcvsolutions.idm.core.api.service.IdmContractSliceService) HashMap(java.util.HashMap) IdmContractSliceGuaranteeDto(eu.bcvsolutions.idm.core.api.dto.IdmContractSliceGuaranteeDto) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) IdmContractSliceDto(eu.bcvsolutions.idm.core.api.dto.IdmContractSliceDto) EntityStateManager(eu.bcvsolutions.idm.core.api.service.EntityStateManager) Lists(com.google.common.collect.Lists) OperationResultDto(eu.bcvsolutions.idm.core.api.dto.OperationResultDto) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) TestHelper(eu.bcvsolutions.idm.test.api.TestHelper) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) IdmContractSliceGuaranteeService(eu.bcvsolutions.idm.core.api.service.IdmContractSliceGuaranteeService) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmLongRunningTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmLongRunningTaskService) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) Before(org.junit.Before) IdmContractSlice(eu.bcvsolutions.idm.core.model.entity.IdmContractSlice) LongRunningTaskManager(eu.bcvsolutions.idm.core.scheduler.api.service.LongRunningTaskManager) Assert.assertNotNull(org.junit.Assert.assertNotNull) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) Assert.assertTrue(org.junit.Assert.assertTrue) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) Test(org.junit.Test) EventContext(eu.bcvsolutions.idm.core.api.event.EventContext) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) Assert.assertNull(org.junit.Assert.assertNull) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) CoreResultCode(eu.bcvsolutions.idm.core.api.domain.CoreResultCode) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) ContractSliceManager(eu.bcvsolutions.idm.core.api.service.ContractSliceManager) IdmIdentityContractFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityContractFilter) IdmContractSliceFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) UUID(java.util.UUID) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmContractSliceDto(eu.bcvsolutions.idm.core.api.dto.IdmContractSliceDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 30 with IdmContractSliceFilter

use of eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter in project CzechIdMng by bcvsolutions.

the class ContractSliceManagerTest method testDeleteEAVOnSlice.

@Test
public void testDeleteEAVOnSlice() {
    IdmIdentityDto identity = helper.createIdentity();
    String contractCode = "contract-one";
    IdmContractSliceDto slice = helper.createContractSlice(identity, null, null, null, null);
    slice.setContractCode(contractCode);
    slice = contractSliceService.save(slice);
    // Init form definition for identity-contract
    IdmFormDefinitionDto definition = this.initIdentityContractFormDefinition();
    // Create slice with EAV values
    IdmFormInstanceDto formInstanceDto = formService.getFormInstance(slice, definition);
    Assert.assertNotNull(formInstanceDto);
    Assert.assertNotNull(formInstanceDto.getFormDefinition());
    Assert.assertEquals(0, formInstanceDto.getValues().size());
    IdmFormAttributeDto attribute = formInstanceDto.getMappedAttributeByCode(NUMBER_OF_FINGERS);
    formService.saveValues(slice, attribute, Lists.newArrayList(BigDecimal.TEN));
    // We need to save slice for invoke save slice to the contract
    slice = contractSliceService.save(slice);
    formInstanceDto = formService.getFormInstance(slice, definition);
    Assert.assertNotNull(formInstanceDto);
    Assert.assertNotNull(formInstanceDto.getFormDefinition());
    Assert.assertEquals(1, formInstanceDto.getValues().size());
    Assert.assertEquals(BigDecimal.TEN.longValue(), ((BigDecimal) formInstanceDto.getValues().get(0).getValue()).longValue());
    IdmContractSliceFilter filter = new IdmContractSliceFilter();
    filter.setIdentity(identity.getId());
    List<IdmContractSliceDto> results = contractSliceService.find(filter, null).getContent();
    assertEquals(1, results.size());
    IdmContractSliceDto createdSlice = results.get(0);
    assertTrue(createdSlice.isValid());
    assertEquals(null, createdSlice.getValidTill());
    // Check created contract by that slice
    IdmIdentityContractFilter contractFilter = new IdmIdentityContractFilter();
    contractFilter.setIdentity(identity.getId());
    List<IdmIdentityContractDto> resultsContract = // 
    contractService.find(filter, null).getContent().stream().filter(// 
    c -> contractService.get(c.getId()).getControlledBySlices()).collect(Collectors.toList());
    // 
    assertEquals(1, resultsContract.size());
    IdmIdentityContractDto contract = resultsContract.get(0);
    assertEquals(slice.getContractValidFrom(), contract.getValidFrom());
    assertEquals(slice.getContractValidTill(), contract.getValidTill());
    assertTrue(contract.isValidNowOrInFuture());
    IdmFormInstanceDto contractFormInstanceDto = formService.getFormInstance(contract);
    Assert.assertNotNull(contractFormInstanceDto);
    Assert.assertNotNull(contractFormInstanceDto.getFormDefinition());
    Assert.assertEquals(1, contractFormInstanceDto.getValues().size());
    Assert.assertEquals(BigDecimal.TEN.longValue(), ((BigDecimal) contractFormInstanceDto.getValues().get(0).getValue()).longValue());
    formService.saveValues(slice, attribute, null);
    // We need to save slice for invoke save slice to the contract
    slice = contractSliceService.save(slice);
    contractFormInstanceDto = formService.getFormInstance(contract);
    Assert.assertNotNull(contractFormInstanceDto);
    Assert.assertNotNull(contractFormInstanceDto.getFormDefinition());
    Assert.assertEquals(0, contractFormInstanceDto.getValues().size());
}
Also used : IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmContractSliceGuaranteeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceGuaranteeFilter) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmIdentityContract(eu.bcvsolutions.idm.core.model.entity.IdmIdentityContract) ContractSliceEventType(eu.bcvsolutions.idm.core.model.event.ContractSliceEvent.ContractSliceEventType) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) Autowired(org.springframework.beans.factory.annotation.Autowired) ClearDirtyStateForContractSliceTaskExecutor(eu.bcvsolutions.idm.core.scheduler.task.impl.ClearDirtyStateForContractSliceTaskExecutor) ConfigurationService(eu.bcvsolutions.idm.core.api.service.ConfigurationService) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) ContractSliceEvent(eu.bcvsolutions.idm.core.model.event.ContractSliceEvent) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) BigDecimal(java.math.BigDecimal) Map(java.util.Map) After(org.junit.After) ContractSliceConfiguration(eu.bcvsolutions.idm.core.api.config.domain.ContractSliceConfiguration) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) ImmutableMap(com.google.common.collect.ImmutableMap) IdmEntityStateFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmEntityStateFilter) UUID(java.util.UUID) Page(org.springframework.data.domain.Page) Collectors(java.util.stream.Collectors) IdmEntityStateDto(eu.bcvsolutions.idm.core.api.dto.IdmEntityStateDto) SelectCurrentContractSliceTaskExecutor(eu.bcvsolutions.idm.core.scheduler.task.impl.SelectCurrentContractSliceTaskExecutor) List(java.util.List) Assert.assertFalse(org.junit.Assert.assertFalse) LocalDate(java.time.LocalDate) IdmContractSliceFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter) DefaultResultModel(eu.bcvsolutions.idm.core.api.dto.DefaultResultModel) IdmIdentityContractFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityContractFilter) IdmContractSliceService(eu.bcvsolutions.idm.core.api.service.IdmContractSliceService) HashMap(java.util.HashMap) IdmContractSliceGuaranteeDto(eu.bcvsolutions.idm.core.api.dto.IdmContractSliceGuaranteeDto) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) IdmContractSliceDto(eu.bcvsolutions.idm.core.api.dto.IdmContractSliceDto) EntityStateManager(eu.bcvsolutions.idm.core.api.service.EntityStateManager) Lists(com.google.common.collect.Lists) OperationResultDto(eu.bcvsolutions.idm.core.api.dto.OperationResultDto) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) TestHelper(eu.bcvsolutions.idm.test.api.TestHelper) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) IdmContractSliceGuaranteeService(eu.bcvsolutions.idm.core.api.service.IdmContractSliceGuaranteeService) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmLongRunningTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmLongRunningTaskService) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) Before(org.junit.Before) IdmContractSlice(eu.bcvsolutions.idm.core.model.entity.IdmContractSlice) LongRunningTaskManager(eu.bcvsolutions.idm.core.scheduler.api.service.LongRunningTaskManager) Assert.assertNotNull(org.junit.Assert.assertNotNull) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) Assert.assertTrue(org.junit.Assert.assertTrue) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) Test(org.junit.Test) EventContext(eu.bcvsolutions.idm.core.api.event.EventContext) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) Assert.assertNull(org.junit.Assert.assertNull) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) CoreResultCode(eu.bcvsolutions.idm.core.api.domain.CoreResultCode) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) ContractSliceManager(eu.bcvsolutions.idm.core.api.service.ContractSliceManager) IdmIdentityContractFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityContractFilter) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) IdmContractSliceFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmContractSliceDto(eu.bcvsolutions.idm.core.api.dto.IdmContractSliceDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Aggregations

IdmContractSliceFilter (eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceFilter)45 IdmContractSliceDto (eu.bcvsolutions.idm.core.api.dto.IdmContractSliceDto)32 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)29 Test (org.junit.Test)29 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)24 IdmIdentityContractDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)23 UUID (java.util.UUID)20 IdmTreeNodeDto (eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto)18 SysSyncContractConfigDto (eu.bcvsolutions.idm.acc.dto.SysSyncContractConfigDto)16 SysSystemDto (eu.bcvsolutions.idm.acc.dto.SysSystemDto)16 IdmIdentityContractFilter (eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityContractFilter)16 HashMap (java.util.HashMap)14 SysSyncLogDto (eu.bcvsolutions.idm.acc.dto.SysSyncLogDto)13 DefaultResultModel (eu.bcvsolutions.idm.core.api.dto.DefaultResultModel)13 IdmEntityStateDto (eu.bcvsolutions.idm.core.api.dto.IdmEntityStateDto)13 OperationResultDto (eu.bcvsolutions.idm.core.api.dto.OperationResultDto)13 IdmContractSliceGuaranteeFilter (eu.bcvsolutions.idm.core.api.dto.filter.IdmContractSliceGuaranteeFilter)13 IdmFormDefinitionDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto)13 ContractSliceEvent (eu.bcvsolutions.idm.core.model.event.ContractSliceEvent)13 LocalDate (java.time.LocalDate)13