target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testThatInstallSucceedsForNativeModule() throws IOException { Mockito.when(mModulePathsNo1Mock.containsNativeLib()).thenReturn(true); Mockito.when(mModulePathsNo1Mock.getNativeLibsDirectory()).thenReturn(mNativeLibsDirectoryMock); mObjectUnderTest.installModule(MODULE_NAME_NO1); Mockito.verify(mLazyLo...
public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); synchronized ServiceLike loadServiceModule(String moduleName, String className); synchronized SupportFragmen...
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); synchronized ServiceLike loadServiceModule(String moduleName, String className); synchronized SupportFragmen...
@Test public void testThatModuleIsInstalledOnlyOnce() throws IOException { Mockito.when(mModulePathsNo1Mock.containsDexFile()).thenReturn(true); Mockito.when(mModulePathsNo1Mock.getDexFile()).thenReturn(mDexFileNo1Mock); Mockito.when(mModulePathsNo1Mock.getOptimizedDexFile()).thenReturn(mOptDexFileNo1Mock); mObjectUnde...
public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); synchronized ServiceLike loadServiceModule(String moduleName, String className); synchronized SupportFragmen...
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); synchronized ServiceLike loadServiceModule(String moduleName, String className); synchronized SupportFragmen...
@Test public void testThatTwoModulesCanBeInstalled() throws IOException { Mockito.when(mModulePathsNo1Mock.containsDexFile()).thenReturn(true); Mockito.when(mModulePathsNo1Mock.getDexFile()).thenReturn(mDexFileNo1Mock); Mockito.when(mModulePathsNo1Mock.getOptimizedDexFile()).thenReturn(mOptDexFileNo1Mock); Mockito.when...
public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); synchronized ServiceLike loadServiceModule(String moduleName, String className); synchronized SupportFragmen...
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); synchronized ServiceLike loadServiceModule(String moduleName, String className); synchronized SupportFragmen...
@Test public void testThatInstallSucceedsForDexModuleWithDependency() throws IOException { List<String> dependentModules = new ArrayList<>(); dependentModules.add(MODULE_NAME_NO2); Mockito.when(mModulePathsNo1Mock.getModuleDependencies()).thenReturn(dependentModules); Mockito.when(mModulePathsNo1Mock.containsDexFile())...
public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); }
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); synchronized ServiceLike loadServiceModule(String moduleName, String className); synchronized SupportFragmen...
LazyModuleLoader { public synchronized void installModule(String moduleName) throws IOException { mLoaderAlgorithm.installModule(moduleName); } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); synchronized ServiceLike loadServiceModule(String moduleName, String className); synchronized SupportFragmen...
@Test public void testThatLoadSucceedsForDexModule() throws IOException, LazyLoadingException, ClassNotFoundException { Mockito.when(mModulePathsNo1Mock.containsDexFile()).thenReturn(true); Mockito.when(mModulePathsNo1Mock.getDexFile()).thenReturn(mDexFileNo1Mock); Mockito.when(mModulePathsNo1Mock.getOptimizedDexFile()...
public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } }
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } }
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); }
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); s...
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); s...
@Test public void testThatLoadSucceedsForNativeModule() throws IOException, LazyLoadingException, ClassNotFoundException { Mockito.when(mModulePathsNo1Mock.containsNativeLib()).thenReturn(true); Mockito.when(mModulePathsNo1Mock.getNativeLibsDirectory()).thenReturn(mNativeLibsDirectoryMock); Class returnedClass = mObjec...
public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } }
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } }
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); }
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); s...
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); s...
@Test public void testThatLoadSucceedsForDexModuleWithDependency() throws IOException, LazyLoadingException { List<String> dependentModules = new ArrayList<>(); dependentModules.add(MODULE_NAME_NO2); Mockito.when(mModulePathsNo1Mock.getModuleDependencies()).thenReturn(dependentModules); Mockito.when(mModulePathsNo1Mock...
public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } }
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } }
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); }
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); s...
LazyModuleLoader { public synchronized Class loadModule(String moduleName, String className) throws LazyLoadingException { try { return mLoaderAlgorithm.loadModule(moduleName, className); } catch (Throwable t) { throw new LazyLoadingException(t); } } LazyModuleLoader(Context context, LoaderAlgorithm loaderAlgorithm); s...
@Test public void testThatLoadSucceedsForServiceModule() throws IOException, LazyLoadingException, ClassNotFoundException { Mockito.when(mModulePathsNo1Mock.containsDexFile()).thenReturn(true); Mockito.when(mModulePathsNo1Mock.getDexFile()).thenReturn(mDexFileNo1Mock); Mockito.when(mModulePathsNo1Mock.getOptimizedDexFi...
public synchronized ServiceLike loadServiceModule(String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Context.class); ServiceLike serviceLike = (ServiceLike) c.newInstance(mCon...
LazyModuleLoader { public synchronized ServiceLike loadServiceModule(String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Context.class); ServiceLike serviceLike = (ServiceLike)...
LazyModuleLoader { public synchronized ServiceLike loadServiceModule(String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Context.class); ServiceLike serviceLike = (ServiceLike)...
LazyModuleLoader { public synchronized ServiceLike loadServiceModule(String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Context.class); ServiceLike serviceLike = (ServiceLike)...
LazyModuleLoader { public synchronized ServiceLike loadServiceModule(String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Context.class); ServiceLike serviceLike = (ServiceLike)...
@Test public void testThatLoadSucceedsForActivityModule() throws IOException, LazyLoadingException, ClassNotFoundException { Mockito.when(mModulePathsNo1Mock.containsDexFile()).thenReturn(true); Mockito.when(mModulePathsNo1Mock.getDexFile()).thenReturn(mDexFileNo1Mock); Mockito.when(mModulePathsNo1Mock.getOptimizedDexF...
public synchronized ActivityLike loadActivityModule( Activity activity, String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Activity.class); ActivityLike activityLike = (Activi...
LazyModuleLoader { public synchronized ActivityLike loadActivityModule( Activity activity, String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Activity.class); ActivityLike act...
LazyModuleLoader { public synchronized ActivityLike loadActivityModule( Activity activity, String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Activity.class); ActivityLike act...
LazyModuleLoader { public synchronized ActivityLike loadActivityModule( Activity activity, String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Activity.class); ActivityLike act...
LazyModuleLoader { public synchronized ActivityLike loadActivityModule( Activity activity, String moduleName, String className) throws LazyLoadingException { try { Class lazyLoadedClass = mLoaderAlgorithm.loadModule(moduleName, className); Constructor c = lazyLoadedClass.getConstructor(Activity.class); ActivityLike act...
@Test public void testFilter() throws Exception { StringWriter stringWriter = new StringWriter(); GuacamoleWriter writer = new FilteredGuacamoleWriter(new WriterGuacamoleWriter(stringWriter), new TestFilter()); writer.write("3.yes,1.A;2.no,1.B;3.yes,1.C;3.yes,1.D;4.nope,1.E;".toCharArray()); writer.write("1.n,3.abc;3.y...
@Override public void write(char[] chunk, int offset, int length) throws GuacamoleException { while (length > 0) { int parsed; while ((parsed = parser.append(chunk, offset, length)) != 0) { offset += parsed; length -= parsed; } if (!parser.hasNext()) throw new GuacamoleServerException("Filtered write() contained an inc...
FilteredGuacamoleWriter implements GuacamoleWriter { @Override public void write(char[] chunk, int offset, int length) throws GuacamoleException { while (length > 0) { int parsed; while ((parsed = parser.append(chunk, offset, length)) != 0) { offset += parsed; length -= parsed; } if (!parser.hasNext()) throw new Guacam...
FilteredGuacamoleWriter implements GuacamoleWriter { @Override public void write(char[] chunk, int offset, int length) throws GuacamoleException { while (length > 0) { int parsed; while ((parsed = parser.append(chunk, offset, length)) != 0) { offset += parsed; length -= parsed; } if (!parser.hasNext()) throw new Guacam...
FilteredGuacamoleWriter implements GuacamoleWriter { @Override public void write(char[] chunk, int offset, int length) throws GuacamoleException { while (length > 0) { int parsed; while ((parsed = parser.append(chunk, offset, length)) != 0) { offset += parsed; length -= parsed; } if (!parser.hasNext()) throw new Guacam...
FilteredGuacamoleWriter implements GuacamoleWriter { @Override public void write(char[] chunk, int offset, int length) throws GuacamoleException { while (length > 0) { int parsed; while ((parsed = parser.append(chunk, offset, length)) != 0) { offset += parsed; length -= parsed; } if (!parser.hasNext()) throw new Guacam...
@Test public void testGetConfiguration() throws GuacamoleException { String uri1 = "ssh: GuacamoleConfiguration config1 = QCParser.getConfiguration(uri1); assertEquals("ssh", config1.getProtocol()); assertEquals("hostname1.domain.local", config1.getParameter("hostname")); assertEquals("guacuser", config1.getParameter("...
public static GuacamoleConfiguration getConfiguration(String uri) throws GuacamoleException { URI qcUri; try { qcUri = new URI(uri); if (!qcUri.isAbsolute()) throw new TranslatableGuacamoleClientException("URI must be absolute.", "QUICKCONNECT.ERROR_NOT_ABSOLUTE_URI"); } catch (URISyntaxException e) { throw new Transla...
QCParser { public static GuacamoleConfiguration getConfiguration(String uri) throws GuacamoleException { URI qcUri; try { qcUri = new URI(uri); if (!qcUri.isAbsolute()) throw new TranslatableGuacamoleClientException("URI must be absolute.", "QUICKCONNECT.ERROR_NOT_ABSOLUTE_URI"); } catch (URISyntaxException e) { throw ...
QCParser { public static GuacamoleConfiguration getConfiguration(String uri) throws GuacamoleException { URI qcUri; try { qcUri = new URI(uri); if (!qcUri.isAbsolute()) throw new TranslatableGuacamoleClientException("URI must be absolute.", "QUICKCONNECT.ERROR_NOT_ABSOLUTE_URI"); } catch (URISyntaxException e) { throw ...
QCParser { public static GuacamoleConfiguration getConfiguration(String uri) throws GuacamoleException { URI qcUri; try { qcUri = new URI(uri); if (!qcUri.isAbsolute()) throw new TranslatableGuacamoleClientException("URI must be absolute.", "QUICKCONNECT.ERROR_NOT_ABSOLUTE_URI"); } catch (URISyntaxException e) { throw ...
QCParser { public static GuacamoleConfiguration getConfiguration(String uri) throws GuacamoleException { URI qcUri; try { qcUri = new URI(uri); if (!qcUri.isAbsolute()) throw new TranslatableGuacamoleClientException("URI must be absolute.", "QUICKCONNECT.ERROR_NOT_ABSOLUTE_URI"); } catch (URISyntaxException e) { throw ...
@Test public void testParseValue() throws GuacamoleException { assertEquals(Fish.SALMON, FAVORITE_FISH.parseValue("salmon")); assertEquals(Fish.TROUT, FAVORITE_FISH.parseValue("trout")); assertEquals(Fish.MACKEREL, FAVORITE_FISH.parseValue("mackerel")); assertEquals(Fish.TUNA, FAVORITE_FISH.parseValue("tuna")); assertE...
@Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collections.sort(legalValues); throw new GuacamoleServerExcepti...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
@Test public void testParseNullValue() throws GuacamoleException { assertNull(FAVORITE_FISH.parseValue(null)); }
@Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collections.sort(legalValues); throw new GuacamoleServerExcepti...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
@Test public void testParseInvalidValue() { try { FAVORITE_FISH.parseValue("anchovy"); fail("Invalid EnumGuacamoleProperty values should fail to parse with an exception."); } catch (GuacamoleException e) { String message = e.getMessage(); assertTrue(message.contains("\"mackerel\", \"salmon\", \"sardine\", \"trout\", \"...
@Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collections.sort(legalValues); throw new GuacamoleServerExcepti...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
@Test public void testUnannotatedEnum() throws GuacamoleException { EnumGuacamoleProperty<Vegetable> favoriteVegetable = new EnumGuacamoleProperty<Vegetable>( "potato", Vegetable.POTATO, "carrot", Vegetable.CARROT ) { @Override public String getName() { return "favorite-vegetable"; } }; assertEquals(Vegetable.POTATO, f...
@Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collections.sort(legalValues); throw new GuacamoleServerExcepti...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
@Test public void testAnnotationPrecedence() throws GuacamoleException { EnumGuacamoleProperty<Fish> favoriteFish = new EnumGuacamoleProperty<Fish>( "chinook", Fish.SALMON, "rainbow", Fish.TROUT ) { @Override public String getName() { return "favorite-fish"; } }; assertEquals(Fish.SALMON, favoriteFish.parseValue("chino...
@Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collections.sort(legalValues); throw new GuacamoleServerExcepti...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
EnumGuacamoleProperty implements GuacamoleProperty<T> { @Override public T parseValue(String value) throws GuacamoleException { if (value == null) return null; T parsedValue = valueMapping.get(value); if (parsedValue != null) return parsedValue; List<String> legalValues = new ArrayList<>(valueMapping.keySet()); Collect...
@Test public void testFilter() { TokenFilter tokenFilter = new TokenFilter(); tokenFilter.setToken("TOKEN_A", "value-of-a"); tokenFilter.setToken("TOKEN_B", "value-of-b"); tokenFilter.setToken("TOKEN_C", "Value-of-C"); assertEquals( "$${NOPE}hellovalue-of-aworldvalue-of-b${NOT_A_TOKEN}", tokenFilter.filter("$$${NOPE}he...
public String filter(String input) { StringBuilder output = new StringBuilder(); Matcher tokenMatcher = tokenPattern.matcher(input); int endOfLastMatch = 0; while (tokenMatcher.find()) { String literal = tokenMatcher.group(LEADING_TEXT_GROUP); String escape = tokenMatcher.group(ESCAPE_CHAR_GROUP); String modifier = tok...
TokenFilter { public String filter(String input) { StringBuilder output = new StringBuilder(); Matcher tokenMatcher = tokenPattern.matcher(input); int endOfLastMatch = 0; while (tokenMatcher.find()) { String literal = tokenMatcher.group(LEADING_TEXT_GROUP); String escape = tokenMatcher.group(ESCAPE_CHAR_GROUP); String ...
TokenFilter { public String filter(String input) { StringBuilder output = new StringBuilder(); Matcher tokenMatcher = tokenPattern.matcher(input); int endOfLastMatch = 0; while (tokenMatcher.find()) { String literal = tokenMatcher.group(LEADING_TEXT_GROUP); String escape = tokenMatcher.group(ESCAPE_CHAR_GROUP); String ...
TokenFilter { public String filter(String input) { StringBuilder output = new StringBuilder(); Matcher tokenMatcher = tokenPattern.matcher(input); int endOfLastMatch = 0; while (tokenMatcher.find()) { String literal = tokenMatcher.group(LEADING_TEXT_GROUP); String escape = tokenMatcher.group(ESCAPE_CHAR_GROUP); String ...
TokenFilter { public String filter(String input) { StringBuilder output = new StringBuilder(); Matcher tokenMatcher = tokenPattern.matcher(input); int endOfLastMatch = 0; while (tokenMatcher.find()) { String literal = tokenMatcher.group(LEADING_TEXT_GROUP); String escape = tokenMatcher.group(ESCAPE_CHAR_GROUP); String ...
@Test public void testFilterValues() { TokenFilter tokenFilter = new TokenFilter(); tokenFilter.setToken("TOKEN_A", "value-of-a"); tokenFilter.setToken("TOKEN_B", "value-of-b"); Map<Integer, String> map = new HashMap<Integer, String>(); map.put(1, "$$${NOPE}hello${TOKEN_A}world${TOKEN_B}$${NOT_A_TOKEN}"); map.put(2, "$...
public void filterValues(Map<?, String> map) { for (Map.Entry<?, String> entry : map.entrySet()) { String value = entry.getValue(); if (value != null) entry.setValue(filter(value)); } }
TokenFilter { public void filterValues(Map<?, String> map) { for (Map.Entry<?, String> entry : map.entrySet()) { String value = entry.getValue(); if (value != null) entry.setValue(filter(value)); } } }
TokenFilter { public void filterValues(Map<?, String> map) { for (Map.Entry<?, String> entry : map.entrySet()) { String value = entry.getValue(); if (value != null) entry.setValue(filter(value)); } } TokenFilter(); TokenFilter(Map<String, String> tokenValues); }
TokenFilter { public void filterValues(Map<?, String> map) { for (Map.Entry<?, String> entry : map.entrySet()) { String value = entry.getValue(); if (value != null) entry.setValue(filter(value)); } } TokenFilter(); TokenFilter(Map<String, String> tokenValues); void setToken(String name, String value); String getToken(...
TokenFilter { public void filterValues(Map<?, String> map) { for (Map.Entry<?, String> entry : map.entrySet()) { String value = entry.getValue(); if (value != null) entry.setValue(filter(value)); } } TokenFilter(); TokenFilter(Map<String, String> tokenValues); void setToken(String name, String value); String getToken(...
@Test public void testCanonicalize() { assertEquals("A", TokenName.canonicalize("a")); assertEquals("B", TokenName.canonicalize("b")); assertEquals("1", TokenName.canonicalize("1")); assertEquals("SOME_URL", TokenName.canonicalize("someURL")); assertEquals("LOWERCASE_WITH_DASHES", TokenName.canonicalize("lowercase-with...
public static String canonicalize(final String name, final String prefix) { Matcher groupMatcher = STRING_NAME_GROUPING.matcher(name); if (!groupMatcher.find()) return prefix + name.toUpperCase(); StringBuilder builder = new StringBuilder(prefix); builder.append(groupMatcher.group(0).toUpperCase()); while (groupMatcher...
TokenName { public static String canonicalize(final String name, final String prefix) { Matcher groupMatcher = STRING_NAME_GROUPING.matcher(name); if (!groupMatcher.find()) return prefix + name.toUpperCase(); StringBuilder builder = new StringBuilder(prefix); builder.append(groupMatcher.group(0).toUpperCase()); while (...
TokenName { public static String canonicalize(final String name, final String prefix) { Matcher groupMatcher = STRING_NAME_GROUPING.matcher(name); if (!groupMatcher.find()) return prefix + name.toUpperCase(); StringBuilder builder = new StringBuilder(prefix); builder.append(groupMatcher.group(0).toUpperCase()); while (...
TokenName { public static String canonicalize(final String name, final String prefix) { Matcher groupMatcher = STRING_NAME_GROUPING.matcher(name); if (!groupMatcher.find()) return prefix + name.toUpperCase(); StringBuilder builder = new StringBuilder(prefix); builder.append(groupMatcher.group(0).toUpperCase()); while (...
TokenName { public static String canonicalize(final String name, final String prefix) { Matcher groupMatcher = STRING_NAME_GROUPING.matcher(name); if (!groupMatcher.find()) return prefix + name.toUpperCase(); StringBuilder builder = new StringBuilder(prefix); builder.append(groupMatcher.group(0).toUpperCase()); while (...
@Test public void testInvalidVersionParse() { Assert.assertNull(GuacamoleProtocolVersion.parseVersion("potato")); Assert.assertNull(GuacamoleProtocolVersion.parseVersion("VERSION_")); Assert.assertNull(GuacamoleProtocolVersion.parseVersion("VERSION___")); Assert.assertNull(GuacamoleProtocolVersion.parseVersion("VERSION...
public static GuacamoleProtocolVersion parseVersion(String version) { Matcher versionMatcher = VERSION_PATTERN.matcher(version); if (!versionMatcher.matches()) return null; return new GuacamoleProtocolVersion( Integer.parseInt(versionMatcher.group(1)), Integer.parseInt(versionMatcher.group(2)), Integer.parseInt(version...
GuacamoleProtocolVersion { public static GuacamoleProtocolVersion parseVersion(String version) { Matcher versionMatcher = VERSION_PATTERN.matcher(version); if (!versionMatcher.matches()) return null; return new GuacamoleProtocolVersion( Integer.parseInt(versionMatcher.group(1)), Integer.parseInt(versionMatcher.group(2)...
GuacamoleProtocolVersion { public static GuacamoleProtocolVersion parseVersion(String version) { Matcher versionMatcher = VERSION_PATTERN.matcher(version); if (!versionMatcher.matches()) return null; return new GuacamoleProtocolVersion( Integer.parseInt(versionMatcher.group(1)), Integer.parseInt(versionMatcher.group(2)...
GuacamoleProtocolVersion { public static GuacamoleProtocolVersion parseVersion(String version) { Matcher versionMatcher = VERSION_PATTERN.matcher(version); if (!versionMatcher.matches()) return null; return new GuacamoleProtocolVersion( Integer.parseInt(versionMatcher.group(1)), Integer.parseInt(versionMatcher.group(2)...
GuacamoleProtocolVersion { public static GuacamoleProtocolVersion parseVersion(String version) { Matcher versionMatcher = VERSION_PATTERN.matcher(version); if (!versionMatcher.matches()) return null; return new GuacamoleProtocolVersion( Integer.parseInt(versionMatcher.group(1)), Integer.parseInt(versionMatcher.group(2)...
@Test public void testToString() { Assert.assertEquals("VERSION_1_0_0", GuacamoleProtocolVersion.VERSION_1_0_0.toString()); Assert.assertEquals("VERSION_1_1_0", GuacamoleProtocolVersion.VERSION_1_1_0.toString()); Assert.assertEquals("VERSION_12_103_398", new GuacamoleProtocolVersion(12, 103, 398).toString()); }
@Override public String toString() { return "VERSION_" + getMajor() + "_" + getMinor() + "_" + getPatch(); }
GuacamoleProtocolVersion { @Override public String toString() { return "VERSION_" + getMajor() + "_" + getMinor() + "_" + getPatch(); } }
GuacamoleProtocolVersion { @Override public String toString() { return "VERSION_" + getMajor() + "_" + getMinor() + "_" + getPatch(); } GuacamoleProtocolVersion(int major, int minor, int patch); }
GuacamoleProtocolVersion { @Override public String toString() { return "VERSION_" + getMajor() + "_" + getMinor() + "_" + getPatch(); } GuacamoleProtocolVersion(int major, int minor, int patch); int getMajor(); int getMinor(); int getPatch(); boolean atLeast(GuacamoleProtocolVersion otherVersion); static GuacamoleProto...
GuacamoleProtocolVersion { @Override public String toString() { return "VERSION_" + getMajor() + "_" + getMinor() + "_" + getPatch(); } GuacamoleProtocolVersion(int major, int minor, int patch); int getMajor(); int getMinor(); int getPatch(); boolean atLeast(GuacamoleProtocolVersion otherVersion); static GuacamoleProto...
@Test public void testFilter() throws Exception { final String test = "3.yes,1.A;2.no,1.B;3.yes,1.C;3.yes,1.D;4.nope,1.E;"; GuacamoleReader reader = new FilteredGuacamoleReader(new ReaderGuacamoleReader(new StringReader(test)), new TestFilter()); GuacamoleInstruction instruction; instruction = reader.readInstruction();...
@Override public GuacamoleInstruction readInstruction() throws GuacamoleException { GuacamoleInstruction filteredInstruction; do { GuacamoleInstruction unfilteredInstruction = reader.readInstruction(); if (unfilteredInstruction == null) return null; filteredInstruction = filter.filter(unfilteredInstruction); } while (f...
FilteredGuacamoleReader implements GuacamoleReader { @Override public GuacamoleInstruction readInstruction() throws GuacamoleException { GuacamoleInstruction filteredInstruction; do { GuacamoleInstruction unfilteredInstruction = reader.readInstruction(); if (unfilteredInstruction == null) return null; filteredInstructi...
FilteredGuacamoleReader implements GuacamoleReader { @Override public GuacamoleInstruction readInstruction() throws GuacamoleException { GuacamoleInstruction filteredInstruction; do { GuacamoleInstruction unfilteredInstruction = reader.readInstruction(); if (unfilteredInstruction == null) return null; filteredInstructi...
FilteredGuacamoleReader implements GuacamoleReader { @Override public GuacamoleInstruction readInstruction() throws GuacamoleException { GuacamoleInstruction filteredInstruction; do { GuacamoleInstruction unfilteredInstruction = reader.readInstruction(); if (unfilteredInstruction == null) return null; filteredInstructi...
FilteredGuacamoleReader implements GuacamoleReader { @Override public GuacamoleInstruction readInstruction() throws GuacamoleException { GuacamoleInstruction filteredInstruction; do { GuacamoleInstruction unfilteredInstruction = reader.readInstruction(); if (unfilteredInstruction == null) return null; filteredInstructi...
@Test public void testReader() throws GuacamoleException { final String test = "1.a,2.bc,3.def,10.helloworld;4.test,5.test2;0.;3.foo;"; GuacamoleReader reader = new ReaderGuacamoleReader(new StringReader(test)); GuacamoleInstruction instruction; instruction = reader.readInstruction(); assertNotNull(instruction); assert...
@Override public GuacamoleInstruction readInstruction() throws GuacamoleException { char[] instructionBuffer = read(); if (instructionBuffer == null) return null; int elementStart = 0; Deque<String> elements = new LinkedList<String>(); while (elementStart < instructionBuffer.length) { int lengthEnd = -1; for (int i=ele...
ReaderGuacamoleReader implements GuacamoleReader { @Override public GuacamoleInstruction readInstruction() throws GuacamoleException { char[] instructionBuffer = read(); if (instructionBuffer == null) return null; int elementStart = 0; Deque<String> elements = new LinkedList<String>(); while (elementStart < instruction...
ReaderGuacamoleReader implements GuacamoleReader { @Override public GuacamoleInstruction readInstruction() throws GuacamoleException { char[] instructionBuffer = read(); if (instructionBuffer == null) return null; int elementStart = 0; Deque<String> elements = new LinkedList<String>(); while (elementStart < instruction...
ReaderGuacamoleReader implements GuacamoleReader { @Override public GuacamoleInstruction readInstruction() throws GuacamoleException { char[] instructionBuffer = read(); if (instructionBuffer == null) return null; int elementStart = 0; Deque<String> elements = new LinkedList<String>(); while (elementStart < instruction...
ReaderGuacamoleReader implements GuacamoleReader { @Override public GuacamoleInstruction readInstruction() throws GuacamoleException { char[] instructionBuffer = read(); if (instructionBuffer == null) return null; int elementStart = 0; Deque<String> elements = new LinkedList<String>(); while (elementStart < instruction...
@Test public void testGenerateSHA1() { final byte[] key = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' }; try { final TOTPGenerator totp = new TOTPGenerator(key, TOTPGenerator.Mode.SHA1, 8); assertEquals("94287082", totp.generate(59)); assertEquals("07081804", tot...
public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset + 3] & 0xFF); re...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
@Test public void testGenerateSHA256() { final byte[] key = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2' }; try { final TOTPGenerator totp = new TOTPGenerator(key, TOTPGenerator.Mode.SHA256, 8); assertEqu...
public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset + 3] & 0xFF); re...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
@Test public void testGenerateSHA512() { final byte[] key = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1', '2'...
public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset + 3] & 0xFF); re...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
TOTPGenerator { public String generate(long time) { long counter = (time - startTime) / timeStep; byte[] hash = getHMAC(Longs.toByteArray(counter)); int offset = hash[hash.length - 1] & 0xF; int binary = ((hash[offset] & 0x7F) << 24) | ((hash[offset + 1] & 0xFF) << 16) | ((hash[offset + 2] & 0xFF) << 8) | (hash[offset ...
@Test public void testParseQueryString() throws UnsupportedEncodingException { final String queryString = "param1=value1&param2=value2=3&param3=value%3D3&param4=value%264"; Map<String, String> queryMap = QCParser.parseQueryString(queryString); assertEquals("value1", queryMap.get("param1")); assertEquals("value2=3", que...
public static Map<String, String> parseQueryString(String queryStr) throws UnsupportedEncodingException { List<String> paramList = Arrays.asList(queryStr.split("&")); Map<String, String> parameters = new HashMap<String,String>(); for (String param : paramList) { String[] paramArray = param.split("=", 2); parameters.put...
QCParser { public static Map<String, String> parseQueryString(String queryStr) throws UnsupportedEncodingException { List<String> paramList = Arrays.asList(queryStr.split("&")); Map<String, String> parameters = new HashMap<String,String>(); for (String param : paramList) { String[] paramArray = param.split("=", 2); par...
QCParser { public static Map<String, String> parseQueryString(String queryStr) throws UnsupportedEncodingException { List<String> paramList = Arrays.asList(queryStr.split("&")); Map<String, String> parameters = new HashMap<String,String>(); for (String param : paramList) { String[] paramArray = param.split("=", 2); par...
QCParser { public static Map<String, String> parseQueryString(String queryStr) throws UnsupportedEncodingException { List<String> paramList = Arrays.asList(queryStr.split("&")); Map<String, String> parameters = new HashMap<String,String>(); for (String param : paramList) { String[] paramArray = param.split("=", 2); par...
QCParser { public static Map<String, String> parseQueryString(String queryStr) throws UnsupportedEncodingException { List<String> paramList = Arrays.asList(queryStr.split("&")); Map<String, String> parameters = new HashMap<String,String>(); for (String param : paramList) { String[] paramArray = param.split("=", 2); par...
@Test public void testParseUserInfo() throws UnsupportedEncodingException { Map<String, String> userInfoMap; GuacamoleConfiguration config1 = new GuacamoleConfiguration(); QCParser.parseUserInfo("guacuser:secretpw", config1); assertEquals("guacuser", config1.getParameter("username")); assertEquals("secretpw", config1.g...
public static void parseUserInfo(String userInfo, GuacamoleConfiguration config) throws UnsupportedEncodingException { Matcher userinfoMatcher = userinfoPattern.matcher(userInfo); if (userinfoMatcher.matches()) { String username = userinfoMatcher.group(USERNAME_GROUP); String password = userinfoMatcher.group(PASSWORD_G...
QCParser { public static void parseUserInfo(String userInfo, GuacamoleConfiguration config) throws UnsupportedEncodingException { Matcher userinfoMatcher = userinfoPattern.matcher(userInfo); if (userinfoMatcher.matches()) { String username = userinfoMatcher.group(USERNAME_GROUP); String password = userinfoMatcher.group...
QCParser { public static void parseUserInfo(String userInfo, GuacamoleConfiguration config) throws UnsupportedEncodingException { Matcher userinfoMatcher = userinfoPattern.matcher(userInfo); if (userinfoMatcher.matches()) { String username = userinfoMatcher.group(USERNAME_GROUP); String password = userinfoMatcher.group...
QCParser { public static void parseUserInfo(String userInfo, GuacamoleConfiguration config) throws UnsupportedEncodingException { Matcher userinfoMatcher = userinfoPattern.matcher(userInfo); if (userinfoMatcher.matches()) { String username = userinfoMatcher.group(USERNAME_GROUP); String password = userinfoMatcher.group...
QCParser { public static void parseUserInfo(String userInfo, GuacamoleConfiguration config) throws UnsupportedEncodingException { Matcher userinfoMatcher = userinfoPattern.matcher(userInfo); if (userinfoMatcher.matches()) { String username = userinfoMatcher.group(USERNAME_GROUP); String password = userinfoMatcher.group...
@Test public void testGetReturnsAResponse() { final RootResource resource = new RootResource(); final APIRootResponse response = resource.get(TestHelpers.generateSecureSecurityContext()); assertThat(response).isNotNull(); }
@GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); }
RootResource { @GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); } }
RootResource { @GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); } }
RootResource { @GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); } @GET @PermitAll APIRootResponse get(@Context SecurityContext c...
RootResource { @GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); } @GET @PermitAll APIRootResponse get(@Context SecurityContext c...
@Test public void testCopyPathCopiesDirectoryRecursivelyFromSourceToDestination() throws IOException { final Path sourceDir = Files.createTempDirectory(generateAlphanumStr()); final Path subdir = Files.createDirectory(sourceDir.resolve(generateAlphanumStr())); final Path fileInSubdir = Files.createFile(subdir.resolve(g...
public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(dir)); try {...
Helpers { public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(di...
Helpers { public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(di...
Helpers { public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(di...
Helpers { public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(di...
@Test public void testCopyPathCopiesDirectoryRecursivelyAndMaintainsExecutePermissions() throws IOException { final Path sourceDir = Files.createTempDirectory(generateAlphanumStr()); final Path subdir = Files.createDirectory(sourceDir.resolve(generateAlphanumStr())); final Path fileInSubdir = Files.createFile(subdir.re...
public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(dir)); try {...
Helpers { public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(di...
Helpers { public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(di...
Helpers { public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(di...
Helpers { public static void copyPath(Path source, Path destination) throws IOException { Files.walkFileTree(source, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { Path destinationDir = destination.resolve(source.relativize(di...
@Test(expected = NullPointerException.class) public void testFilterThrowsNullPointerExceptionWhenProvidedWithNullContainerRequestContext() throws AuthenticationException, IOException { final JsonWebTokenAuthFilter filter = createValidAuthFilterInstance(); filter.filter(null); }
@Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == null) throw new WebApplicationException("Authorization he...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
@Test public void testFilterDoesNotThrowWhenProvidedWithDefaultDummyArguments() throws AuthenticationException, IOException { final JsonWebTokenAuthFilter filter = createValidAuthFilterInstance(); final ContainerRequestContext request = createDummyRequest(); filter.filter(request); }
@Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == null) throw new WebApplicationException("Authorization he...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
@Test(expected = WebApplicationException.class) public void testFilterThrowsWebApplicationExceptionIfAuthenticatorThrowsAuthenticationException() throws AuthenticationException, IOException { final Authenticator<String, Principal> authenticator = mock(Authenticator.class); when(authenticator.authenticate(any())).thenTh...
@Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == null) throw new WebApplicationException("Authorization he...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
@Test(expected = WebApplicationException.class) public void testFilterThrowsWebApplicationExceptionIfAuthenticatorReturnsAnEmptyOptional() throws AuthenticationException, IOException { final Authenticator<String, Principal> authenticator = mock(Authenticator.class); when(authenticator.authenticate(any())).thenReturn(Op...
@Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == null) throw new WebApplicationException("Authorization he...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
@Test(expected = WebApplicationException.class) public void testFilterThrowsWebApplicationExceptionIfRequestDoesNotHaveAnAuthenticationHeader() throws AuthenticationException, IOException { final JsonWebTokenAuthFilter filter = createValidAuthFilterInstance(); final ContainerRequestContext request = createRequestWithAu...
@Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == null) throw new WebApplicationException("Authorization he...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
@Test public void testFilterSetsSecurityContextIfAuthenticationSuccessful() throws AuthenticationException, IOException { final JsonWebTokenAuthFilter filter = createValidAuthFilterInstance(); final ContainerRequestContext request = createDummyRequest(); assertThat(request.getSecurityContext()).isNull(); filter.filter(...
@Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == null) throw new WebApplicationException("Authorization he...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
@Test public void testSecurityContextIsAssignedToPrincipalReturnedByAuthenticator() throws AuthenticationException, IOException { final String username = TestHelpers.generateRandomString(); final Principal injectedPrincipal = new PrincipalImpl(username); final Authenticator<String, Principal> authenticator = mock(Authe...
@Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == null) throw new WebApplicationException("Authorization he...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
@Test public void testSecurityContextUsesProvidedAuthorizer() throws AuthenticationException, IOException { final Authorizer<Principal> authorizer = mock(Authorizer.class); when(authorizer.authorize(any(), any())).thenReturn(true); final JsonWebTokenAuthFilter filter = createAuthFilterWithAuthorizer(authorizer); final ...
@Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == null) throw new WebApplicationException("Authorization he...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
@Test(expected = WebApplicationException.class) public void testFetchJobSpecDetailsByIdThrowsWebApplicationExceptionIfJobSpecIdIsNull() throws IOException { final JobSpecDAO jobSpecDAO = mock(JobSpecDAO.class); final JobSpecResource jobSpecResource = new JobSpecResource(jobSpecDAO, DEFAULT_PAGE_SIZE); final SecurityCon...
@GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returned", content = @Con...
JobSpecResource { @GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returne...
JobSpecResource { @GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returne...
JobSpecResource { @GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returne...
JobSpecResource { @GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returne...
@Test public void testFilterCallsAuthenticatorWithTheJwtToken() throws AuthenticationException, IOException { final Authenticator<String, Principal> authenticator = generateAlwaysAuthenticatesMock(); final JsonWebTokenAuthFilter<Principal> filter = createAuthFilterWithAuthenticator(authenticator); final String authHead...
@Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == null) throw new WebApplicationException("Authorization he...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
JsonWebTokenAuthFilter extends AuthFilter<String, P> { @Override public void filter(ContainerRequestContext containerRequestContext) throws NullPointerException, WebApplicationException { final String authorizationHeaderValue = containerRequestContext.getHeaderString("Authorization"); if (authorizationHeaderValue == nu...
@Test public void testCreateAuthFilterReturnsAnAuthFilter() { final String secretKey = TestHelpers.generateBase64SecretKey(); final JsonWebTokenConfig jwtConfig = new JsonWebTokenConfig(secretKey); final AuthenticationBootstrap authBootstrap = TestHelpers.createTypicalAuthBootstrap(); final AuthFilter ret = jwtConfig.c...
@Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSignatureAlgorithm().toString()); return new JsonWebToke...
JsonWebTokenConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSig...
JsonWebTokenConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSig...
JsonWebTokenConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSig...
JsonWebTokenConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSig...
@Test public void testTheReturnedAuthFilterAppliesASecurityContextToAValidRequest() throws IOException { final String secretKey = TestHelpers.generateBase64SecretKey(); final String username = TestHelpers.generateRandomString(); final JsonWebTokenConfig jwtConfig = new JsonWebTokenConfig(secretKey); final Authenticatio...
@Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSignatureAlgorithm().toString()); return new JsonWebToke...
JsonWebTokenConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSig...
JsonWebTokenConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSig...
JsonWebTokenConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSig...
JsonWebTokenConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey); final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSig...
@Test(expected = NullPointerException.class) public void testAuthenticateThrowsIfProvidedANullString() throws AuthenticationException { final JsonWebTokenAuthenticator authenticator = createValidAuthenticatorInstance(); authenticator.authenticate(null); }
@Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final String username = claims.getBody().getSubject(); final Principal principal =...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { @Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final Stri...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { @Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final Stri...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { @Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final Stri...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { @Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final Stri...
@Test(expected = AuthenticationException.class) public void testAuthenticateThrowsIfProvidedAnInvalidString() throws AuthenticationException { final JsonWebTokenAuthenticator authenticator = createValidAuthenticatorInstance(); final String invalidString = TestHelpers.generateRandomString(); authenticator.authenticate(i...
@Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final String username = claims.getBody().getSubject(); final Principal principal =...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { @Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final Stri...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { @Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final Stri...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { @Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final Stri...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { @Override public Optional<Principal> authenticate(String s) throws NullPointerException, AuthenticationException { Objects.requireNonNull(s); try { final Jws<Claims> claims = Jwts.parser().setSigningKey(this.secretKey).parseClaimsJws(s); final Stri...
@Test(expected = NullPointerException.class) public void testCreateJwtTokenThrowsIfUserIsNull() { final JsonWebTokenAuthenticator authenticator = createValidAuthenticatorInstance(); authenticator.createJwtToken(null); }
public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); }
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } }
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorith...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorith...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorith...
@Test public void testCreateJwtTokenDoesNotReturnNull() { final Principal Principal = generatePrincipal(); final JsonWebTokenAuthenticator authenticator = createValidAuthenticatorInstance(); final String returnedToken = authenticator.createJwtToken(Principal); assertThat(returnedToken).isNotNull(); }
public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); }
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } }
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorith...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorith...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorith...
@Test public void testCreateJwtTokenReturnsValidJWTString() { final Key secretKey = createSecretKey(); final Principal Principal = generatePrincipal(); final JsonWebTokenAuthenticator authenticator = createAuthenticatorWithSecretKey(secretKey); final String returnedToken = authenticator.createJwtToken(Principal); asser...
public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); }
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } }
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorith...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorith...
JsonWebTokenAuthenticator implements Authenticator<String, Principal> { public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) { return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact(); } JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorith...
@Test(expected = NullPointerException.class) public void testCreateAuthFilterThrowsIfClassNameIsNull() { final CustomAuthenticatorConfig config = new CustomAuthenticatorConfig(null); config.createAuthFilter(createTypicalAuthBootstrap()); }
@Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigClass = toAuthConfigClass(klass); final AuthenticationConfig lo...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
@Test(expected = RuntimeException.class) public void testCreateAuthFilterIfClassNameDoesNotExistOnClassPath() { final CustomAuthenticatorConfig config = new CustomAuthenticatorConfig(generateClassName()); config.createAuthFilter(createTypicalAuthBootstrap()); }
@Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigClass = toAuthConfigClass(klass); final AuthenticationConfig lo...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
@Test public void testFetchJobSpecDetailsByIdReturnsWhateverTheDAOReturns() throws IOException { final JobSpec jobSpecFromDAO = generateJobSpec(); final JobSpecDAO jobSpecDAO = mock(JobSpecDAO.class); when(jobSpecDAO.getJobSpecById(any())).thenReturn(Optional.of(jobSpecFromDAO)); final JobSpecResource jobSpecResource =...
@GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returned", content = @Con...
JobSpecResource { @GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returne...
JobSpecResource { @GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returne...
JobSpecResource { @GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returne...
JobSpecResource { @GET @Path("{job-spec-id}") @Operation( summary = "Get a a job spec.", description = "If found, returns a job spec. A job spec describes declaratively what a " + "job needs in order to run.") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job specification found and returne...
@Test(expected = RuntimeException.class) public void testCreateAuthFilterIfClassDoesNotDeriveFromAuthenticationConfig() { final CustomAuthenticatorConfig config = new CustomAuthenticatorConfig(Object.class.getName()); config.createAuthFilter(createTypicalAuthBootstrap()); }
@Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigClass = toAuthConfigClass(klass); final AuthenticationConfig lo...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
@Test public void testCreateAuthFilterDoesNotThrowIfClassDoesDeriveFromAuthenticationConfig() { final CustomAuthenticatorConfig config = new CustomAuthenticatorConfig(NullCustomAuthConfig.class.getName()); config.createAuthFilter(createTypicalAuthBootstrap()); }
@Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigClass = toAuthConfigClass(klass); final AuthenticationConfig lo...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigCla...
@Test public void testFetchJobSummariesReturnsASummariesResponseContainingSummariesFromTheDAO() throws IOException { final List<JobDetails> summariesReturnedByDAO = generateRandomJobDetails(); final JobDAO jobDAO = mockJobDAOThatReturns(summariesReturnedByDAO); final JobResource jobResource = resourceThatUses(jobDAO); ...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesCallsTheDAOWithPageIndex0IfPageIsNotSpecified() throws IOException { final List<JobDetails> summariesReturnedByDAO = generateRandomJobDetails(); final JobDAO jobDAO = mockJobDAOThatReturns(summariesReturnedByDAO); final JobResource jobResource = resourceThatUses(jobDAO); jobResour...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesCallsTheDAOWithSpecifiedPageIndex() throws IOException { final List<JobDetails> summariesReturnedByDAO = generateRandomJobDetails(); final JobDAO jobDAO = mockJobDAOThatReturns(summariesReturnedByDAO); final JobResource jobResource = resourceThatUses(jobDAO); final int requestedPa...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test(expected = WebApplicationException.class) public void testFetchJobSummariesThrowsExceptionIfSpecifiedPageIndexIsNegative() throws IOException { final List<JobDetails> jobSummaries = generateRandomJobDetails(); final JobDAO jobDAO = mockJobDAOThatReturns(jobSummaries); final JobResource jobResource = resourceThatU...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesCallsTheDAOWithTheDefaultPageSizeIfPageSizeNotSpecifed() throws IOException { final List<JobDetails> jobSummaries = generateRandomJobDetails(); final JobDAO jobDAO = mockJobDAOThatReturns(jobSummaries); final int defaultPageSize = TestHelpers.randomIntBetween(5, 15); final JobReso...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesCallsTheDAOWithThePageSizeIfItIsSpecified() throws IOException { final List<JobDetails> jobSummaries = generateRandomJobDetails(); final JobDAO jobDAO = mockJobDAOThatReturns(jobSummaries); final JobResource jobResource = resourceThatUses(jobDAO); final int requestedPageSize = Tes...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test(expected = WebApplicationException.class) public void testFetchJobSummariesThrowsExceptionIfRequestedPageSizeIsNegative() throws IOException { final List<JobDetails> jobSummaries = generateRandomJobDetails(); final JobDAO jobDAO = mockJobDAOThatReturns(jobSummaries); final JobResource jobResource = resourceThatUs...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesCallsTheQueryOverloadOnTheDAOIfAQueryWasSpecified() throws IOException { final List<JobDetails> jobSummaries = generateRandomJobDetails(); final JobDAO jobDAO = mockJobDAOThatReturns(jobSummaries); final JobResource jobResource = resourceThatUses(jobDAO); final String queryString ...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testGetResponseContainsALinkToTheV1Root() { final RootResource resource = new RootResource(); final APIRootResponse response = resource.get(TestHelpers.generateSecureSecurityContext()); assertHasKeyWithValue( response.getLinks(), "v1", Constants.HTTP_V1_ROOT); }
@GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); }
RootResource { @GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); } }
RootResource { @GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); } }
RootResource { @GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); } @GET @PermitAll APIRootResponse get(@Context SecurityContext c...
RootResource { @GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); } @GET @PermitAll APIRootResponse get(@Context SecurityContext c...
@Test public void testFetchJobSummariesContainsLinksToAbortJobIfJobIsAbortable() throws IOException { final List<JobDetails> jobSummariesWithAbortableStatus = generateRandomList(10, 20, () -> generateJobDetailsWithStatus(JobStatus.RUNNING)); final JobDAO jobDAO = mockJobDAOThatReturns(jobSummariesWithAbortableStatus); ...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesDoesNotContainsLinksToAbortJobIfJobIsNotAbortable() throws IOException { final List<JobDetails> notAbortableSummaries = generateRandomList(10, 20, () -> generateJobDetailsWithStatus(JobStatus.FINISHED)); final JobDAO jobDAO = mockJobDAOThatReturns(notAbortableSummaries); final Job...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesContainsLinksToJobStdoutIfJobHasStdout() throws IOException { final List<JobDetails> summaries = generateRandomJobDetails(); final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.getJobs(anyInt(), anyInt())).thenReturn(summaries); when(jobDAO.hasStdout(any())).thenReturn(true); fi...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesDoesNotContainLinksToStdoutIfJobHasNoStdout() throws IOException { final List<JobDetails> jobSummaries = generateRandomJobDetails(); final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.getJobs(anyInt(), anyInt())).thenReturn(jobSummaries); when(jobDAO.hasStdout(any())).thenRetur...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesContainsLinksToJobStderrIfJobHasStderr() throws IOException { final List<JobDetails> jobSummaries = generateRandomJobDetails(); final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.getJobs(anyInt(), anyInt())).thenReturn(jobSummaries); when(jobDAO.hasStderr(any())).thenReturn(tru...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test public void testFetchJobSummariesDoesNotContainLinksToStderrIfJobHasNoStderr() throws IOException { final List<JobDetails> jobSummaries = generateRandomJobDetails(); final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.getJobs(anyInt(), anyInt())).thenReturn(jobSummaries); when(jobDAO.hasStderr(any())).thenRetur...
@GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @ApiResponse( r...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
JobResource { @GET @Operation( summary = "Retrieve jobs managed by the system.", description = "Gets *some* of the jobs managed by the system. The response does not necessarily " + "contain *all* the jobs managed by the system because pagination " + "and client permissions may hide entries. ") @ApiResponses(value = { @...
@Test(expected = WebApplicationException.class) public void testFetchJobDetailsByIdThrowsWebApplicationExceptionIfJobIdIsNotSpecified() { final JobResource jobResource = resourceThatUses(mock(JobDAO.class)); jobResource.getJobDetailsById(TestHelpers.generateSecureSecurityContext(), null); }
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test public void testFetchJobDetailsByIdCallsTheDAOWithTheProvidedJobIdAndReturnsTheJobDetailsFromTheDAO() throws IOException { final JobDetails jobDetailsFromDAO = generateValidJobDetails(); final JobDAO jobDAO = mockJobDAOThatReturns(Optional.of(jobDetailsFromDAO)); final JobResource jobResource = resourceThatUses(j...
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test public void testFetchJobDetailsByIdReturnsEmptyOptionalIfJobIDCannotBeFoundInTheJobsDAO() throws IOException { final JobDAO jobDAO = mockJobDAOThatReturns(Optional.empty()); final JobResource jobResource = resourceThatUses(jobDAO); final JobId jobId = TestHelpers.generateJobId(); final Optional<APIJobDetails> res...
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test(expected = WebApplicationException.class) public void testFetchJobDetailsByIdThrowsWebApplicationExceptionIfJobIdIsNull() throws IOException { final JobDAO jobDAO = mockJobDAOThatReturns(Optional.empty()); final JobResource jobResource = resourceThatUses(jobDAO); jobResource.getJobDetailsById(TestHelpers.generate...
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test public void testFetchJobSpecSummariesReturnsAResponseIfCalledWithOnlyEmptyOptionals() throws IOException { final List<JobSpecSummary> jobSpecSummariesReturnedByDAO = generateNJobSpecSummaries(5); final JobSpecDAO jobSpecDAO = mock(JobSpecDAO.class); when(jobSpecDAO.getJobSpecSummaries(anyInt(), anyInt())).thenRet...
@GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is because paginatio...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
@Test public void testFetchJobDetailsByIdSetsASelfRESTLink() { final APIJobDetails jobDetailsReturnedByDAO = generateJobDetailsWithStatus(JobStatus.RUNNING); final JobDAO jobDAO = mockJobDAOThatReturns(Optional.of(jobDetailsReturnedByDAO)); final JobResource jobResource = resourceThatUses(jobDAO); final APIJobDetails A...
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test public void testFetchJobDetailsByIdSetsAnInputsRESTLink() { final APIJobDetails jobDetailsReturnedByDAO = generateJobDetailsWithStatus(JobStatus.RUNNING); final JobDAO jobDAO = mockJobDAOThatReturns(Optional.of(jobDetailsReturnedByDAO)); when(jobDAO.hasJobInputs(any())).thenReturn(true); final JobResource jobReso...
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test public void testFetchJobDetailsByIdSetsAnOutputsRESTLink() { final APIJobDetails jobDetailsReturnedByDAO = generateJobDetailsWithStatus(JobStatus.RUNNING); final JobDAO jobDAO = mockJobDAOThatReturns(Optional.of(jobDetailsReturnedByDAO)); final JobResource jobResource = resourceThatUses(jobDAO); final APIJobDetai...
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test public void testFetchJobDetailsByIdSetsAnAbortRESTLinkIfJobIsAbortable() throws IOException { final APIJobDetails jobDetailsReturnedByDAO = generateJobDetailsWithStatus(JobStatus.RUNNING); final JobDAO jobDAO = mockJobDAOThatReturns(Optional.of(jobDetailsReturnedByDAO)); final JobResource jobResource = resourceTh...
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test public void testFetchJobDetailsByIdDoesNotSetAnAbortRESTLinkIfJobIsNotAbortable() throws IOException { final APIJobDetails jobDetailsReturnedByDAO = generateJobDetailsWithStatus(JobStatus.FINISHED); final JobDAO jobDAO = mockJobDAOThatReturns(Optional.of(jobDetailsReturnedByDAO)); final JobResource jobResource = ...
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test public void testFetchJobDetailsByIdSetsARESTLinkForTheSpec() { final APIJobDetails jobDetailsReturnedByDAO = generateJobDetailsWithStatus(JobStatus.FINISHED); final JobDAO jobDAO = mockJobDAOThatReturns(Optional.of(jobDetailsReturnedByDAO)); final JobResource jobResource = resourceThatUses(jobDAO); final APIJobDe...
@GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( responseCode = "404", ...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
JobResource { @GET @Path("{job-id}") @Operation( summary = "Get details of a job managed by the system.", description = "") @ApiResponses(value = { @ApiResponse( responseCode = "200", description = "Job details found", content = @Content( schema = @Schema(implementation = APIJobDetails.class) )), @ApiResponse( response...
@Test(expected = WebApplicationException.class) public void testSubmitJobThrowsAWebApplicationExceptionIfJobSubmissionRequestIsNull() { final JobResource jobResource = mockedJobResource(); jobResource.submitJob(TestHelpers.generateSecureSecurityContext(), null); }
@POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be immediately accept...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
@Test public void testSubmitJobCallsTheDAOSubmitMethodIfValidAgainstSpec() throws IOException { final JobManagerActions jobManagerActions = mockJobManagerThatReturns(typicalSubmissionReturn()); final JobDAO jobDAO = mock(JobDAO.class); final JobSpec jobSpec = generateValidJobSpec(); final JobSpecConfigurationDAO jobSpe...
@POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be immediately accept...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
@Test public void testSubmitJobReturnsAResponseContainingTheIDReturnedByTheDAO() throws IOException { final JobId jobId = TestHelpers.generateJobId(); final Pair<JobId, CancelablePromise<FinalizedJob>> managerRet = Pair.of(jobId, new SimpleCancelablePromise<>()); final JobManagerActions jobManagerActions = mockJobManag...
@POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be immediately accept...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
@Test(expected = WebApplicationException.class) public void testSubmitJobThrowsWebApplicationErrorIfTheRequestProducedValidationErrors() throws IOException { final JobManagerActions jobManagerActions = mockJobManagerThatReturns(typicalSubmissionReturn()); final JobDAO jobDAO = mock(JobDAO.class); final JobSpec jobSpec ...
@POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be immediately accept...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
@Test(expected = WebApplicationException.class) public void testFetchJobSpecSummariesThrowsExceptionIfPageSizeIsNegative() throws IOException { final List<JobSpecSummary> jobSpecSummariesReturnedByDAO = generateNJobSpecSummaries(5); final JobSpecDAO jobSpecDAO = mock(JobSpecDAO.class); when(jobSpecDAO.getJobSpecSummari...
@GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is because paginatio...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
@Test public void testSubmitJobResolvesDefaultValuesInTheRequestIfNotProvidedInTheSubmissionRequest() throws IOException { final JobManagerActions jobManagerActions = mockJobManagerThatReturns(typicalSubmissionReturn()); final JobDAO jobDAO = mock(JobDAO.class); final JobSpec jobSpec = generateValidJobSpec(); final Job...
@POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be immediately accept...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
JobResource { @POST @Operation( summary = "Submit a new job", description = "Attempt to submit a new job to the system. The system will check the job against " + "the job spec specified in the request. If it does not match, the request will be " + "immediately rejected by the server. Otherwise, the request will be imme...
@Test(expected = WebApplicationException.class) public void testAbortJobThrowsWebApplicationExceptionIfJobIdIsNull() { final JobResource jobResource = mockedJobResource(); jobResource.abortJob(TestHelpers.generateSecureSecurityContext(), null); }
@POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the underlying job may ...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
@Test(expected = WebApplicationException.class) public void testAbortJobThrowsIfJobManagerReturnsFalseForAbort() throws IOException { final JobManagerActions jobManager = mock(JobManagerActions.class); when(jobManager.tryAbort(any())).thenReturn(false); final JobResource jobResource = resourceThatUses(jobManager); jobR...
@POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the underlying job may ...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
@Test public void testAbortJobCallsAbortJobInTheDAOWithTheID() throws IOException { final JobManagerActions jobManager = mock(JobManagerActions.class); when(jobManager.tryAbort(any())).thenReturn(true); final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.jobExists(any())).thenReturn(true); final JobResource jobResour...
@POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the underlying job may ...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
JobResource { @POST @Path("/{job-id}/abort") @Operation( summary = "Abort a running job", description = "Abort a job, stopping it or removing it from the job execute. The job's status " + "should immediately change to aborting. However, full job abortion is not guaranteed " + "to be immediate. This is because the under...
@Test(expected = WebApplicationException.class) public void testGetJobStdoutByIdThrowsWebApplicationExceptionIfNoJobIdIsProvided() { final JobResource jobResource = mockedJobResource(); jobResource.fetchJobStdoutById(TestHelpers.generateSecureSecurityContext(), null); }
@GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished jobs will have ...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
@Test public void testGetJobStdoutByIdReturns404NotFoundIfDAOReturnsEmptyOptional() throws IOException { final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.getStdout(any())).thenReturn(Optional.empty()); final JobResource jobResource = resourceThatUses(jobDAO); final Response jobStdoutResponse = jobResource.fetchJob...
@GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished jobs will have ...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
@Test public void testGetJobStdoutByIdReturnsA200ResponseAndTheDataIfTheDAOHasStdoutData() throws IOException { final byte[] stdoutRawData = TestHelpers.generateRandomBytes(); final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.getStdout(any())) .thenReturn(Optional.of(BinaryData.wrap(stdoutRawData))); final JobResou...
@GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished jobs will have ...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
JobResource { @GET @Path("/{job-id}/stdout") @Operation( summary = "Get a job's standard output", description = "Get a job's standard output, if available. A job that has not yet started will not have a standard output and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished j...
@Test(expected = WebApplicationException.class) public void testGetJobStderrByIdThrowsWebApplicationExceptionIfNoJobIdProvided() { final JobResource jobResource = mockedJobResource(); jobResource.fetchJobStderrById(TestHelpers.generateSecureSecurityContext(), null); }
@GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished jobs will have...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
@Test public void testGetJobStderrByIdReturns404NotFoundIfDAOReturnsEmptyOptional() throws IOException { final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.getStderr(any())).thenReturn(Optional.empty()); final JobResource jobResource = resourceThatUses(jobDAO); final Response response = jobResource.fetchJobStderrByI...
@GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished jobs will have...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
@Test public void testGetJobStderrByIdReturnsJobStderrIfPresent() throws IOException { final byte[] stderrRawData = TestHelpers.generateRandomBytes(); final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.getStderr(any())) .thenReturn(Optional.of(BinaryData.wrap(stderrRawData))); final JobResource jobResource = resourc...
@GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished jobs will have...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
JobResource { @GET @Path("/{job-id}/stderr") @Operation( summary = "Get the job's standard error", description = "Get the job's standard error, if available. A job that has not yet started will not have a standard error and, " + "therefore, this method will return a 404. There is no guarantee that all running/finished ...
@Test public void testFetchJobSpecSummariesCallsTheDAOWithPage0AndDefaultPageSize() throws IOException { final List<JobSpecSummary> jobSpecSummariesReturnedByDAO = generateNJobSpecSummaries(5); final JobSpecDAO jobSpecDAO = mock(JobSpecDAO.class); when(jobSpecDAO.getJobSpecSummaries(anyInt(), anyInt())).thenReturn(jobS...
@GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is because paginatio...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
JobSpecResource { @GET @Operation( summary = "Get summaries of the job specs exposed by the system", description = "Returns an object that contains summaries of *some* of the job specs exposed by the system. " + "The response does not necessarily contain summaries for *all* job specs exposed by the system. " + "This is...
@Test public void testFetchJobSpecJobWasSubmittedAgainstReturnsEmptyIfIdDoesNotExist() { final JobDAO jobDAO = mockJobDAOThatReturnsSpec(Optional.empty()); final JobResource jobResource = resourceThatUses(jobDAO); assertThat( jobResource.fetchJobSpecJobWasSubmittedAgainst(generateSecureSecurityContext(), generateJobId(...
@GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API call.") @Perm...
JobResource { @GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API...
JobResource { @GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API...
JobResource { @GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API...
JobResource { @GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API...
@Test public void testFetchJobSpecJobWasSubmittedAgainstReturnsTheJobSpecIfIdDoesExist() { final JobSpec jobSpec = generateValidJobSpec(); final JobDAO jobDAO = mockJobDAOThatReturnsSpec(Optional.of(jobSpec)); final JobResource jobResource = resourceThatUses(jobDAO); assertThat( jobResource.fetchJobSpecJobWasSubmittedA...
@GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API call.") @Perm...
JobResource { @GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API...
JobResource { @GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API...
JobResource { @GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API...
JobResource { @GET @Path("/{job-id}/spec") @Operation( summary = "Get the spec the job was submitted against", description = "Get the spec the job was submitted against. Note: This returns the spec as it was when the " + "job was submitted. Any subsequent updates to the spec will not be in the spec returned by this API...
@Test(expected = WebApplicationException.class) public void testFetchJobOutputsThrows404ExceptionIfJobDoesNotExist() { final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.jobExists(any())).thenReturn(false); final JobResource jobResource = resourceThatUses(jobDAO); jobResource.fetchJobOutputs(generateSecureSecurityCo...
@GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll public APIJobOu...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
@Test public void testFetchJobOutputsReturnsEmptyMapIfDAOReturnsEmptyMap() { final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.jobExists(any())).thenReturn(true); when(jobDAO.getJobOutputs(any())).thenReturn(emptyList()); final JobResource jobResource = resourceThatUses(jobDAO); final APIJobOutputCollection ret = j...
@GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll public APIJobOu...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
@Test public void testFetchJobOutputsReturnsMapOfOutputsReturnedFromDAO() { final List<JobOutputDetails> outputsFromDAO = generateRandomList( 10, 20, TestHelpers::generateJobOutputDetails); final JobDAO jobDAO = mock(JobDAO.class); when(jobDAO.jobExists(any())).thenReturn(true); when(jobDAO.getJobOutputs(any())).thenRe...
@GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll public APIJobOu...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...
JobResource { @GET @Path("/{job-id}/outputs") @Operation( summary = "Get the outputs produced by the job", description = "Gets all the outputs produced by the job. If the job has not *written* any outputs (even if specified) " + "then an empty map is returned. If the job does not exist, a 404 is returned") @PermitAll p...