test_class.declarator: helper
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private TestHelper helper;
test_class.type: TestHelper
test_class.var_name: helper
test_class.declarator: roleService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private IdmRoleService roleService;
test_class.type: IdmRoleService
test_class.var_name: roleService
test_class.declarator: identityRoleService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private IdmIdentityRoleService identityRoleService;
test_class.type: IdmIdentityRoleService
test_class.var_name: identityRoleService
test_class.declarator: roleSystemService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private SysRoleSystemService roleSystemService;
test_class.type: SysRoleSystemService
test_class.var_name: roleSystemService
test_class.declarator: roleSystemAttributeService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private SysRoleSystemAttributeService roleSystemAttributeService;
test_class.type: SysRoleSystemAttributeService
test_class.var_name: roleSystemAttributeService
test_class.declarator: systemService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private SysSystemService systemService;
test_class.type: SysSystemService
test_class.var_name: systemService
test_class.declarator: schemaAttributeService
test_class.modifier: @Autowired 
  	private
test_class.original_string: @Autowired 
  	private SysSchemaAttributeService schemaAttributeService;
test_class.type: SysSchemaAttributeService
test_class.var_name: schemaAttributeService
test_class.declarator: systemAttributeMappingService
test_class.modifier: @Autowired 
  	private
test_class.original_string: @Autowired 
  	private SysSystemAttributeMappingService systemAttributeMappingService;
test_class.type: SysSystemAttributeMappingService
test_class.var_name: systemAttributeMappingService
test_class.declarator: accountService
test_class.modifier: @Autowired 
  	private
test_class.original_string: @Autowired 
  	private AccAccountService accountService;
test_class.type: AccAccountService
test_class.var_name: accountService
test_class.declarator: attributeControlledValueService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private SysAttributeControlledValueService attributeControlledValueService;
test_class.type: SysAttributeControlledValueService
test_class.var_name: attributeControlledValueService
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.file: Realization/backend/acc/src/test/java/eu/bcvsolutions/idm/acc/service/impl/DefaultSysRoleSystemAttributeServiceTest.java
test_class.identifier: DefaultSysRoleSystemAttributeServiceTest
test_class.superclass: extends AbstractIntegrationTest
test_case.body: @Test
  	public void testAddRoleMappingAttribute() {
  		IdmRoleDto role = helper.createRole();
  		SysSystemDto system = helper.createTestResourceSystem(true);
  
  		SysRoleSystemAttributeDto attribute = roleSystemAttributeService.addRoleMappingAttribute(system.getId(),
  				role.getId(), helper.getSchemaColumnName(TestHelper.ATTRIBUTE_MAPPING_FIRSTNAME), null, IcObjectClassInfo.ACCOUNT);
  		Assert.assertNotNull(attribute);
  
  		SysRoleSystemFilter roleSystemFilter = new SysRoleSystemFilter();
  		roleSystemFilter.setRoleId(role.getId());
  		roleSystemFilter.setSystemId(system.getId());
  
  		List<SysRoleSystemDto> roleSystems = roleSystemService.find(roleSystemFilter, null).getContent();
  		Assert.assertEquals(1, roleSystems.size());
  		SysRoleSystemDto roleSystem = roleSystems.get(0);
  		SysSystemMappingDto systemMapping = roleSystemAttributeService.getSystemMapping(system.getId(),
  				IcObjectClassInfo.ACCOUNT, SystemOperationType.PROVISIONING);
  		Assert.assertNotNull(systemMapping);
  		Assert.assertEquals(systemMapping.getId(), roleSystem.getSystemMapping());
  	}
test_case.class_method_signature: DefaultSysRoleSystemAttributeServiceTest.testAddRoleMappingAttribute()
test_case.full_signature: @Test public void testAddRoleMappingAttribute()
test_case.identifier: testAddRoleMappingAttribute
test_case.invocations: createRole createTestResourceSystem addRoleMappingAttribute getId getId getSchemaColumnName assertNotNull setRoleId getId setSystemId getId getContent find assertEquals size get getSystemMapping getId assertNotNull assertEquals getId getSystemMapping
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAddRoleMappingAttribute()
focal_class.declarator: LOG = LoggerFactory.getLogger(DefaultSysRoleSystemAttributeService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(DefaultSysRoleSystemAttributeService.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: groovyScriptService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private GroovyScriptService groovyScriptService;
focal_class.type: GroovyScriptService
focal_class.var_name: groovyScriptService
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: roleSystemService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private SysRoleSystemService roleSystemService;
focal_class.type: SysRoleSystemService
focal_class.var_name: roleSystemService
focal_class.declarator: systemAttributeMappingService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private SysSystemAttributeMappingService systemAttributeMappingService;
focal_class.type: SysSystemAttributeMappingService
focal_class.var_name: systemAttributeMappingService
focal_class.declarator: systemMappingService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private SysSystemMappingService systemMappingService;
focal_class.type: SysSystemMappingService
focal_class.var_name: systemMappingService
focal_class.declarator: roleService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private IdmRoleService roleService;
focal_class.type: IdmRoleService
focal_class.var_name: roleService
focal_class.declarator: schemaObjectClassService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private SysSchemaObjectClassService schemaObjectClassService;
focal_class.type: SysSchemaObjectClassService
focal_class.var_name: schemaObjectClassService
focal_class.declarator: schemaAttributeService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private SysSchemaAttributeService schemaAttributeService;
focal_class.type: SysSchemaAttributeService
focal_class.var_name: schemaAttributeService
focal_class.declarator: requestManager
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private RequestManager requestManager;
focal_class.type: RequestManager
focal_class.var_name: requestManager
focal_class.declarator: attributeControlledValueService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private SysAttributeControlledValueService attributeControlledValueService;
focal_class.type: SysAttributeControlledValueService
focal_class.var_name: attributeControlledValueService
focal_class.file: Realization/backend/acc/src/main/java/eu/bcvsolutions/idm/acc/service/impl/DefaultSysRoleSystemAttributeService.java
focal_class.identifier: DefaultSysRoleSystemAttributeService
focal_class.interfaces: implements SysRoleSystemAttributeService
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.DefaultSysRoleSystemAttributeService(SysRoleSystemAttributeRepository repository)
focal_class.full_signature: @Autowired public  DefaultSysRoleSystemAttributeService(SysRoleSystemAttributeRepository repository)
focal_class.identifier: DefaultSysRoleSystemAttributeService
focal_class.modifiers: @Autowired public
focal_class.parameters: (SysRoleSystemAttributeRepository repository)
focal_class.signature:  DefaultSysRoleSystemAttributeService(SysRoleSystemAttributeRepository repository)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.save(SysRoleSystemAttributeDto dto, BasePermission... permission)
focal_class.full_signature: @Override @Transactional public SysRoleSystemAttributeDto save(SysRoleSystemAttributeDto dto, BasePermission... permission)
focal_class.identifier: save
focal_class.modifiers: @Override @Transactional public
focal_class.parameters: (SysRoleSystemAttributeDto dto, BasePermission... permission)
focal_class.return: SysRoleSystemAttributeDto
focal_class.signature: SysRoleSystemAttributeDto save(SysRoleSystemAttributeDto dto, BasePermission... permission)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.saveInternal(SysRoleSystemAttributeDto dto)
focal_class.full_signature: @Override public SysRoleSystemAttributeDto saveInternal(SysRoleSystemAttributeDto dto)
focal_class.identifier: saveInternal
focal_class.modifiers: @Override public
focal_class.parameters: (SysRoleSystemAttributeDto dto)
focal_class.return: SysRoleSystemAttributeDto
focal_class.signature: SysRoleSystemAttributeDto saveInternal(SysRoleSystemAttributeDto dto)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.delete(SysRoleSystemAttributeDto roleSystemAttribute, BasePermission... permission)
focal_class.full_signature: @Override @Transactional public void delete(SysRoleSystemAttributeDto roleSystemAttribute, BasePermission... permission)
focal_class.identifier: delete
focal_class.modifiers: @Override @Transactional public
focal_class.parameters: (SysRoleSystemAttributeDto roleSystemAttribute, BasePermission... permission)
focal_class.return: void
focal_class.signature: void delete(SysRoleSystemAttributeDto roleSystemAttribute, BasePermission... permission)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.addRoleMappingAttribute(UUID systemId, UUID roleId, String attributeName,
  			String transformationScript, String objectClassName)
focal_class.full_signature: @Transactional @Override public SysRoleSystemAttributeDto addRoleMappingAttribute(UUID systemId, UUID roleId, String attributeName,
  			String transformationScript, String objectClassName)
focal_class.identifier: addRoleMappingAttribute
focal_class.modifiers: @Transactional @Override public
focal_class.parameters: (UUID systemId, UUID roleId, String attributeName,
  			String transformationScript, String objectClassName)
focal_class.return: SysRoleSystemAttributeDto
focal_class.signature: SysRoleSystemAttributeDto addRoleMappingAttribute(UUID systemId, UUID roleId, String attributeName,
  			String transformationScript, String objectClassName)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.getSystemMapping(UUID systemId, String objectClassName,
  			SystemOperationType operationType)
focal_class.full_signature: @Transactional @Override public SysSystemMappingDto getSystemMapping(UUID systemId, String objectClassName,
  			SystemOperationType operationType)
focal_class.identifier: getSystemMapping
focal_class.modifiers: @Transactional @Override public
focal_class.parameters: (UUID systemId, String objectClassName,
  			SystemOperationType operationType)
focal_class.return: SysSystemMappingDto
focal_class.signature: SysSystemMappingDto getSystemMapping(UUID systemId, String objectClassName,
  			SystemOperationType operationType)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.toPredicates(Root<SysRoleSystemAttribute> root, CriteriaQuery<?> query, CriteriaBuilder builder,
  			SysRoleSystemAttributeFilter filter)
focal_class.full_signature: @Override protected List<Predicate> toPredicates(Root<SysRoleSystemAttribute> root, CriteriaQuery<?> query, CriteriaBuilder builder,
  			SysRoleSystemAttributeFilter filter)
focal_class.identifier: toPredicates
focal_class.modifiers: @Override protected
focal_class.parameters: (Root<SysRoleSystemAttribute> root, CriteriaQuery<?> query, CriteriaBuilder builder,
  			SysRoleSystemAttributeFilter filter)
focal_class.return: List<Predicate>
focal_class.signature: List<Predicate> toPredicates(Root<SysRoleSystemAttribute> root, CriteriaQuery<?> query, CriteriaBuilder builder,
  			SysRoleSystemAttributeFilter filter)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.getSysRoleSystem(UUID systemId, UUID roleId, String objectClassName)
focal_class.full_signature: private UUID getSysRoleSystem(UUID systemId, UUID roleId, String objectClassName)
focal_class.identifier: getSysRoleSystem
focal_class.modifiers: private
focal_class.parameters: (UUID systemId, UUID roleId, String objectClassName)
focal_class.return: UUID
focal_class.signature: UUID getSysRoleSystem(UUID systemId, UUID roleId, String objectClassName)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.getObjectClassId(UUID systemId, String objectClassName)
focal_class.full_signature: private UUID getObjectClassId(UUID systemId, String objectClassName)
focal_class.identifier: getObjectClassId
focal_class.modifiers: private
focal_class.parameters: (UUID systemId, String objectClassName)
focal_class.return: UUID
focal_class.signature: UUID getObjectClassId(UUID systemId, String objectClassName)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.getSystemAttributeMapping(UUID systemId, String attributeName,
  			String objectClassName)
focal_class.full_signature: private SysSystemAttributeMappingDto getSystemAttributeMapping(UUID systemId, String attributeName,
  			String objectClassName)
focal_class.identifier: getSystemAttributeMapping
focal_class.modifiers: private
focal_class.parameters: (UUID systemId, String attributeName,
  			String objectClassName)
focal_class.return: SysSystemAttributeMappingDto
focal_class.signature: SysSystemAttributeMappingDto getSystemAttributeMapping(UUID systemId, String attributeName,
  			String objectClassName)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.getSchemaAttr(UUID systemId, String attributeName, String objectClassName)
focal_class.full_signature: private SysSchemaAttributeDto getSchemaAttr(UUID systemId, String attributeName, String objectClassName)
focal_class.identifier: getSchemaAttr
focal_class.modifiers: private
focal_class.parameters: (UUID systemId, String attributeName, String objectClassName)
focal_class.return: SysSchemaAttributeDto
focal_class.signature: SysSchemaAttributeDto getSchemaAttr(UUID systemId, String attributeName, String objectClassName)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.getSystemAttribute(UUID roleSystem, String attributeName)
focal_class.full_signature: private SysRoleSystemAttributeDto getSystemAttribute(UUID roleSystem, String attributeName)
focal_class.identifier: getSystemAttribute
focal_class.modifiers: private
focal_class.parameters: (UUID roleSystem, String attributeName)
focal_class.return: SysRoleSystemAttributeDto
focal_class.signature: SysRoleSystemAttributeDto getSystemAttribute(UUID roleSystem, String attributeName)
focal_class.class_method_signature: DefaultSysRoleSystemAttributeService.recalculationOfControlledValues(SysSystemAttributeMappingDto attributeMappingDto)
focal_class.full_signature: private void recalculationOfControlledValues(SysSystemAttributeMappingDto attributeMappingDto)
focal_class.identifier: recalculationOfControlledValues
focal_class.modifiers: private
focal_class.parameters: (SysSystemAttributeMappingDto attributeMappingDto)
focal_class.return: void
focal_class.signature: void recalculationOfControlledValues(SysSystemAttributeMappingDto attributeMappingDto)
focal_class.superclass: extends
  		AbstractReadWriteDtoService<SysRoleSystemAttributeDto, SysRoleSystemAttribute, SysRoleSystemAttributeFilter>
focal_method.body: @Transactional
  	@Override
  	public SysRoleSystemAttributeDto addRoleMappingAttribute(UUID systemId, UUID roleId, String attributeName,
  			String transformationScript, String objectClassName) { // ObjectClassName "__ACCOUNT__"
  		Assert.notNull(systemId, "SystemId cannot be null!");
  		Assert.notNull(roleId, "RoleId cannot be null!");
  		Assert.notNull(attributeName, "Attribute name cannot be null");
  		Assert.hasLength(attributeName, "Attribute name cannot be blank");
  
  		UUID roleSystemId = getSysRoleSystem(systemId, roleId, objectClassName);
  		SysRoleSystemAttributeDto systemAttribute = getSystemAttribute(roleSystemId, attributeName);
  		if (systemAttribute == null) {
  			systemAttribute = new SysRoleSystemAttributeDto();
  		}
  
  		systemAttribute.setEntityAttribute(false);
  		systemAttribute.setStrategyType(AttributeMappingStrategyType.MERGE);
  
  		UUID systemAttributeMappingId = getSystemAttributeMapping(systemId, attributeName, objectClassName).getId();
  
  		systemAttribute.setName(attributeName);
  		systemAttribute.setRoleSystem(roleSystemId);
  		systemAttribute.setSystemAttributeMapping(systemAttributeMappingId);
  		//
  		if (transformationScript != null) {
  			systemAttribute.setTransformScript(transformationScript);
  		}
  
  		return this.save(systemAttribute);
  	}
focal_method.class_method_signature: DefaultSysRoleSystemAttributeService.addRoleMappingAttribute(UUID systemId, UUID roleId, String attributeName,
  			String transformationScript, String objectClassName)
focal_method.full_signature: @Transactional @Override public SysRoleSystemAttributeDto addRoleMappingAttribute(UUID systemId, UUID roleId, String attributeName,
  			String transformationScript, String objectClassName)
focal_method.identifier: addRoleMappingAttribute
focal_method.invocations: notNull notNull notNull hasLength getSysRoleSystem getSystemAttribute setEntityAttribute setStrategyType getId getSystemAttributeMapping setName setRoleSystem setSystemAttributeMapping setTransformScript save
focal_method.modifiers: @Transactional @Override public
focal_method.parameters: (UUID systemId, UUID roleId, String attributeName,
  			String transformationScript, String objectClassName)
focal_method.return: SysRoleSystemAttributeDto
focal_method.signature: SysRoleSystemAttributeDto addRoleMappingAttribute(UUID systemId, UUID roleId, String attributeName,
  			String transformationScript, String objectClassName)