Skip to content

Commit

Permalink
feat: add binding to service provider for use in Groovy script
Browse files Browse the repository at this point in the history
Add an additional binding for the Service Provider to Groovy scripts.

ING-4265
  • Loading branch information
florianesser committed Apr 29, 2024
1 parent d56e083 commit 03510de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public interface GroovyConstants {
*/
public static final String BINDING_INSTANCE_INDEX = "_instanceIndex";

/**
* Name of the service provider in the binding.
*/
public static final String BINDING_SERVICE_PROVIDER = "_serviceProvider";

/**
* Name of the helper functions accessor.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ public static Binding createBinding(InstanceBuilder builder, Cell cell, Cell typ
binding.setVariable(BINDING_INSTANCE_INDEX,
executionContext.getService(InstanceIndexService.class));

binding.setVariable(BINDING_SERVICE_PROVIDER, executionContext);

return binding;
}
}

0 comments on commit 03510de

Please sign in to comment.