@Test public void testGetMetadataBucket() throws Exception { final Path bucket = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume)); final Map<String, String> metadata = new GoogleStorageMetadataFeature(session).getMetadata(bucket); assertTrue(metadata.isEmpty()); }
@Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { if(file.isFile() || file.isPlaceholder()) { try { return new GoogleStorageAttributesFinderFeature(session).find(file).getMetadata(); } catch(NotfoundException e) { if(file.isPlaceholder()) { return Collections.emptyMap(); } throw e; } } return Collections.emptyMap(); }
GoogleStorageMetadataFeature implements Headers { @Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { if(file.isFile() || file.isPlaceholder()) { try { return new GoogleStorageAttributesFinderFeature(session).find(file).getMetadata(); } catch(NotfoundException e) { if(file.isPlaceholder()) { return Collections.emptyMap(); } throw e; } } return Collections.emptyMap(); } }
GoogleStorageMetadataFeature implements Headers { @Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { if(file.isFile() || file.isPlaceholder()) { try { return new GoogleStorageAttributesFinderFeature(session).find(file).getMetadata(); } catch(NotfoundException e) { if(file.isPlaceholder()) { return Collections.emptyMap(); } throw e; } } return Collections.emptyMap(); } GoogleStorageMetadataFeature(final GoogleStorageSession session); }
GoogleStorageMetadataFeature implements Headers { @Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { if(file.isFile() || file.isPlaceholder()) { try { return new GoogleStorageAttributesFinderFeature(session).find(file).getMetadata(); } catch(NotfoundException e) { if(file.isPlaceholder()) { return Collections.emptyMap(); } throw e; } } return Collections.emptyMap(); } GoogleStorageMetadataFeature(final GoogleStorageSession session); @Override Map<String, String> getDefault(final Local local); @Override Map<String, String> getMetadata(final Path file); @Override void setMetadata(final Path file, final TransferStatus status); }
GoogleStorageMetadataFeature implements Headers { @Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { if(file.isFile() || file.isPlaceholder()) { try { return new GoogleStorageAttributesFinderFeature(session).find(file).getMetadata(); } catch(NotfoundException e) { if(file.isPlaceholder()) { return Collections.emptyMap(); } throw e; } } return Collections.emptyMap(); } GoogleStorageMetadataFeature(final GoogleStorageSession session); @Override Map<String, String> getDefault(final Local local); @Override Map<String, String> getMetadata(final Path file); @Override void setMetadata(final Path file, final TransferStatus status);  }