Search in sources :

Example 1 with IdmRequestItemAttributeDto

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

the class DefaultRequestManager method getChanges.

@Override
public List<IdmRequestItemAttributeDto> getChanges(AbstractDto currentDto, AbstractDto changedDto, RequestOperationType itemOperation) {
    List<IdmRequestItemAttributeDto> resultAttributes = new ArrayList<>();
    Map<String, Object> currentFieldsValues = this.dtoToMap(currentDto);
    Map<String, Object> changedFieldsValues = this.dtoToMap(changedDto);
    // First add all new attributes
    changedFieldsValues.keySet().stream().forEach(changedAttribute -> {
        if (!currentFieldsValues.containsKey(changedAttribute)) {
            Object value = changedFieldsValues.get(changedAttribute);
            IdmRequestItemAttributeDto attribute = new IdmRequestItemAttributeDto(changedAttribute, value instanceof List, true);
            if (attribute.isMultivalue()) {
                if (value instanceof List) {
                    ((List<?>) value).forEach(v -> {
                        attribute.getValues().add(new IdmRequestAttributeValueDto(v, null, RequestOperationType.ADD));
                    });
                }
            } else {
                attribute.setValue(new IdmRequestAttributeValueDto(value, null, RequestOperationType.ADD));
            }
            resultAttributes.add(attribute);
        }
    });
    // Second add all already exists attributes
    currentFieldsValues.keySet().forEach(currentAttribute -> {
        Object changedValue = changedFieldsValues.get(currentAttribute);
        IdmRequestItemAttributeDto attribute;
        Object currentValue = currentFieldsValues.get(currentAttribute);
        attribute = new IdmRequestItemAttributeDto(currentAttribute, changedValue instanceof List, false);
        if (attribute.isMultivalue()) {
            if (changedValue instanceof List) {
                ((List<?>) changedValue).forEach(value -> {
                    if (currentValue instanceof List && ((List<?>) currentValue).contains(value)) {
                        attribute.getValues().add(new IdmRequestAttributeValueDto(value, value, null));
                    } else {
                        attribute.setChanged(true);
                        attribute.getValues().add(new IdmRequestAttributeValueDto(value, null, RequestOperationType.ADD));
                    }
                });
            }
            if (currentValue instanceof List) {
                ((List<?>) currentValue).forEach(value -> {
                    if (changedValue == null || !((List<?>) changedValue).contains(value)) {
                        attribute.setChanged(true);
                        attribute.getValues().add(new IdmRequestAttributeValueDto(value, value, RequestOperationType.REMOVE));
                    }
                });
            }
        } else {
            if ((changedValue == null && currentValue == null) || (changedValue != null && changedValue.equals(currentValue)) || (currentValue != null && currentValue.equals(changedValue))) {
                attribute.setChanged(RequestOperationType.UPDATE == itemOperation ? false : true);
                attribute.setValue(new IdmRequestAttributeValueDto(changedValue, currentValue, RequestOperationType.UPDATE == itemOperation ? null : itemOperation));
            } else {
                attribute.setChanged(true);
                attribute.setValue(new IdmRequestAttributeValueDto(changedValue, currentValue, itemOperation));
            }
        }
        resultAttributes.add(attribute);
    });
    // Make all values nicer
    // 
    resultAttributes.stream().filter(// 
    attribute -> attribute.getValue() != null).forEach(attribute -> {
        // 
        attribute.getValue().setValue(this.makeNiceValue(attribute.getValue().getValue()));
        attribute.getValue().setOldValue(this.makeNiceValue(attribute.getValue().getOldValue()));
        List<IdmRequestAttributeValueDto> attributeValues = attribute.getValues();
        attributeValues.forEach(attributeValue -> {
            attributeValue.setValue(this.makeNiceValue(attributeValue.getValue()));
            attributeValue.setOldValue(this.makeNiceValue(attributeValue.getOldValue()));
        });
    });
    return resultAttributes;
}
Also used : DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) IdmRequestItemDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemDto) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) Autowired(org.springframework.beans.factory.annotation.Autowired) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) SecurityService(eu.bcvsolutions.idm.core.security.api.service.SecurityService) Map(java.util.Map) IdmRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestDto) PageRequest(org.springframework.data.domain.PageRequest) Page(org.springframework.data.domain.Page) IntrospectionException(java.beans.IntrospectionException) Serializable(java.io.Serializable) InvocationTargetException(java.lang.reflect.InvocationTargetException) PropertyDescriptor(java.beans.PropertyDescriptor) Builder(eu.bcvsolutions.idm.core.api.dto.OperationResultDto.Builder) Lazy(org.springframework.context.annotation.Lazy) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) RequestOperationType(eu.bcvsolutions.idm.core.api.domain.RequestOperationType) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) Introspector(java.beans.Introspector) Strings(com.google.common.base.Strings) AbstractDto(eu.bcvsolutions.idm.core.api.dto.AbstractDto) IdmBasePermission(eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission) Lists(com.google.common.collect.Lists) BaseEntity(eu.bcvsolutions.idm.core.api.entity.BaseEntity) LookupService(eu.bcvsolutions.idm.core.api.service.LookupService) Service(org.springframework.stereotype.Service) WorkflowProcessInstanceService(eu.bcvsolutions.idm.core.workflow.service.WorkflowProcessInstanceService) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) Requestable(eu.bcvsolutions.idm.core.api.domain.Requestable) CoreException(eu.bcvsolutions.idm.core.api.exception.CoreException) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) IOException(java.io.IOException) Field(java.lang.reflect.Field) BaseFilter(eu.bcvsolutions.idm.core.api.dto.filter.BaseFilter) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmRequestItemService(eu.bcvsolutions.idm.core.api.service.IdmRequestItemService) CoreResultCode(eu.bcvsolutions.idm.core.api.domain.CoreResultCode) FormValueService(eu.bcvsolutions.idm.core.eav.api.service.FormValueService) RequestEventType(eu.bcvsolutions.idm.core.model.event.RequestEvent.RequestEventType) BaseDto(eu.bcvsolutions.idm.core.api.dto.BaseDto) EntityEventManager(eu.bcvsolutions.idm.core.api.service.EntityEventManager) Embedded(eu.bcvsolutions.idm.core.api.domain.Embedded) RequestEvent(eu.bcvsolutions.idm.core.model.event.RequestEvent) RequestState(eu.bcvsolutions.idm.core.api.domain.RequestState) RoleRequestException(eu.bcvsolutions.idm.core.api.exception.RoleRequestException) CoreGroupPermission(eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) BasePermission(eu.bcvsolutions.idm.core.security.api.domain.BasePermission) ProcessInstance(org.activiti.engine.runtime.ProcessInstance) Pageable(org.springframework.data.domain.Pageable) ImmutableMap(com.google.common.collect.ImmutableMap) Collection(java.util.Collection) ReadWriteDtoService(eu.bcvsolutions.idm.core.api.service.ReadWriteDtoService) RequestManager(eu.bcvsolutions.idm.core.api.service.RequestManager) AcceptedException(eu.bcvsolutions.idm.core.api.exception.AcceptedException) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) List(java.util.List) ExceptionUtils(eu.bcvsolutions.idm.core.api.utils.ExceptionUtils) Modifier(java.lang.reflect.Modifier) Entry(java.util.Map.Entry) Identifiable(eu.bcvsolutions.idm.core.api.domain.Identifiable) RoleRequestApprovalProcessor(eu.bcvsolutions.idm.core.model.event.processor.role.RoleRequestApprovalProcessor) PageImpl(org.springframework.data.domain.PageImpl) IdmRequestService(eu.bcvsolutions.idm.core.api.service.IdmRequestService) FormableEntity(eu.bcvsolutions.idm.core.eav.api.entity.FormableEntity) IdmRequestItem(eu.bcvsolutions.idm.core.model.entity.IdmRequestItem) HashMap(java.util.HashMap) MessageFormat(java.text.MessageFormat) ConfidentialStorage(eu.bcvsolutions.idm.core.api.service.ConfidentialStorage) ReadDtoService(eu.bcvsolutions.idm.core.api.service.ReadDtoService) RequestFilterPredicate(eu.bcvsolutions.idm.core.api.domain.RequestFilterPredicate) ImmutableList(com.google.common.collect.ImmutableList) CollectionUtils(org.apache.commons.collections.CollectionUtils) Propagation(org.springframework.transaction.annotation.Propagation) OperationResultDto(eu.bcvsolutions.idm.core.api.dto.OperationResultDto) EntityUtils(eu.bcvsolutions.idm.core.api.utils.EntityUtils) Qualifier(org.springframework.beans.factory.annotation.Qualifier) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore) Niceable(eu.bcvsolutions.idm.core.api.domain.Niceable) IdmRequestItemFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRequestItemFilter) EntityEvent(eu.bcvsolutions.idm.core.api.event.EntityEvent) Codeable(eu.bcvsolutions.idm.core.api.domain.Codeable) IdmRequestAttributeValueDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestAttributeValueDto) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IdmRequestItemChangesDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemChangesDto) MethodDescriptor(java.beans.MethodDescriptor) ApplicationContext(org.springframework.context.ApplicationContext) ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) IdmRequestItemAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemAttributeDto) Comparator(java.util.Comparator) IdmRequestFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRequestFilter) Transactional(org.springframework.transaction.annotation.Transactional) Assert(org.springframework.util.Assert) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) ImmutableList(com.google.common.collect.ImmutableList) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmRequestItemAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemAttributeDto) IdmRequestAttributeValueDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestAttributeValueDto)

Example 2 with IdmRequestItemAttributeDto

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

the class RequestManagerTest method testGetChangesOnCreateRoleByRequest.

@Test
public void testGetChangesOnCreateRoleByRequest() {
    IdmRoleDto newRole = new IdmRoleDto();
    newRole.setCode(getHelper().createName());
    newRole.setName(newRole.getCode());
    newRole.setPriority(10);
    newRole.setDescription(getHelper().createName());
    IdmRequestDto request = requestManager.createRequest(newRole);
    Assert.assertNotNull(request);
    Requestable requestable = requestManager.post(request.getId(), newRole);
    Assert.assertNotNull(requestable);
    IdmRequestItemChangesDto changes = requestManager.getChanges(requestItemService.get(requestable.getRequestItem()));
    Assert.assertNotNull(changes);
    List<IdmRequestItemAttributeDto> attributes = changes.getAttributes();
    attributes.forEach(attribute -> {
        Assert.assertEquals(RequestOperationType.ADD, attribute.getValue().getChange());
    });
}
Also used : IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) Requestable(eu.bcvsolutions.idm.core.api.domain.Requestable) IdmRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestDto) IdmRequestItemAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemAttributeDto) IdmRequestItemChangesDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemChangesDto) AbstractCoreWorkflowIntegrationTest(eu.bcvsolutions.idm.core.AbstractCoreWorkflowIntegrationTest) Test(org.junit.Test)

Example 3 with IdmRequestItemAttributeDto

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

the class DefaultRequestManager method getChanges.

@SuppressWarnings("unchecked")
@Override
public IdmRequestItemChangesDto getChanges(IdmRequestItemDto item, BasePermission... permission) {
    LOG.debug(MessageFormat.format("Start read request item with changes [{0}].", item));
    Assert.notNull(item, "Idm request item cannot be null!");
    if (Strings.isNullOrEmpty(item.getOwnerType()) || item.getOwnerId() == null) {
        return null;
    }
    Class<? extends Requestable> dtoClass;
    try {
        dtoClass = (Class<? extends Requestable>) Class.forName(item.getOwnerType());
    } catch (ClassNotFoundException e) {
        throw new CoreException(e);
    }
    ReadDtoService<?, ?> readService = getServiceByItem(item, dtoClass);
    Requestable currentDto = (Requestable) readService.get(item.getOwnerId(), permission);
    if (currentDto == null) {
        try {
            currentDto = (Requestable) dtoClass.getDeclaredConstructor().newInstance();
            currentDto.setId(item.getOwnerId());
        } catch (ReflectiveOperationException e) {
            throw new CoreException(e);
        }
    }
    Requestable changedDto = this.get(item.getRequest(), currentDto);
    RequestOperationType itemOperation = item.getOperation();
    List<IdmRequestItemAttributeDto> resultAttributes = getChanges((AbstractDto) currentDto, (AbstractDto) changedDto, itemOperation);
    IdmRequestItemChangesDto result = new IdmRequestItemChangesDto();
    result.setRequestItem(item);
    result.getAttributes().addAll(resultAttributes);
    LOG.debug(MessageFormat.format("End of reading the request item with changes [{0}].", item));
    return result;
}
Also used : CoreException(eu.bcvsolutions.idm.core.api.exception.CoreException) Requestable(eu.bcvsolutions.idm.core.api.domain.Requestable) RequestOperationType(eu.bcvsolutions.idm.core.api.domain.RequestOperationType) IdmRequestItemAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemAttributeDto) IdmRequestItemChangesDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemChangesDto)

Example 4 with IdmRequestItemAttributeDto

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

the class RequestManagerTest method testGetChangesEAV.

@Test
public void testGetChangesEAV() {
    // Create role
    IdmRoleDto role = getHelper().createRole();
    // Get definition
    IdmFormInstanceDto formInstance = formService.getFormInstance(role);
    // None values yet
    Assert.assertEquals(0, formInstance.getValues().size());
    IdmFormDefinitionDto formDefinition = formInstance.getFormDefinition();
    // Create form attributes
    IdmFormAttributeDto attributeShortText = new IdmFormAttributeDto();
    attributeShortText.setCode(getHelper().createName());
    attributeShortText.setName(attributeShortText.getCode());
    attributeShortText.setPersistentType(PersistentType.SHORTTEXT);
    attributeShortText.setFormDefinition(formDefinition.getId());
    attributeShortText = formService.saveAttribute(attributeShortText);
    IdmFormAttributeDto attributeBoolean = new IdmFormAttributeDto();
    attributeBoolean.setCode(getHelper().createName());
    attributeBoolean.setName(attributeBoolean.getCode());
    attributeBoolean.setPersistentType(PersistentType.BOOLEAN);
    attributeBoolean.setFormDefinition(formDefinition.getId());
    attributeBoolean = formService.saveAttribute(attributeBoolean);
    IdmFormAttributeDto attributeConfidential = new IdmFormAttributeDto();
    attributeConfidential.setCode(getHelper().createName());
    attributeConfidential.setName(attributeConfidential.getCode());
    attributeConfidential.setPersistentType(PersistentType.SHORTTEXT);
    attributeConfidential.setConfidential(true);
    attributeConfidential.setFormDefinition(formDefinition.getId());
    attributeConfidential = formService.saveAttribute(attributeConfidential);
    IdmFormAttributeDto attributeInt = new IdmFormAttributeDto();
    attributeInt.setCode(getHelper().createName());
    attributeInt.setName(attributeInt.getCode());
    attributeInt.setPersistentType(PersistentType.INT);
    attributeInt.setFormDefinition(formDefinition.getId());
    attributeInt = formService.saveAttribute(attributeInt);
    // Create request
    IdmRequestDto request = requestManager.createRequest(role);
    Assert.assertNotNull(request);
    IdmFormInstanceDto formInstanceRequest = requestManager.getFormInstance(request.getId(), role, formDefinition);
    // None values yet
    Assert.assertEquals(0, formInstanceRequest.getValues().size());
    IdmFormValueDto valueShortText = new IdmFormValueDto(attributeShortText);
    valueShortText.setValue(getHelper().createName());
    formInstanceRequest.getValues().add(valueShortText);
    IdmFormValueDto valueBoolean = new IdmFormValueDto(attributeBoolean);
    valueBoolean.setValue(true);
    formInstanceRequest.getValues().add(valueBoolean);
    IdmFormValueDto valueConfidential = new IdmFormValueDto(attributeConfidential);
    String confidentialValueString = getHelper().createName();
    valueConfidential.setValue(confidentialValueString);
    formInstanceRequest.getValues().add(valueConfidential);
    IdmFormValueDto valueInt = new IdmFormValueDto(attributeInt);
    valueInt.setValue(111);
    formInstanceRequest.getValues().add(valueInt);
    formDefinition = formService.getDefinition(IdmRoleDto.class);
    requestManager.saveFormInstance(request.getId(), role, formDefinition, formInstanceRequest.getValues());
    formInstanceRequest = requestManager.getFormInstance(request.getId(), role, formDefinition);
    // Four values in request
    Assert.assertEquals(4, formInstanceRequest.getValues().size());
    formInstance = formService.getFormInstance(role);
    // None values via standard service
    Assert.assertEquals(0, formInstance.getValues().size());
    formInstanceRequest.getValues().forEach(value -> {
        IdmRequestItemDto item = DtoUtils.getEmbedded(value, Requestable.REQUEST_ITEM_FIELD, IdmRequestItemDto.class);
        IdmRequestItemChangesDto changes = requestManager.getChanges(item);
        Assert.assertNotNull(changes);
        List<IdmRequestItemAttributeDto> attributes = changes.getAttributes();
        attributes.forEach(attribute -> {
            Assert.assertEquals(RequestOperationType.ADD, attribute.getValue().getChange());
        });
        IdmRequestItemAttributeDto attributeDto = attributes.stream().filter(attribute -> "stringValue".equals(attribute.getName())).findFirst().get();
        Assert.assertEquals(value.getStringValue(), attributeDto.getValue().getValue());
        attributeDto = attributes.stream().filter(attribute -> "booleanValue".equals(attribute.getName())).findFirst().get();
        Assert.assertEquals(value.getBooleanValue(), attributeDto.getValue().getValue());
        attributeDto = attributes.stream().filter(attribute -> "doubleValue".equals(attribute.getName())).findFirst().get();
        Assert.assertEquals(value.getDoubleValue(), attributeDto.getValue().getValue());
        attributeDto = attributes.stream().filter(attribute -> "longValue".equals(attribute.getName())).findFirst().get();
        Assert.assertEquals(value.getLongValue(), attributeDto.getValue().getValue());
        attributeDto = attributes.stream().filter(attribute -> "shortTextValue".equals(attribute.getName())).findFirst().get();
        Assert.assertEquals(value.getShortTextValue(), attributeDto.getValue().getValue());
    });
    request = requestManager.startRequest(request.getId(), true);
    Assert.assertEquals(RequestState.EXECUTED, request.getState());
    formInstance = formService.getFormInstance(role);
    // Four values via standard service
    Assert.assertEquals(4, formInstance.getValues().size());
    // All changes was applied, check on none changes
    formInstanceRequest = requestManager.getFormInstance(request.getId(), role, formDefinition);
    formInstanceRequest.getValues().forEach(value -> {
        IdmRequestItemDto item = DtoUtils.getEmbedded(value, Requestable.REQUEST_ITEM_FIELD, IdmRequestItemDto.class);
        IdmRequestItemChangesDto changes = requestManager.getChanges(item);
        Assert.assertNotNull(changes);
        List<IdmRequestItemAttributeDto> attributes = changes.getAttributes();
        attributes.forEach(attribute -> {
            Assert.assertEquals(attribute.getValue().getOldValue(), attribute.getValue().getValue());
        });
    });
    // Make changes
    final UUID attributeShortTextId = attributeShortText.getId();
    IdmFormValueDto changedValueShortText = new IdmFormValueDto(attributeShortText);
    changedValueShortText.setValue(getHelper().createName());
    // Create new request
    IdmRequestDto requestChange = requestManager.createRequest(role);
    Assert.assertNotNull(requestChange);
    // Create request items
    requestManager.saveFormInstance(requestChange.getId(), role, formDefinition, Lists.newArrayList(changedValueShortText));
    formInstanceRequest = requestManager.getFormInstance(requestChange.getId(), role, formDefinition);
    // One change in the request
    Assert.assertEquals(4, formInstanceRequest.getValues().size());
    IdmFormValueDto changedValueShortTextRequest = formInstanceRequest.getValues().stream().filter(value -> value.getFormAttribute().equals(attributeShortTextId)).findFirst().get();
    IdmRequestItemDto item = DtoUtils.getEmbedded(changedValueShortTextRequest, Requestable.REQUEST_ITEM_FIELD, IdmRequestItemDto.class);
    IdmRequestItemChangesDto changes = requestManager.getChanges(item);
    Assert.assertNotNull(changes);
    List<IdmRequestItemAttributeDto> attributes = changes.getAttributes();
    IdmRequestItemAttributeDto attributeDto = attributes.stream().filter(attribute -> "shortTextValue".equals(attribute.getName())).findFirst().get();
    Assert.assertNotEquals(attributeDto.getValue().getOldValue(), attributeDto.getValue().getValue());
    Assert.assertEquals(changedValueShortText.getShortTextValue(), attributeDto.getValue().getValue());
    // Delete attributes
    formService.deleteValues(role, attributeShortText);
    formService.deleteAttribute(attributeShortText);
    formService.deleteValues(role, attributeBoolean);
    formService.deleteAttribute(attributeBoolean);
    formService.deleteValues(role, attributeConfidential);
    formService.deleteAttribute(attributeConfidential);
    formService.deleteValues(role, attributeInt);
    formService.deleteAttribute(attributeInt);
}
Also used : IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) RequestOperationType(eu.bcvsolutions.idm.core.api.domain.RequestOperationType) DtoUtils(eu.bcvsolutions.idm.core.api.utils.DtoUtils) RequestState(eu.bcvsolutions.idm.core.api.domain.RequestState) IdmRequestItemDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemDto) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) WorkflowProcessInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowProcessInstanceDto) Autowired(org.springframework.beans.factory.annotation.Autowired) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) WorkflowTaskInstanceDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowTaskInstanceDto) IdentityLinkType(org.activiti.engine.task.IdentityLinkType) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) AbstractDto(eu.bcvsolutions.idm.core.api.dto.AbstractDto) Lists(com.google.common.collect.Lists) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) AbstractCoreWorkflowIntegrationTest(eu.bcvsolutions.idm.core.AbstractCoreWorkflowIntegrationTest) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) After(org.junit.After) IdmRoleGuaranteeDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleGuaranteeDto) WorkflowProcessInstanceService(eu.bcvsolutions.idm.core.workflow.service.WorkflowProcessInstanceService) WorkflowTaskInstanceService(eu.bcvsolutions.idm.core.workflow.service.WorkflowTaskInstanceService) TestHelper(eu.bcvsolutions.idm.test.api.TestHelper) Assert.fail(org.junit.Assert.fail) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) WorkflowFilterDto(eu.bcvsolutions.idm.core.workflow.model.dto.WorkflowFilterDto) IdentityLinkDto(eu.bcvsolutions.idm.core.workflow.model.dto.IdentityLinkDto) IdmRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestDto) Before(org.junit.Before) Requestable(eu.bcvsolutions.idm.core.api.domain.Requestable) IdmRoleGuaranteeService(eu.bcvsolutions.idm.core.api.service.IdmRoleGuaranteeService) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleService) RequestManager(eu.bcvsolutions.idm.core.api.service.RequestManager) Test(org.junit.Test) IdmRequestItemChangesDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemChangesDto) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) Serializable(java.io.Serializable) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) List(java.util.List) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmRequestItemService(eu.bcvsolutions.idm.core.api.service.IdmRequestItemService) IdmRequestItemAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemAttributeDto) IdmRoleGuaranteeFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleGuaranteeFilter) Assert(org.junit.Assert) IdmRequestService(eu.bcvsolutions.idm.core.api.service.IdmRequestService) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) IdmRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestDto) IdmRequestItemAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemAttributeDto) IdmRequestItemDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemDto) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) UUID(java.util.UUID) IdmRequestItemChangesDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestItemChangesDto) AbstractCoreWorkflowIntegrationTest(eu.bcvsolutions.idm.core.AbstractCoreWorkflowIntegrationTest) Test(org.junit.Test)

Aggregations

Requestable (eu.bcvsolutions.idm.core.api.domain.Requestable)4 IdmRequestItemAttributeDto (eu.bcvsolutions.idm.core.api.dto.IdmRequestItemAttributeDto)4 IdmRequestItemChangesDto (eu.bcvsolutions.idm.core.api.dto.IdmRequestItemChangesDto)4 RequestOperationType (eu.bcvsolutions.idm.core.api.domain.RequestOperationType)3 IdmRequestDto (eu.bcvsolutions.idm.core.api.dto.IdmRequestDto)3 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)3 Lists (com.google.common.collect.Lists)2 AbstractCoreWorkflowIntegrationTest (eu.bcvsolutions.idm.core.AbstractCoreWorkflowIntegrationTest)2 RequestState (eu.bcvsolutions.idm.core.api.domain.RequestState)2 AbstractDto (eu.bcvsolutions.idm.core.api.dto.AbstractDto)2 IdmRequestItemDto (eu.bcvsolutions.idm.core.api.dto.IdmRequestItemDto)2 CoreException (eu.bcvsolutions.idm.core.api.exception.CoreException)2 ResultCodeException (eu.bcvsolutions.idm.core.api.exception.ResultCodeException)2 JsonIgnore (com.fasterxml.jackson.annotation.JsonIgnore)1 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 Strings (com.google.common.base.Strings)1 ImmutableList (com.google.common.collect.ImmutableList)1 ImmutableMap (com.google.common.collect.ImmutableMap)1 Codeable (eu.bcvsolutions.idm.core.api.domain.Codeable)1