private static String[] getDirectories(String path) { String content = null; try { content = ConfFileUtils.URLContentsToString( new URL(path + "/index.conf")); } catch (Exception e) { // directory has no index.conf - do nothing } if (content == null) { return new String[0]; } return content.split("\n"); }
private static List<Map<String, Object>> getWorkDefinitionsForPath(String parentPath, String path, String file) { String content = null; try { content = ConfFileUtils.URLContentsToString(new URL(path)); } catch (Exception e) {
private static String[] getDirectories(String path) { String content = null; try { content = ConfFileUtils.URLContentsToString( new URL(path + "/index.conf")); } catch (Exception e) { // directory has no index.conf - do nothing } if (content == null) { return new String[0]; } return content.split("\n"); }
private void loadWorkItems(String location) { String content = ConfFileUtils.URLContentsToString( ConfFileUtils.getURL( location, null, RuleBaseConfiguration.class ) ); try { this.workDefinitions.addAll( (List<Map<String, Object>>) MVEL.eval( content, new HashMap() ) ); } catch ( Throwable t ) { logger.error("Error occurred while loading work definitions " + location + "\nContinuing without reading these work definitions", t); throw new RuntimeException( "Could not parse work definitions " + location + ": " + t.getMessage() ); } }
@SuppressWarnings("unchecked") private void loadWorkItemHandlers(String location, Map<String, Object> params) { String content = ConfFileUtils.URLContentsToString( ConfFileUtils.getURL( location, null, RuleBaseConfiguration.class ) ); Map<String, WorkItemHandler> workItemHandlers = (Map<String, WorkItemHandler>) MVEL.eval( content, params ); this.workItemHandlers.putAll( workItemHandlers ); }
private static List<Map<String, Object>> getWorkDefinitionsForPath(String parentPath, String path, String file) { String content = null; try { content = ConfFileUtils.URLContentsToString(new URL(path)); } catch (Exception e) {