@Test public void testGetMetadataFile() throws Exception { final Path container = new Path("versioning-test-us-east-1-cyberduck", EnumSet.of(Path.Type.volume)); final Path test = new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)); new S3TouchFeature(session).touch(test, new TransferStatus().withMime("text/plain")); final Map<String, String> metadata = new S3MetadataFeature(session, new S3AccessControlListFeature(session)).getMetadata(test); new S3DefaultDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback()); assertFalse(metadata.isEmpty()); assertTrue(metadata.containsKey("Content-Type")); assertEquals("text/plain", metadata.get("Content-Type")); assertFalse(metadata.containsKey(Constants.KEY_FOR_USER_METADATA)); assertFalse(metadata.containsKey(Constants.KEY_FOR_SERVICE_METADATA)); assertFalse(metadata.containsKey(Constants.KEY_FOR_COMPLETE_METADATA)); }
@Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { return new S3AttributesFinderFeature(session).find(file).getMetadata(); }
S3MetadataFeature implements Headers { @Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { return new S3AttributesFinderFeature(session).find(file).getMetadata(); } }
S3MetadataFeature implements Headers { @Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { return new S3AttributesFinderFeature(session).find(file).getMetadata(); } S3MetadataFeature(final S3Session session, final S3AccessControlListFeature accessControlListFeature); }
S3MetadataFeature implements Headers { @Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { return new S3AttributesFinderFeature(session).find(file).getMetadata(); } S3MetadataFeature(final S3Session session, final S3AccessControlListFeature accessControlListFeature); @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); }
S3MetadataFeature implements Headers { @Override public Map<String, String> getMetadata(final Path file) throws BackgroundException { return new S3AttributesFinderFeature(session).find(file).getMetadata(); } S3MetadataFeature(final S3Session session, final S3AccessControlListFeature accessControlListFeature); @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);  }