protected void registerFile(DynamicValue<String> dynamicValue, String properyName, Map<String, String> props) { if(dynamicValue!=null) { String filepath = dynamicValue.get(); if(filepath!=null && filepath.trim().length()>0) { File file = fileResolver.resolve(filepath); registerFile(file, properyName, props); } } }
protected Context(Configuration configuration, AbstractFunctionType<?> functionType, Map<String, String> properties) { super(); this.properties = properties; this.fileManagerDirectory = FileHelper.createTempFolder(); grid = new Grid(fileManagerDirectory, 0); client = new GridClientImpl(grid); FunctionTypeRegistry functionTypeRegistry = new FunctionTypeRegistryImpl(new FileResolver(new AttachmentManager(configuration)), client); functionTypeRegistry.registerFunctionType(functionType); try { functionExecutionService = new FunctionExecutionServiceImpl(client, functionTypeRegistry, new DynamicBeanResolver(new DynamicValueResolver(new ExpressionHandler()))); } catch (FunctionExecutionServiceException e) { throw new RuntimeException("Error while creating function execution service", e); } }
protected Context(Configuration configuration, AbstractFunctionType<?> functionType, Map<String, String> properties) { super(); token = new AgentTokenWrapper(); if(properties!=null) { token.setProperties(properties); } Grid grid = new Grid(0); GridClientImpl client = new GridClientImpl(grid, grid); FunctionTypeRegistry functionTypeRegistry = new FunctionTypeRegistryImpl(new FileResolver(new AttachmentManager(configuration)), grid); functionTypeRegistry.registerFunctionType(functionType); functionExecutionService = new FunctionExecutionServiceImpl(client, functionAccessor, functionTypeRegistry, new DynamicBeanResolver(new DynamicValueResolver(new ExpressionHandler()))); }
functionTypeRegistry = new FunctionTypeRegistryImpl(new FileResolver(context.getAttachmentManager()), grid);
protected void registerFile(DynamicValue<String> dynamicValue, String properyName, Map<String, String> props) { if(dynamicValue!=null) { String filepath = dynamicValue.get(); if(filepath!=null && filepath.trim().length()>0) { File file = fileResolver.resolve(filepath); registerFile(file, properyName, props); } } }