@Test public void matchesRunmodes_nonMatchingMulti() { assertFalse(service.matchesRunmodes("name.author.testNO")); assertFalse(service.matchesRunmodes("name.author.testNO;testNO")); assertFalse(service.matchesRunmodes("name.author.testNO;test2NO.author")); }
@Override public boolean matchesRunmodes(String name) { if (!name.contains(".")) { return true; } Set<String> runModes = slingSettings.getRunModes(); String runModeString = name.substring(name.indexOf('.') + 1); String[] combinations = runModeString.split(";"); for (String combination : combinations) { String[] modes = combination.split("\\."); if (runModes.containsAll(Arrays.asList(modes))) { return true; } } return false; }
AecuServiceImpl implements AecuService { @Override public boolean matchesRunmodes(String name) { if (!name.contains(".")) { return true; } Set<String> runModes = slingSettings.getRunModes(); String runModeString = name.substring(name.indexOf('.') + 1); String[] combinations = runModeString.split(";"); for (String combination : combinations) { String[] modes = combination.split("\\."); if (runModes.containsAll(Arrays.asList(modes))) { return true; } } return false; } }
AecuServiceImpl implements AecuService { @Override public boolean matchesRunmodes(String name) { if (!name.contains(".")) { return true; } Set<String> runModes = slingSettings.getRunModes(); String runModeString = name.substring(name.indexOf('.') + 1); String[] combinations = runModeString.split(";"); for (String combination : combinations) { String[] modes = combination.split("\\."); if (runModes.containsAll(Arrays.asList(modes))) { return true; } } return false; }  }
AecuServiceImpl implements AecuService { @Override public boolean matchesRunmodes(String name) { if (!name.contains(".")) { return true; } Set<String> runModes = slingSettings.getRunModes(); String runModeString = name.substring(name.indexOf('.') + 1); String[] combinations = runModeString.split(";"); for (String combination : combinations) { String[] modes = combination.split("\\."); if (runModes.containsAll(Arrays.asList(modes))) { return true; } } return false; }  @Override String getVersion(); @Override List<String> getFiles(String path); @Override boolean matchesRunmodes(String name); @Override boolean isValidScriptName(String name); @Override ExecutionResult execute(String path); @Override HistoryEntry createHistoryEntry(); @Override HistoryEntry finishHistoryEntry(HistoryEntry history); @Override HistoryEntry storeExecutionInHistory(HistoryEntry history, ExecutionResult result); @Override List<HistoryEntry> getHistory(int startIndex, int count); }
AecuServiceImpl implements AecuService { @Override public boolean matchesRunmodes(String name) { if (!name.contains(".")) { return true; } Set<String> runModes = slingSettings.getRunModes(); String runModeString = name.substring(name.indexOf('.') + 1); String[] combinations = runModeString.split(";"); for (String combination : combinations) { String[] modes = combination.split("\\."); if (runModes.containsAll(Arrays.asList(modes))) { return true; } } return false; }  @Override String getVersion(); @Override List<String> getFiles(String path); @Override boolean matchesRunmodes(String name); @Override boolean isValidScriptName(String name); @Override ExecutionResult execute(String path); @Override HistoryEntry createHistoryEntry(); @Override HistoryEntry finishHistoryEntry(HistoryEntry history); @Override HistoryEntry storeExecutionInHistory(HistoryEntry history, ExecutionResult result); @Override List<HistoryEntry> getHistory(int startIndex, int count);  }