test_class.declarator: identityService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private IdmIdentityService identityService;
test_class.type: IdmIdentityService
test_class.var_name: identityService
test_class.declarator: formDefinitionService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private IdmFormDefinitionService formDefinitionService;
test_class.type: IdmFormDefinitionService
test_class.var_name: formDefinitionService
test_class.declarator: formAttributeService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private IdmFormAttributeService formAttributeService;
test_class.type: IdmFormAttributeService
test_class.var_name: formAttributeService
test_class.declarator: cacheManager
test_class.modifier: @Autowired 
  	private
test_class.original_string: @Autowired 
  	private IdmCacheManager cacheManager;
test_class.type: IdmCacheManager
test_class.var_name: cacheManager
test_class.file: Realization/backend/core/core-impl/src/test/java/eu/bcvsolutions/idm/core/generator/identity/IdentityFormDefaultValueGeneratorTest.java
test_class.identifier: IdentityFormDefaultValueGeneratorTest
test_class.superclass: extends AbstractGeneratorTest
test_case.body: @Test
  	public void testOnlySpecificFormDefinition() {
  		// prepare identity
  		IdmIdentityDto identity = new IdmIdentityDto();
  		identity.setUsername(getHelper().createName());
  		
  		// prepare new form definition
  		IdmFormDefinitionDto formDefinition = createFormDefinition();
  		
  		// prepare form attribute 1
  		String attrCode1 = getHelper().createName();
  		String attrDefaultValue1 = "true";
  		IdmFormAttributeDto att1 = createAttribute(attrCode1, attrDefaultValue1, PersistentType.BOOLEAN, formDefinition.getId());
  
  		// prepare form attribute 2
  		String attrCode2 = getHelper().createName();
  		String attrDefaultValue2 = "A";
  		IdmFormAttributeDto att2 = createAttribute(attrCode2, attrDefaultValue2, PersistentType.CHAR, formDefinition.getId());
  
  		// check eav before
  		List<IdmFormInstanceDto> eavs = identity.getEavs();
  		assertTrue(eavs.isEmpty());
  
  		// create generator
  		ValueGeneratorDto generator = getGenerator();
  		this.createGenerator(getDtoType(), getGeneratorType(),
  				this.createConfiguration(generator.getFormDefinition(),
  						ImmutableMap.of(
  								IdentityFormDefaultValueGenerator.FORM_DEFINITION_UUID, formDefinition.getId().toString())),
  				1, null);
  
  		// generate and check values after
  		identity = identityService.save(identity);
  		eavs = identity.getEavs();
  		assertFalse(eavs.isEmpty());
  
  		// get newly generated eav only for given form definition
  		IdmFormInstanceDto generatedEav = eavs.stream().filter(eav -> eav.getFormDefinition().getCode().equals(formDefinition.getCode())).findFirst().orElse(null);
  		assertNotNull(generatedEav);
  
  		// check values
  		List<IdmFormValueDto> values = generatedEav.getValues().stream().filter(val -> val.getFormAttribute().equals(att1.getId())).collect(Collectors.toList());
  		assertEquals(1, values.size());
  		IdmFormValueDto value = values.get(0);
  		assertEquals(attrDefaultValue1, value.getValue().toString());
  
  		values = generatedEav.getValues().stream().filter(val -> val.getFormAttribute().equals(att2.getId())).collect(Collectors.toList());
  		assertEquals(1, values.size());
  		value = values.get(0);
  		assertEquals(attrDefaultValue2, value.getValue().toString());
  	}
test_case.class_method_signature: IdentityFormDefaultValueGeneratorTest.testOnlySpecificFormDefinition()
test_case.full_signature: @Test public void testOnlySpecificFormDefinition()
test_case.identifier: testOnlySpecificFormDefinition
test_case.invocations: setUsername createName getHelper createFormDefinition createName getHelper createAttribute getId createName getHelper createAttribute getId getEavs assertTrue isEmpty getGenerator createGenerator getDtoType getGeneratorType createConfiguration getFormDefinition of toString getId save getEavs assertFalse isEmpty orElse findFirst filter stream equals getCode getFormDefinition getCode assertNotNull collect filter stream getValues equals getFormAttribute getId toList assertEquals size get assertEquals toString getValue collect filter stream getValues equals getFormAttribute getId toList assertEquals size get assertEquals toString getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOnlySpecificFormDefinition()
focal_class.declarator: LOG = org.slf4j.LoggerFactory.getLogger(IdentityFormDefaultValueGenerator.class)
focal_class.modifier: private static final
focal_class.original_string: private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(IdentityFormDefaultValueGenerator.class);
focal_class.type: org.slf4j.Logger
focal_class.var_name: LOG
focal_class.declarator: GENERATOR_NAME = "core-identity-form-default-value-generator"
focal_class.modifier: public static final
focal_class.original_string: public static final String GENERATOR_NAME = "core-identity-form-default-value-generator";
focal_class.type: String
focal_class.var_name: GENERATOR_NAME
focal_class.declarator: FORM_DEFINITION_UUID = "formDefinitionUuid"
focal_class.modifier: public static
focal_class.original_string: public static String FORM_DEFINITION_UUID = "formDefinitionUuid";
focal_class.type: String
focal_class.var_name: FORM_DEFINITION_UUID
focal_class.declarator: REGEX_MULTIPLE_VALUES = "regexMultipleValues"
focal_class.modifier: public static
focal_class.original_string: public static String REGEX_MULTIPLE_VALUES = "regexMultipleValues";
focal_class.type: String
focal_class.var_name: REGEX_MULTIPLE_VALUES
focal_class.declarator: REGEX_MULTIPLE_VALUES_DEFAULT_VALUE = ","
focal_class.modifier: private static
focal_class.original_string: private static String REGEX_MULTIPLE_VALUES_DEFAULT_VALUE = ",";
focal_class.type: String
focal_class.var_name: REGEX_MULTIPLE_VALUES_DEFAULT_VALUE
focal_class.declarator: formService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private FormService formService;
focal_class.type: FormService
focal_class.var_name: formService
focal_class.declarator: lookupService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private LookupService lookupService;
focal_class.type: LookupService
focal_class.var_name: lookupService
focal_class.file: Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/generator/identity/IdentityFormDefaultValueGenerator.java
focal_class.identifier: IdentityFormDefaultValueGenerator
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.generate(IdmIdentityDto dto, IdmGenerateValueDto valueGenerator)
focal_class.full_signature: @Override public IdmIdentityDto generate(IdmIdentityDto dto, IdmGenerateValueDto valueGenerator)
focal_class.identifier: generate
focal_class.modifiers: @Override public
focal_class.parameters: (IdmIdentityDto dto, IdmGenerateValueDto valueGenerator)
focal_class.return: IdmIdentityDto
focal_class.signature: IdmIdentityDto generate(IdmIdentityDto dto, IdmGenerateValueDto valueGenerator)
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.getPropertyNames()
focal_class.full_signature: @Override public List<String> getPropertyNames()
focal_class.identifier: getPropertyNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getPropertyNames()
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.getFormAttributes()
focal_class.full_signature: @Override public List<IdmFormAttributeDto> getFormAttributes()
focal_class.identifier: getFormAttributes
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<IdmFormAttributeDto>
focal_class.signature: List<IdmFormAttributeDto> getFormAttributes()
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.replaceValuesInFormInstance(List<IdmFormValueDto> replaceValues, List<IdmFormInstanceDto> eavs, IdmFormDefinitionDto definition, IdmFormAttributeDto attribute, IdmIdentityDto identityDto)
focal_class.full_signature: private List<IdmFormInstanceDto> replaceValuesInFormInstance(List<IdmFormValueDto> replaceValues, List<IdmFormInstanceDto> eavs, IdmFormDefinitionDto definition, IdmFormAttributeDto attribute, IdmIdentityDto identityDto)
focal_class.identifier: replaceValuesInFormInstance
focal_class.modifiers: private
focal_class.parameters: (List<IdmFormValueDto> replaceValues, List<IdmFormInstanceDto> eavs, IdmFormDefinitionDto definition, IdmFormAttributeDto attribute, IdmIdentityDto identityDto)
focal_class.return: List<IdmFormInstanceDto>
focal_class.signature: List<IdmFormInstanceDto> replaceValuesInFormInstance(List<IdmFormValueDto> replaceValues, List<IdmFormInstanceDto> eavs, IdmFormDefinitionDto definition, IdmFormAttributeDto attribute, IdmIdentityDto identityDto)
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.getTransformedValues(IdmGenerateValueDto valueGenerator, String value, IdmFormAttributeDto attribute)
focal_class.full_signature: private List<IdmFormValueDto> getTransformedValues(IdmGenerateValueDto valueGenerator, String value, IdmFormAttributeDto attribute)
focal_class.identifier: getTransformedValues
focal_class.modifiers: private
focal_class.parameters: (IdmGenerateValueDto valueGenerator, String value, IdmFormAttributeDto attribute)
focal_class.return: List<IdmFormValueDto>
focal_class.signature: List<IdmFormValueDto> getTransformedValues(IdmGenerateValueDto valueGenerator, String value, IdmFormAttributeDto attribute)
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.createValue(IdmFormAttributeDto attribute, Serializable value)
focal_class.full_signature: private IdmFormValueDto createValue(IdmFormAttributeDto attribute, Serializable value)
focal_class.identifier: createValue
focal_class.modifiers: private
focal_class.parameters: (IdmFormAttributeDto attribute, Serializable value)
focal_class.return: IdmFormValueDto
focal_class.signature: IdmFormValueDto createValue(IdmFormAttributeDto attribute, Serializable value)
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.getFormDefinition(IdmGenerateValueDto valueGenerator)
focal_class.full_signature: private IdmFormDefinitionDto getFormDefinition(IdmGenerateValueDto valueGenerator)
focal_class.identifier: getFormDefinition
focal_class.modifiers: private
focal_class.parameters: (IdmGenerateValueDto valueGenerator)
focal_class.return: IdmFormDefinitionDto
focal_class.signature: IdmFormDefinitionDto getFormDefinition(IdmGenerateValueDto valueGenerator)
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.getValuesFromInstances(List<IdmFormInstanceDto> eavs, IdmFormDefinitionDto definition, IdmFormAttributeDto attribute)
focal_class.full_signature: private List<IdmFormValueDto> getValuesFromInstances(List<IdmFormInstanceDto> eavs, IdmFormDefinitionDto definition, IdmFormAttributeDto attribute)
focal_class.identifier: getValuesFromInstances
focal_class.modifiers: private
focal_class.parameters: (List<IdmFormInstanceDto> eavs, IdmFormDefinitionDto definition, IdmFormAttributeDto attribute)
focal_class.return: List<IdmFormValueDto>
focal_class.signature: List<IdmFormValueDto> getValuesFromInstances(List<IdmFormInstanceDto> eavs, IdmFormDefinitionDto definition, IdmFormAttributeDto attribute)
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.getFormDefinitionUuid(IdmGenerateValueDto valueGenerator)
focal_class.full_signature: private UUID getFormDefinitionUuid(IdmGenerateValueDto valueGenerator)
focal_class.identifier: getFormDefinitionUuid
focal_class.modifiers: private
focal_class.parameters: (IdmGenerateValueDto valueGenerator)
focal_class.return: UUID
focal_class.signature: UUID getFormDefinitionUuid(IdmGenerateValueDto valueGenerator)
focal_class.class_method_signature: IdentityFormDefaultValueGenerator.getRegex(IdmGenerateValueDto valueGenerator)
focal_class.full_signature: private String getRegex(IdmGenerateValueDto valueGenerator)
focal_class.identifier: getRegex
focal_class.modifiers: private
focal_class.parameters: (IdmGenerateValueDto valueGenerator)
focal_class.return: String
focal_class.signature: String getRegex(IdmGenerateValueDto valueGenerator)
focal_class.superclass: extends AbstractValueGenerator<IdmIdentityDto>
focal_method.body: private IdmFormDefinitionDto getFormDefinition(IdmGenerateValueDto valueGenerator) {
  		UUID formDefinitionUuid = getFormDefinitionUuid(valueGenerator);
  		if (formDefinitionUuid != null) {
  			IdmFormDefinitionDto formDefinitionDto = formService.getDefinition(formDefinitionUuid);
  			if (formDefinitionDto != null) {
  				return formDefinitionDto;
  			}
  		}
  		return null;
  	}
focal_method.class_method_signature: IdentityFormDefaultValueGenerator.getFormDefinition(IdmGenerateValueDto valueGenerator)
focal_method.full_signature: private IdmFormDefinitionDto getFormDefinition(IdmGenerateValueDto valueGenerator)
focal_method.identifier: getFormDefinition
focal_method.invocations: getFormDefinitionUuid getDefinition
focal_method.modifiers: private
focal_method.parameters: (IdmGenerateValueDto valueGenerator)
focal_method.return: IdmFormDefinitionDto
focal_method.signature: IdmFormDefinitionDto getFormDefinition(IdmGenerateValueDto valueGenerator)