private void initCaches(RuleLoaderContext ruleLoaderContext) { this.cachedRegistry = ruleLoader.loadConfiguration(ruleLoaderContext); this.cachedTransformers = TechnologyReferenceTransformer.getTransformers(ruleLoaderContext); this.cacheRefreshTime = System.currentTimeMillis(); }
private void initCaches(RuleLoaderContext ruleLoaderContext) { this.cachedRegistry = ruleLoader.loadConfiguration(ruleLoaderContext); this.cachedTransformers = TechnologyReferenceTransformer.getTransformers(ruleLoaderContext); this.cacheRefreshTime = System.currentTimeMillis(); }
@Override public RuleProviderRegistry getRuleProviderRegistry(List<String> pathStrings) throws RemoteException { RuleProviderRegistryImpl ruleProviderRegistry = new RuleProviderRegistryImpl(); List<Path> paths = pathStrings.stream().map(pathString -> Paths.get(pathString)).collect(Collectors.toList()); RuleLoaderContext ruleLoaderContext = new RuleLoaderContext(paths, null); org.jboss.windup.config.metadata.RuleProviderRegistry registry = this.ruleLoader.loadConfiguration(ruleLoaderContext); ruleProviderRegistry.buildRuleProviders(registry); return ruleProviderRegistry; }
@Override public RuleProviderRegistry getRuleProviderRegistry(List<String> pathStrings) throws RemoteException { RuleProviderRegistryImpl ruleProviderRegistry = new RuleProviderRegistryImpl(); List<Path> paths = pathStrings.stream().map(pathString -> Paths.get(pathString)).collect(Collectors.toList()); RuleLoaderContext ruleLoaderContext = new RuleLoaderContext(paths, null); org.jboss.windup.config.metadata.RuleProviderRegistry registry = this.ruleLoader.loadConfiguration(ruleLoaderContext); ruleProviderRegistry.buildRuleProviders(registry); return ruleProviderRegistry; }
@Override public RuleProviderRegistry loadRuleProviderRegistry(Collection<Path> rulePaths, boolean fileRulesOnly) { RuleLoaderContext ruleLoaderContext = new RuleLoaderContext(rulePaths, null); if (fileRulesOnly) ruleLoaderContext.setFileBasedRulesOnly(); return ruleLoader.loadConfiguration(ruleLoaderContext); } }
addSourceAndTargetInformation(event, configuration, configurationModel); RuleProviderRegistry providerRegistry = ruleLoader.loadConfiguration(ruleLoaderContext); Configuration rules = providerRegistry.getConfiguration();