public StorageMetadata apply(DirectoryEntry from) { StorageType type = from.getType() == FileType.DIRECTORY ? StorageType.FOLDER : StorageType.BLOB; if (type == StorageType.FOLDER) return new StorageMetadataImpl(type, from.getObjectID(), from.getObjectName(), defaultLocation .get(), null, null, null, null, ImmutableMap.<String, String>of()); else { BlobMetadataImpl metadata = new BlobMetadataImpl(from.getObjectID(), from.getObjectName(), defaultLocation.get(), null, null, null, null, ImmutableMap.<String, String>of(), null, null, new BaseMutableContentMetadata()); MutableBlobMetadataImpl mutable = new MutableBlobMetadataImpl(metadata); mutable.setSize(from.getSize()); return mutable; } }
public StorageMetadata apply(DirectoryEntry from) { StorageType type = from.getType() == FileType.DIRECTORY ? StorageType.FOLDER : StorageType.BLOB; if (type == StorageType.FOLDER) return new StorageMetadataImpl(type, from.getObjectID(), from.getObjectName(), defaultLocation .get(), null, null, null, null, ImmutableMap.<String, String>of()); else { BlobMetadataImpl metadata = new BlobMetadataImpl(from.getObjectID(), from.getObjectName(), defaultLocation.get(), null, null, null, null, ImmutableMap.<String, String>of(), null, null, new BaseMutableContentMetadata()); MutableBlobMetadataImpl mutable = new MutableBlobMetadataImpl(metadata); mutable.setSize(from.getSize()); return mutable; } }
public StorageMetadata apply(DirectoryEntry from) { StorageType type = from.getType() == FileType.DIRECTORY ? StorageType.FOLDER : StorageType.BLOB; if (type == StorageType.FOLDER) return new StorageMetadataImpl(type, from.getObjectID(), from.getObjectName(), defaultLocation .get(), null, null, null, null, ImmutableMap.<String, String>of()); else { BlobMetadataImpl metadata = new BlobMetadataImpl(from.getObjectID(), from.getObjectName(), defaultLocation.get(), null, from.getObjectID(), null, from.getModifiedTime(), ImmutableMap.<String, String>of(), null, null, new BaseMutableContentMetadata()); MutableBlobMetadataImpl mutable = new MutableBlobMetadataImpl(metadata); mutable.setSize(from.getSize()); return mutable; } }
public StorageMetadata apply(DirectoryEntry from) { StorageType type = from.getType() == FileType.DIRECTORY ? StorageType.FOLDER : StorageType.BLOB; if (type == StorageType.FOLDER) return new StorageMetadataImpl(type, from.getObjectID(), from.getObjectName(), defaultLocation .get(), null, null, null, null, ImmutableMap.<String, String>of()); else { BlobMetadataImpl metadata = new BlobMetadataImpl(from.getObjectID(), from.getObjectName(), defaultLocation.get(), null, from.getObjectID(), null, from.getModifiedTime(), ImmutableMap.<String, String>of(), null, null, new BaseMutableContentMetadata()); MutableBlobMetadataImpl mutable = new MutableBlobMetadataImpl(metadata); mutable.setSize(from.getSize()); return mutable; } }