test_class.declarator: TEST_ONE = "testOne"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_ONE = "testOne";
test_class.type: String
test_class.var_name: TEST_ONE
test_class.declarator: cacheManager
test_class.modifier: @Mock
test_class.original_string: @Mock
  	IdmCacheManager cacheManager;
test_class.type: IdmCacheManager
test_class.var_name: cacheManager
test_class.declarator: groovyScriptService
test_class.modifier: @InjectMocks
  	private
test_class.original_string: @InjectMocks
  	private DefaultGroovyScriptService groovyScriptService;
test_class.type: DefaultGroovyScriptService
test_class.var_name: groovyScriptService
test_class.file: Realization/backend/core/core-impl/src/test/java/eu/bcvsolutions/idm/core/model/service/impl/DefaultGroovyScriptServiceTest.java
test_class.identifier: DefaultGroovyScriptServiceTest
test_class.superclass: extends AbstractVerifiableUnitTest
test_case.body: @Test(expected = ResultCodeException.class)
  	public void testUnvalidScript() {
  		String script = "if(true) return \"testOne\"}";
  		groovyScriptService.validateScript(script);
  	}
test_case.class_method_signature: DefaultGroovyScriptServiceTest.testUnvalidScript()
test_case.full_signature: @Test(expected = ResultCodeException.class) public void testUnvalidScript()
test_case.identifier: testUnvalidScript
test_case.invocations: validateScript
test_case.modifiers: @Test(expected = ResultCodeException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUnvalidScript()
focal_class.declarator: CACHE_NAME = CoreModuleDescriptor.MODULE_ID + ":default-groovy-script-service-script-cache"
focal_class.modifier: public static final
focal_class.original_string: public static final String CACHE_NAME = CoreModuleDescriptor.MODULE_ID + ":default-groovy-script-service-script-cache";
focal_class.type: String
focal_class.var_name: CACHE_NAME
focal_class.declarator: cacheManager
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
  	IdmCacheManager cacheManager;
focal_class.type: IdmCacheManager
focal_class.var_name: cacheManager
focal_class.declarator: LOG = org.slf4j.LoggerFactory
  			.getLogger(DefaultGroovyScriptService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory
  			.getLogger(DefaultGroovyScriptService.class);
focal_class.type: org.slf4j.Logger
focal_class.var_name: LOG
focal_class.file: Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/model/service/impl/DefaultGroovyScriptService.java
focal_class.identifier: DefaultGroovyScriptService
focal_class.interfaces: implements GroovyScriptService
focal_class.class_method_signature: DefaultGroovyScriptService.evaluate(String script, Map<String, Object> variables)
focal_class.full_signature: @Override public Object evaluate(String script, Map<String, Object> variables)
focal_class.identifier: evaluate
focal_class.modifiers: @Override public
focal_class.parameters: (String script, Map<String, Object> variables)
focal_class.return: Object
focal_class.signature: Object evaluate(String script, Map<String, Object> variables)
focal_class.class_method_signature: DefaultGroovyScriptService.evaluate(String script, Map<String, Object> variables, List<Class<?>> extraAllowedClasses)
focal_class.full_signature: @Override public Object evaluate(String script, Map<String, Object> variables, List<Class<?>> extraAllowedClasses)
focal_class.identifier: evaluate
focal_class.modifiers: @Override public
focal_class.parameters: (String script, Map<String, Object> variables, List<Class<?>> extraAllowedClasses)
focal_class.return: Object
focal_class.signature: Object evaluate(String script, Map<String, Object> variables, List<Class<?>> extraAllowedClasses)
focal_class.class_method_signature: DefaultGroovyScriptService.resolveCustomAllowTypes(Map<String, Object> variables)
focal_class.full_signature: private Set<Class<?>> resolveCustomAllowTypes(Map<String, Object> variables)
focal_class.identifier: resolveCustomAllowTypes
focal_class.modifiers: private
focal_class.parameters: (Map<String, Object> variables)
focal_class.return: Set<Class<?>>
focal_class.signature: Set<Class<?>> resolveCustomAllowTypes(Map<String, Object> variables)
focal_class.class_method_signature: DefaultGroovyScriptService.validateScript(String script)
focal_class.full_signature: @Override public Object validateScript(String script)
focal_class.identifier: validateScript
focal_class.modifiers: @Override public
focal_class.parameters: (String script)
focal_class.return: Object
focal_class.signature: Object validateScript(String script)
focal_class.class_method_signature: DefaultGroovyScriptService.getScript(String source)
focal_class.full_signature: private Script getScript(String source)
focal_class.identifier: getScript
focal_class.modifiers: private
focal_class.parameters: (String source)
focal_class.return: Script
focal_class.signature: Script getScript(String source)
focal_class.class_method_signature: DefaultGroovyScriptService.buildScript(String source)
focal_class.full_signature: private Script buildScript(String source)
focal_class.identifier: buildScript
focal_class.modifiers: private
focal_class.parameters: (String source)
focal_class.return: Script
focal_class.signature: Script buildScript(String source)
focal_method.body: @Override
  	public Object validateScript(String script) throws ResultCodeException {
  		Assert.notNull(script, "Script is required.");
  		try {
  			GroovyShell shell = new GroovyShell();
  			return shell.parse(script);
  		} catch (MultipleCompilationErrorsException e) {
  			// get last error, it is possible add all errors
  			Object error = e.getErrorCollector().getLastError();
  			if (error instanceof SyntaxErrorMessage) {
  				SyntaxErrorMessage syntaxErrorMessage = (SyntaxErrorMessage)error;
  				SyntaxException cause = syntaxErrorMessage.getCause();
  				//
  				throw new ResultCodeException(CoreResultCode.GROOVY_SCRIPT_SYNTAX_VALIDATION,
  						ImmutableMap.of("message", cause.getOriginalMessage(), "line", cause.getLine()), e);
  			}
  			//
  			throw new ResultCodeException(CoreResultCode.GROOVY_SCRIPT_VALIDATION, e);
  		} catch (CompilationFailedException ex) {
  			throw new ResultCodeException(CoreResultCode.GROOVY_SCRIPT_VALIDATION, ex);
  		}
  	}
focal_method.class_method_signature: DefaultGroovyScriptService.validateScript(String script)
focal_method.full_signature: @Override public Object validateScript(String script)
focal_method.identifier: validateScript
focal_method.invocations: notNull parse getLastError getErrorCollector getCause of getOriginalMessage getLine
focal_method.modifiers: @Override public
focal_method.parameters: (String script)
focal_method.return: Object
focal_method.signature: Object validateScript(String script)