Search in sources :

Example 6 with IcAttributeImpl

use of eu.bcvsolutions.idm.ic.impl.IcAttributeImpl in project CzechIdMng by bcvsolutions.

the class DefaultVsAccountService method getIcAttribute.

/**
 * Load data from extended attribute and create IcAttribute
 *
 * @param accountId
 * @param name
 * @return
 */
@Override
public IcAttribute getIcAttribute(UUID accountId, String name, IdmFormDefinitionDto formDefinition) {
    IdmFormAttributeDto attributeDefinition = this.formAttributeService.findAttribute(formDefinition.getType(), formDefinition.getCode(), name);
    List<IdmFormValueDto> values = this.formService.getValues(accountId, VsAccount.class, formDefinition, name);
    IcAttributeImpl attribute = new IcAttributeImpl();
    attribute.setMultiValue(attributeDefinition.isMultiple());
    attribute.setName(name);
    if (CollectionUtils.isEmpty(values)) {
        return attribute;
    }
    List<Object> valuesObject = values.stream().map(IdmFormValueDto::getValue).collect(Collectors.toList());
    attribute.setValues(valuesObject);
    return attribute;
}
Also used : IcAttributeImpl(eu.bcvsolutions.idm.ic.impl.IcAttributeImpl) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto)

Aggregations

IcAttributeImpl (eu.bcvsolutions.idm.ic.impl.IcAttributeImpl)6 ArrayList (java.util.ArrayList)4 GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)3 IcAttribute (eu.bcvsolutions.idm.ic.api.IcAttribute)3 IcConnectorObjectImpl (eu.bcvsolutions.idm.ic.impl.IcConnectorObjectImpl)3 ConfidentialString (eu.bcvsolutions.idm.core.security.api.domain.ConfidentialString)2 IcConnectorObject (eu.bcvsolutions.idm.ic.api.IcConnectorObject)2 AttributeMapping (eu.bcvsolutions.idm.acc.domain.AttributeMapping)1 ProvisioningContext (eu.bcvsolutions.idm.acc.domain.ProvisioningContext)1 SysSchemaAttributeDto (eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto)1 SysProvisioningOperation (eu.bcvsolutions.idm.acc.entity.SysProvisioningOperation)1 ProvisioningException (eu.bcvsolutions.idm.acc.exception.ProvisioningException)1 IdmFormAttributeDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto)1 IdmFormDefinitionDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto)1 IdmFormValueDto (eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto)1 IcObjectClass (eu.bcvsolutions.idm.ic.api.IcObjectClass)1 IcPasswordAttribute (eu.bcvsolutions.idm.ic.api.IcPasswordAttribute)1 IcFilterOperationType (eu.bcvsolutions.idm.ic.domain.IcFilterOperationType)1 IcException (eu.bcvsolutions.idm.ic.exception.IcException)1 IcFilter (eu.bcvsolutions.idm.ic.filter.api.IcFilter)1