@Test public void testDisconnected() throws Exception { final Host host = new Host(new AzureProtocol(), "kahy9boj3eib.blob.core.windows.net", new Credentials( System.getProperties().getProperty("azure.account"), System.getProperties().getProperty("azure.key") )); final AzureSession session = new AzureSession(host); final AzureUrlProvider provider = new AzureUrlProvider(session); final Path container = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume)); final Path file = new Path(container, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file)); assertEquals(DescriptiveUrl.EMPTY, provider.toDownloadUrl(file, null, new DisabledPasswordCallback())); }
@Override public DescriptiveUrl toDownloadUrl(final Path file, final Void options, final PasswordCallback callback) throws BackgroundException { return this.createSignedUrl(file, PreferencesFactory.get().getInteger("s3.url.expire.seconds")); }
AzureUrlProvider implements PromptUrlProvider<Void, Void> { @Override public DescriptiveUrl toDownloadUrl(final Path file, final Void options, final PasswordCallback callback) throws BackgroundException { return this.createSignedUrl(file, PreferencesFactory.get().getInteger("s3.url.expire.seconds")); } }
AzureUrlProvider implements PromptUrlProvider<Void, Void> { @Override public DescriptiveUrl toDownloadUrl(final Path file, final Void options, final PasswordCallback callback) throws BackgroundException { return this.createSignedUrl(file, PreferencesFactory.get().getInteger("s3.url.expire.seconds")); } AzureUrlProvider(final AzureSession session); }
AzureUrlProvider implements PromptUrlProvider<Void, Void> { @Override public DescriptiveUrl toDownloadUrl(final Path file, final Void options, final PasswordCallback callback) throws BackgroundException { return this.createSignedUrl(file, PreferencesFactory.get().getInteger("s3.url.expire.seconds")); } AzureUrlProvider(final AzureSession session); @Override boolean isSupported(final Path file, final Type type); @Override DescriptiveUrl toDownloadUrl(final Path file, final Void options, final PasswordCallback callback); @Override DescriptiveUrl toUploadUrl(final Path file, final Void options, final PasswordCallback callback); }
AzureUrlProvider implements PromptUrlProvider<Void, Void> { @Override public DescriptiveUrl toDownloadUrl(final Path file, final Void options, final PasswordCallback callback) throws BackgroundException { return this.createSignedUrl(file, PreferencesFactory.get().getInteger("s3.url.expire.seconds")); } AzureUrlProvider(final AzureSession session); @Override boolean isSupported(final Path file, final Type type); @Override DescriptiveUrl toDownloadUrl(final Path file, final Void options, final PasswordCallback callback); @Override DescriptiveUrl toUploadUrl(final Path file, final Void options, final PasswordCallback callback);  }