Package net.solarnetwork.common.s3
Class S3ObjectMeta
java.lang.Object
net.solarnetwork.io.SimpleResourceMetadata
net.solarnetwork.common.s3.S3ObjectMeta
- All Implemented Interfaces:
S3ObjectMetadata,net.solarnetwork.io.ResourceMetadata
public class S3ObjectMeta
extends net.solarnetwork.io.SimpleResourceMetadata
implements S3ObjectMetadata
Immutable implementation of
S3ObjectMetadata.- Version:
- 1.1
- Author:
- matt
-
Field Summary
Fields inherited from interface net.solarnetwork.io.ResourceMetadata
CONTENT_TYPE_KEY, DEFAULT_CONTENT_TYPE, MODIFIED_KEYFields inherited from interface net.solarnetwork.common.s3.S3ObjectMetadata
SIZE_KEY, STORAGE_CLASS_KEY -
Constructor Summary
ConstructorsConstructorDescriptionS3ObjectMeta(long size, Date modified) Constructor.S3ObjectMeta(long size, Date modified, String storageClass, org.springframework.util.MimeType contentType, Map<String, ?> extendedMetadata) Constructor.S3ObjectMeta(long size, Date modified, org.springframework.util.MimeType contentType) Constructor.S3ObjectMeta(long size, Date modified, org.springframework.util.MimeType contentType, Map<String, ?> extendedMetadata) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize()Get the object's content size.Get the object storage class key to use.voidpopulateMap(Map<String, Object> map) Methods inherited from class net.solarnetwork.io.SimpleResourceMetadata
getContentType, getExtendedMetadata, getModified, putExtendedMetadataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.io.ResourceMetadata
asCustomMap, asMap, asStandardMap, getContentType, getModifiedMethods inherited from interface net.solarnetwork.common.s3.S3ObjectMetadata
isCustomKey
-
Constructor Details
-
S3ObjectMeta
Constructor.- Parameters:
size- the content sizemodified- the modified date
-
S3ObjectMeta
Constructor.- Parameters:
size- the content sizemodified- the modified datecontentType- the content type
-
S3ObjectMeta
public S3ObjectMeta(long size, Date modified, org.springframework.util.MimeType contentType, Map<String, ?> extendedMetadata) Constructor.- Parameters:
size- the content sizemodified- the modified datecontentType- the content typeextendedMetadata- extended metadata
-
S3ObjectMeta
public S3ObjectMeta(long size, Date modified, String storageClass, org.springframework.util.MimeType contentType, Map<String, ?> extendedMetadata) Constructor.- Parameters:
size- the content sizemodified- the modified datestorageClass- the storage classcontentType- the content typeextendedMetadata- extended metadata
-
-
Method Details
-
getSize
public long getSize()Description copied from interface:S3ObjectMetadataGet the object's content size.- Specified by:
getSizein interfaceS3ObjectMetadata- Returns:
- the size, in bytes
-
getStorageClass
Description copied from interface:S3ObjectMetadataGet the object storage class key to use.- Specified by:
getStorageClassin interfaceS3ObjectMetadata- Returns:
- the storage class
-
populateMap
- Specified by:
populateMapin interfacenet.solarnetwork.io.ResourceMetadata- Overrides:
populateMapin classnet.solarnetwork.io.SimpleResourceMetadata
-