class DefaultSysRoleSystemAttributeService extends
		AbstractReadWriteDtoService<SysRoleSystemAttributeDto, SysRoleSystemAttribute, SysRoleSystemAttributeFilter> implements SysRoleSystemAttributeService {

	@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);
	}

	@Autowired public  DefaultSysRoleSystemAttributeService(SysRoleSystemAttributeRepository repository);

}