Search in sources :

Example 56 with IdmRoleTreeNodeDto

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

the class RoleTreeNodeDeleteProcessor method process.

@Override
public EventResult<IdmRoleTreeNodeDto> process(EntityEvent<IdmRoleTreeNodeDto> event) {
    IdmRoleTreeNodeDto roleTreeNode = event.getContent();
    // 
    if (roleTreeNode.getId() == null) {
        return new DefaultEventResult<>(event, this);
    }
    // 
    // delete all assigned roles gained by this automatic role by long running task
    RemoveAutomaticRoleTaskExecutor automaticRoleTask = AutowireHelper.createBean(RemoveAutomaticRoleTaskExecutor.class);
    automaticRoleTask.setAutomaticRoleId(roleTreeNode.getId());
    if (event.getPriority() == PriorityType.IMMEDIATE) {
        longRunningTaskManager.executeSync(automaticRoleTask);
        return new DefaultEventResult.Builder<>(event, this).build();
    }
    // 
    automaticRoleTask.setContinueOnException(true);
    if (longRunningTaskManager.isAsynchronous()) {
        automaticRoleTask.setRequireNewTransaction(true);
    }
    try {
        longRunningTaskManager.execute(automaticRoleTask);
    } catch (AcceptedException ex) {
        DefaultEventResult<IdmRoleTreeNodeDto> result = new DefaultEventResult<>(event, this);
        result.setSuspended(true);
        // 
        return result;
    }
    // 
    return new DefaultEventResult.Builder<>(event, this).build();
}
Also used : IdmRoleTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleTreeNodeDto) DefaultEventResult(eu.bcvsolutions.idm.core.api.event.DefaultEventResult) AcceptedException(eu.bcvsolutions.idm.core.api.exception.AcceptedException) RemoveAutomaticRoleTaskExecutor(eu.bcvsolutions.idm.core.scheduler.task.impl.RemoveAutomaticRoleTaskExecutor)

Example 57 with IdmRoleTreeNodeDto

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

the class IdmRoleTreeNodeController method delete.

@Override
@ResponseBody
@RequestMapping(value = "/{backendId}", method = RequestMethod.DELETE)
@PreAuthorize("hasAuthority('" + CoreGroupPermission.ROLETREENODE_DELETE + "')")
@ApiOperation(value = "Delete automatic role. Uses request!", nickname = "deleteRoleTreeNode", tags = { IdmRoleTreeNodeController.TAG }, authorizations = { @Authorization(value = SwaggerConfig.AUTHENTICATION_BASIC, scopes = { @AuthorizationScope(scope = CoreGroupPermission.ROLETREENODE_DELETE, description = "") }), @Authorization(value = SwaggerConfig.AUTHENTICATION_CIDMST, scopes = { @AuthorizationScope(scope = CoreGroupPermission.ROLETREENODE_DELETE, description = "") }) })
public ResponseEntity<?> delete(@ApiParam(value = "Automatic role's uuid identifier.", required = true) @PathVariable @NotNull String backendId) {
    IdmRoleTreeNodeDto automaticRole = this.getDto(backendId);
    Assert.notNull(automaticRole, "Automatic role is required.");
    requestService.deleteAutomaticRole(automaticRole, AutomaticRoleRequestType.TREE);
    // 
    throw new AcceptedException();
}
Also used : IdmRoleTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleTreeNodeDto) AcceptedException(eu.bcvsolutions.idm.core.api.exception.AcceptedException) ApiOperation(io.swagger.annotations.ApiOperation) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 58 with IdmRoleTreeNodeDto

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

the class IdmRoleTreeNodeController method post.

@Override
@ResponseBody
@RequestMapping(method = RequestMethod.POST)
@PreAuthorize("hasAuthority('" + CoreGroupPermission.ROLETREENODE_CREATE + "')" + " or hasAuthority('" + CoreGroupPermission.ROLETREENODE_UPDATE + "')")
@ApiOperation(value = "Create / update automatic role", nickname = "postRoleTreeNode", response = IdmRoleTreeNodeDto.class, tags = { IdmRoleTreeNodeController.TAG }, authorizations = { @Authorization(value = SwaggerConfig.AUTHENTICATION_BASIC, scopes = { @AuthorizationScope(scope = CoreGroupPermission.ROLETREENODE_CREATE, description = ""), @AuthorizationScope(scope = CoreGroupPermission.ROLETREENODE_UPDATE, description = "") }), @Authorization(value = SwaggerConfig.AUTHENTICATION_CIDMST, scopes = { @AuthorizationScope(scope = CoreGroupPermission.ROLETREENODE_CREATE, description = ""), @AuthorizationScope(scope = CoreGroupPermission.ROLETREENODE_UPDATE, description = "") }) }, notes = "If role has guarantee assigned, then automatic role has to be approved by him at first (configurable by entity event processor).")
public ResponseEntity<?> post(@Valid @RequestBody IdmRoleTreeNodeDto dto) {
    Assert.notNull(dto, "DTO is required.");
    IdmRoleTreeNodeDto result = requestService.createTreeAutomaticRole(dto);
    if (result == null) {
        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
    }
    return new ResponseEntity<>(toResource(result), HttpStatus.CREATED);
}
Also used : ResponseEntity(org.springframework.http.ResponseEntity) IdmRoleTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleTreeNodeDto) ApiOperation(io.swagger.annotations.ApiOperation) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 59 with IdmRoleTreeNodeDto

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

the class RoleDuplicateBulkActionIntegrationTest method testRemoveAutomaticRole.

@Test
public void testRemoveAutomaticRole() {
    // 
    // create new entity state with a different transactionId - has to be preserved
    TransactionContextHolder.clearContext();
    IdmEntityStateDto otherState = new IdmEntityStateDto();
    otherState.setOwnerId(UUID.randomUUID());
    otherState.setOwnerType("mock");
    otherState.setResult(new OperationResultDto.Builder(OperationState.CREATED).build());
    otherState.setInstanceId("mock");
    otherState = entityStateService.save(otherState);
    // 
    TransactionContextHolder.clearContext();
    // automatic role on sub role
    IdmRoleDto parentRole = createRole();
    IdmIdentityDto identity = getHelper().createIdentity((GuardedString) null);
    IdmTreeNodeDto treeNode = getHelper().createTreeNode();
    IdmIdentityContractDto contract = getHelper().getPrimeContract(identity);
    contract.setWorkPosition(treeNode.getId());
    contractService.save(contract);
    IdmRoleDto subRole = createRole();
    getHelper().createRoleComposition(parentRole, subRole);
    // create attributes, automatic roles etc.
    IdmAutomaticRoleAttributeDto automaticRoleAttribute = createAutomaticRole(subRole, identity.getUsername());
    IdmRoleTreeNodeDto automaticRoleTree = createAutomaticRole(subRole, treeNode);
    List<IdmIdentityRoleDto> assignedRoles = identityRoleService.findAllByIdentity(identity.getId());
    Assert.assertTrue(assignedRoles.stream().anyMatch(ir -> automaticRoleAttribute.getId().equals(ir.getAutomaticRole())));
    Assert.assertTrue(assignedRoles.stream().anyMatch(ir -> automaticRoleTree.getId().equals(ir.getAutomaticRole())));
    // 
    String targetEnvironment = getHelper().createName();
    IdmBulkActionDto bulkAction = findBulkAction(IdmRole.class, RoleDuplicateBulkAction.NAME);
    bulkAction.setIdentifiers(Sets.newHashSet(parentRole.getId()));
    bulkAction.getProperties().put(RoleDuplicateBulkAction.PROPERTY_ENVIRONMENT, targetEnvironment);
    bulkAction.getProperties().put(DuplicateRoleAutomaticByTreeProcessor.PARAMETER_INCLUDE_AUTOMATIC_ROLE, true);
    bulkAction.getProperties().put(DuplicateRoleCompositionProcessor.PARAMETER_INCLUDE_ROLE_COMPOSITION, true);
    IdmBulkActionDto processAction = bulkActionManager.processAction(bulkAction);
    // 
    checkResultLrt(processAction, 1l, null, null);
    // 
    IdmRoleDto duplicate = roleService.getByBaseCodeAndEnvironment(subRole.getBaseCode(), targetEnvironment);
    // 
    IdmAutomaticRoleAttributeDto duplicateAutomaticRoleAttribute = findAutomaticRolesByAttribute(duplicate).get(0);
    IdmRoleTreeNodeDto duplicateAtomaticRoleTree = findAutomaticRolesByTree(duplicate).get(0);
    // 
    assignedRoles = identityRoleService.findAllByIdentity(identity.getId());
    Assert.assertTrue(assignedRoles.stream().anyMatch(ir -> automaticRoleAttribute.getId().equals(ir.getAutomaticRole())));
    Assert.assertTrue(assignedRoles.stream().anyMatch(ir -> automaticRoleTree.getId().equals(ir.getAutomaticRole())));
    Assert.assertTrue(assignedRoles.stream().anyMatch(ir -> duplicateAutomaticRoleAttribute.getId().equals(ir.getAutomaticRole())));
    Assert.assertTrue(assignedRoles.stream().anyMatch(ir -> duplicateAtomaticRoleTree.getId().equals(ir.getAutomaticRole())));
    // 
    automaticRoleAttributeService.delete(automaticRoleAttribute);
    // 
    processAction = bulkActionManager.processAction(bulkAction);
    // 
    checkResultLrt(processAction, 1l, null, null);
    // 
    duplicate = roleService.getByBaseCodeAndEnvironment(subRole.getBaseCode(), targetEnvironment);
    // 
    Assert.assertTrue(findAutomaticRolesByAttribute(duplicate).isEmpty());
    Assert.assertNotNull(entityStateService.get(otherState));
}
Also used : IdmEntityStateDto(eu.bcvsolutions.idm.core.api.dto.IdmEntityStateDto) IdmRoleTreeNodeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleTreeNodeFilter) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) Autowired(org.springframework.beans.factory.annotation.Autowired) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) CodeableEvaluator(eu.bcvsolutions.idm.core.security.evaluator.CodeableEvaluator) IdmAutomaticRoleAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeDto) CoreGroupPermission(eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission) IdmAuthorizationPolicyFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmAuthorizationPolicyFilter) IdmAutomaticRoleAttributeRuleDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeRuleDto) After(org.junit.After) TransactionContextHolder(eu.bcvsolutions.idm.core.api.domain.TransactionContextHolder) IdmRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleFilter) IdmEntityStateService(eu.bcvsolutions.idm.core.api.service.IdmEntityStateService) AutomaticRoleAttributeRuleType(eu.bcvsolutions.idm.core.api.domain.AutomaticRoleAttributeRuleType) IdmIdentity(eu.bcvsolutions.idm.core.model.entity.IdmIdentity) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) IdmTreeType(eu.bcvsolutions.idm.core.model.entity.IdmTreeType) DuplicateRoleAutomaticByTreeProcessor(eu.bcvsolutions.idm.core.model.event.processor.role.DuplicateRoleAutomaticByTreeProcessor) IdmRoleCompositionService(eu.bcvsolutions.idm.core.api.service.IdmRoleCompositionService) UUID(java.util.UUID) DuplicateRoleFormAttributeProcessor(eu.bcvsolutions.idm.core.model.event.processor.role.DuplicateRoleFormAttributeProcessor) Sets(com.google.common.collect.Sets) IdmEntityStateDto(eu.bcvsolutions.idm.core.api.dto.IdmEntityStateDto) List(java.util.List) DuplicateRoleCompositionProcessor(eu.bcvsolutions.idm.core.model.event.processor.role.DuplicateRoleCompositionProcessor) IdmAutomaticRoleAttributeRuleService(eu.bcvsolutions.idm.core.api.service.IdmAutomaticRoleAttributeRuleService) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmAutomaticRoleAttributeService(eu.bcvsolutions.idm.core.api.service.IdmAutomaticRoleAttributeService) IdmRole(eu.bcvsolutions.idm.core.model.entity.IdmRole) IdmRoleFormAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleFormAttributeDto) IdmRoleTreeNodeService(eu.bcvsolutions.idm.core.api.service.IdmRoleTreeNodeService) IdmRoleCompositionDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleCompositionDto) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) DuplicateRoleAuthorizationPolicyProcessor(eu.bcvsolutions.idm.core.model.event.processor.role.DuplicateRoleAuthorizationPolicyProcessor) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) IdmBasePermission(eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission) OperationResultDto(eu.bcvsolutions.idm.core.api.dto.OperationResultDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmRoleFormAttributeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleFormAttributeFilter) Before(org.junit.Before) IdmIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService) IdmRole_(eu.bcvsolutions.idm.core.model.entity.IdmRole_) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleService) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) Test(org.junit.Test) IdmCodeList(eu.bcvsolutions.idm.core.eav.entity.IdmCodeList) IdmRoleFormAttributeService(eu.bcvsolutions.idm.core.api.service.IdmRoleFormAttributeService) ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) IdmRoleTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleTreeNodeDto) IdmAutomaticRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmAutomaticRoleFilter) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) IdmTreeNode(eu.bcvsolutions.idm.core.model.entity.IdmTreeNode) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmAuthorizationPolicyDto(eu.bcvsolutions.idm.core.api.dto.IdmAuthorizationPolicyDto) AutomaticRoleAttributeRuleComparison(eu.bcvsolutions.idm.core.api.domain.AutomaticRoleAttributeRuleComparison) IdmIdentity_(eu.bcvsolutions.idm.core.model.entity.IdmIdentity_) IdmAuthorizationPolicyService(eu.bcvsolutions.idm.core.api.service.IdmAuthorizationPolicyService) Assert(org.junit.Assert) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmRoleTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleTreeNodeDto) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmAutomaticRoleAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) Test(org.junit.Test)

Example 60 with IdmRoleTreeNodeDto

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

the class RoleDeleteBulkActionIntegrationTest method testForceDeleteAsync.

@Test
public void testForceDeleteAsync() {
    logout();
    loginAsAdmin();
    // create identities
    String description = getHelper().createName();
    IdmIdentityDto identity = getHelper().createIdentity((GuardedString) null);
    identity.setDescription(description);
    IdmIdentityDto identityOne = identityService.save(identity);
    identity = getHelper().createIdentity((GuardedString) null);
    identity.setDescription(description);
    IdmIdentityDto identityTwo = identityService.save(identity);
    // create roles
    IdmRoleDto role = getHelper().createRole();
    IdmRoleDto roleSubOne = getHelper().createRole();
    IdmRoleDto roleSubTwo = getHelper().createRole();
    IdmRoleDto roleSubSubOne = getHelper().createRole();
    // create business roles
    IdmRoleCompositionDto compositionOne = getHelper().createRoleComposition(role, roleSubOne);
    IdmRoleCompositionDto compositionTwo = getHelper().createRoleComposition(role, roleSubTwo);
    IdmRoleCompositionDto compositionThree = getHelper().createRoleComposition(roleSubOne, roleSubSubOne);
    // create automatic roles - by tree and by attribute too
    IdmAutomaticRoleAttributeDto automaticRoleOne = getHelper().createAutomaticRole(role.getId());
    getHelper().createAutomaticRoleRule(automaticRoleOne.getId(), AutomaticRoleAttributeRuleComparison.EQUALS, AutomaticRoleAttributeRuleType.IDENTITY, IdmIdentity_.description.getName(), null, description);
    IdmAutomaticRoleAttributeDto automaticRoleTwo = getHelper().createAutomaticRole(role.getId());
    getHelper().createAutomaticRoleRule(automaticRoleTwo.getId(), AutomaticRoleAttributeRuleComparison.EQUALS, AutomaticRoleAttributeRuleType.IDENTITY, IdmIdentity_.description.getName(), null, description);
    IdmTreeNodeDto treeNode = getHelper().createTreeNode();
    IdmIdentityContractDto contract = getHelper().getPrimeContract(identityOne);
    contract.setWorkPosition(treeNode.getId());
    contractService.save(contract);
    contract = getHelper().getPrimeContract(identityTwo);
    contract.setWorkPosition(treeNode.getId());
    contractService.save(contract);
    IdmRoleTreeNodeDto automaticRoleThree = getHelper().createRoleTreeNode(role, treeNode, false);
    IdmRoleTreeNodeDto automaticRoleFour = getHelper().createRoleTreeNode(role, treeNode, false);
    // create manuallyAssigned roles
    getHelper().createIdentityRole(identityOne, role);
    getHelper().createIdentityRole(identityOne, role);
    getHelper().createIdentityRole(identityTwo, role);
    getHelper().createIdentityRole(identityTwo, role);
    Assert.assertEquals(24, identityRoleService.findAllByIdentity(identityOne.getId()).size());
    Assert.assertEquals(24, identityRoleService.findAllByIdentity(identityTwo.getId()).size());
    // remove role async
    try {
        getHelper().enableAsynchronousProcessing();
        Map<String, Object> properties = new HashMap<>();
        properties.put(RoleProcessor.PROPERTY_FORCE_DELETE, Boolean.TRUE);
        // delete by bulk action
        IdmBulkActionDto bulkAction = this.findBulkAction(IdmRole.class, RoleDeleteBulkAction.NAME);
        bulkAction.setIdentifiers(Sets.newHashSet(role.getId()));
        bulkAction.setProperties(properties);
        IdmBulkActionDto processAction = bulkActionManager.processAction(bulkAction);
        // 
        getHelper().waitForResult(res -> {
            return roleService.get(role) != null;
        });
        checkResultLrt(processAction, 1l, 0l, 0l);
        // 
        Assert.assertTrue(identityRoleService.findAllByIdentity(identityOne.getId()).isEmpty());
        Assert.assertTrue(identityRoleService.findAllByIdentity(identityTwo.getId()).isEmpty());
        Assert.assertNull(roleCompositionService.get(compositionOne));
        Assert.assertNull(roleCompositionService.get(compositionTwo));
        Assert.assertNotNull(roleCompositionService.get(compositionThree));
        Assert.assertNull(automaticRoleAttributeService.get(automaticRoleOne));
        Assert.assertNull(automaticRoleAttributeService.get(automaticRoleTwo));
        Assert.assertNull(roleTreeNodeService.get(automaticRoleThree));
        Assert.assertNull(roleTreeNodeService.get(automaticRoleFour));
        Assert.assertNull(roleService.get(role));
        Assert.assertNotNull(roleService.get(roleSubOne));
        Assert.assertNotNull(roleService.get(roleSubTwo));
        Assert.assertNotNull(roleService.get(roleSubSubOne));
    } finally {
        getHelper().disableAsynchronousProcessing();
    }
}
Also used : IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmRoleTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleTreeNodeDto) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) HashMap(java.util.HashMap) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) IdmAutomaticRoleAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeDto) IdmRoleCompositionDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleCompositionDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) Test(org.junit.Test)

Aggregations

IdmRoleTreeNodeDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleTreeNodeDto)83 Test (org.junit.Test)56 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)48 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)46 IdmTreeNodeDto (eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto)42 IdmIdentityRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto)39 IdmIdentityContractDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)38 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)38 UUID (java.util.UUID)32 Autowired (org.springframework.beans.factory.annotation.Autowired)20 IdmContractPositionDto (eu.bcvsolutions.idm.core.api.dto.IdmContractPositionDto)19 ResultCodeException (eu.bcvsolutions.idm.core.api.exception.ResultCodeException)19 GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)19 List (java.util.List)19 AcceptedException (eu.bcvsolutions.idm.core.api.exception.AcceptedException)18 ProcessAutomaticRoleByTreeTaskExecutor (eu.bcvsolutions.idm.core.scheduler.task.impl.ProcessAutomaticRoleByTreeTaskExecutor)18 OperationState (eu.bcvsolutions.idm.core.api.domain.OperationState)17 Transactional (org.springframework.transaction.annotation.Transactional)17 IdmIdentityRoleService (eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService)16 Assert (org.junit.Assert)16