Class AWSObjectStorageClassConvert

java.lang.Object
org.cdlib.mrt.s3.aws.AWSObjectStorageClassConvert

public class AWSObjectStorageClassConvert extends Object
This sample demonstrates how to make basic requests to Amazon S3 using the AWS SDK for Java.

Prerequisites: You must have a valid Amazon Web Services developer account, and be signed up to use Amazon S3. For more information on Amazon S3, see http://aws.amazon.com/s3.

Important: Be sure to fill in your AWS access credentials in the AwsCredentials.properties file before you try to run this sample. http://aws.amazon.com/security-credentials

  • Field Details

    • NAME

      protected static final String NAME
      See Also:
    • MESSAGE

      protected static final String MESSAGE
      See Also:
    • DEBUG

      protected static boolean DEBUG
    • convertstat

      protected static boolean convertstat
    • service

      protected AWSS3Cloud service
    • bucket

      protected String bucket
    • logger

      protected org.cdlib.mrt.utility.LoggerInf logger
    • targetStorageClass

      protected com.amazonaws.services.s3.model.StorageClass targetStorageClass
  • Constructor Details

    • AWSObjectStorageClassConvert

      public AWSObjectStorageClassConvert(AWSS3Cloud service, String bucket, com.amazonaws.services.s3.model.StorageClass targetStorageClass, org.cdlib.mrt.utility.LoggerInf logger) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
  • Method Details

    • main

      public static void main(String[] args) throws IOException, org.cdlib.mrt.utility.TException
      Throws:
      IOException
      org.cdlib.mrt.utility.TException
    • convert

      public CloudResponse convert(org.cdlib.mrt.cloud.CloudList.CloudEntry entry, AWSObjectStorageClassConvert.ObjectStats stats) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • convertObject

      public AWSObjectStorageClassConvert.ObjectStats convertObject(String ark) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • testObject

      public AWSObjectStorageClassConvert.ObjectStats testObject(String ark) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • validateStorageClass

      public int validateStorageClass(String ark, List<org.cdlib.mrt.cloud.CloudList.CloudEntry> list) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • getCloudList

      protected org.cdlib.mrt.cloud.CloudList getCloudList(String arkS) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • addManifest

      protected void addManifest(String arkS, org.cdlib.mrt.cloud.CloudList cloudList) throws org.cdlib.mrt.utility.TException
      Throws:
      org.cdlib.mrt.utility.TException
    • getVersionMap

      protected org.cdlib.mrt.cloud.VersionMap getVersionMap(org.cdlib.mrt.core.Identifier objectID) throws org.cdlib.mrt.utility.TException
      Get version content information from a specific manifext.txt
      Parameters:
      versionFile - manifest file
      Returns:
      Version file content
      Throws:
      org.cdlib.mrt.utility.TException
    • close

      public void close()
    • setShowEntry

      public void setShowEntry(boolean DEBUG)
    • getBucket

      public String getBucket()