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_KEY

    Fields inherited from interface net.solarnetwork.common.s3.S3ObjectMetadata

    SIZE_KEY, STORAGE_CLASS_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    S3ObjectMeta(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 Type
    Method
    Description
    long
    Get the object's content size.
    Get the object storage class key to use.
    void
     

    Methods inherited from class net.solarnetwork.io.SimpleResourceMetadata

    getContentType, getExtendedMetadata, getModified, putExtendedMetadata

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.solarnetwork.io.ResourceMetadata

    asCustomMap, asMap, asStandardMap, getContentType, getModified

    Methods inherited from interface net.solarnetwork.common.s3.S3ObjectMetadata

    isCustomKey
  • Constructor Details

    • S3ObjectMeta

      public S3ObjectMeta(long size, Date modified)
      Constructor.
      Parameters:
      size - the content size
      modified - the modified date
    • S3ObjectMeta

      public S3ObjectMeta(long size, Date modified, org.springframework.util.MimeType contentType)
      Constructor.
      Parameters:
      size - the content size
      modified - the modified date
      contentType - the content type
    • S3ObjectMeta

      public S3ObjectMeta(long size, Date modified, org.springframework.util.MimeType contentType, Map<String,?> extendedMetadata)
      Constructor.
      Parameters:
      size - the content size
      modified - the modified date
      contentType - the content type
      extendedMetadata - extended metadata
    • S3ObjectMeta

      public S3ObjectMeta(long size, Date modified, String storageClass, org.springframework.util.MimeType contentType, Map<String,?> extendedMetadata)
      Constructor.
      Parameters:
      size - the content size
      modified - the modified date
      storageClass - the storage class
      contentType - the content type
      extendedMetadata - extended metadata
  • Method Details

    • getSize

      public long getSize()
      Description copied from interface: S3ObjectMetadata
      Get the object's content size.
      Specified by:
      getSize in interface S3ObjectMetadata
      Returns:
      the size, in bytes
    • getStorageClass

      public String getStorageClass()
      Description copied from interface: S3ObjectMetadata
      Get the object storage class key to use.
      Specified by:
      getStorageClass in interface S3ObjectMetadata
      Returns:
      the storage class
    • populateMap

      public void populateMap(Map<String,Object> map)
      Specified by:
      populateMap in interface net.solarnetwork.io.ResourceMetadata
      Overrides:
      populateMap in class net.solarnetwork.io.SimpleResourceMetadata