Class

eu.shiftforward.apso.aws

S3Bucket

Related Doc: package aws

Permalink

class S3Bucket extends Logging with Serializable

A representation of an Amazon's S3 bucket. This class wraps an com.amazonaws.services.s3.AmazonS3Client and provides a higher level interface for pushing and pulling files to and from a bucket.

Linear Supertypes
Serializable, Serializable, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. S3Bucket
  2. Serializable
  3. Serializable
  4. Logging
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new S3Bucket(bucketName: String, credentialsFactory: () ⇒ AWSCredentials = ...)

    Permalink

    bucketName

    the name of the bucket

    credentialsFactory

    optional AWS credentials factory to use (since AWSCredentials are not serializable). If the parameter is not supplied, they will be retrieved from the eu.shiftforward.apso.aws.CredentialStore.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def backup(key: String): Boolean

    Permalink

    Backups a remote file with the given key.

    Backups a remote file with the given key. A backup consists in copying the supplied file to a backup folder under the same bucket and folder the file is currently in.

    key

    the remote pathname to backup

    returns

    true if the backup was successful, false otherwise.

  6. val bucketName: String

    Permalink

    the name of the bucket

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def createDirectory(key: String): Boolean

    Permalink

    Creates an empty directory at the given key location

    Creates an empty directory at the given key location

    key

    the remote pathname to the directory

    returns

    true if the directory was created successfully, false otherwise.

  9. def delete(key: String): Boolean

    Permalink

    Deletes the file in the location specified by key in the bucket.

    Deletes the file in the location specified by key in the bucket.

    key

    the remote pathname for the file

    returns

    true if the deletion was successful, false otherwise.

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(obj: Any): Boolean

    Permalink
    Definition Classes
    S3Bucket → AnyRef → Any
  12. def exists(key: String): Boolean

    Permalink

    Checks if the file in the location specified by key in the bucket exists.

    Checks if the file in the location specified by key in the bucket exists.

    key

    the remote pathname for the file

    returns

    true if the file exists, false otherwise.

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getFilesWithMatchingPrefix(prefix: String, includeDirectories: Boolean = false): Iterator[String]

    Permalink

    Returns a list of filenames and directories in a bucket matching a given prefix.

    Returns a list of filenames and directories in a bucket matching a given prefix.

    prefix

    the prefix to match

    returns

    a list of filenames in a bucket matching a given prefix.

  16. def getObjectsWithMatchingPrefix(prefix: String, includeDirectories: Boolean = false): Iterator[S3ObjectSummary]

    Permalink

    Returns a list of objects in a bucket matching a given prefix.

    Returns a list of objects in a bucket matching a given prefix.

    prefix

    the prefix to match

    returns

    a list of objects in a bucket matching a given prefix.

  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. def isDirectory(key: String): Boolean

    Permalink

    Checks if the location specified by key is a directory.

    Checks if the location specified by key is a directory.

    key

    the remote pathname to the directory

    returns

    true if the path is a directory, false otherwise.

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. lazy val log: Logger

    Permalink

    The Logger object.

    The Logger object. This logger will have the same name as the concrete class into which this trait is mixed-in.

    Definition Classes
    Logging
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. def pull(key: String, destination: String): Boolean

    Permalink

    Pulls a remote file with the given key, to the local storage in the pathname provided by destination.

    Pulls a remote file with the given key, to the local storage in the pathname provided by destination.

    key

    the remote pathname to pull from

    destination

    the local pathname to pull to

    returns

    true if the pull was successful, false otherwise

  25. def push(key: String, inputStream: InputStream, length: Option[Long]): Boolean

    Permalink

    Pushes a given InputStream to the location specified by key in the bucket.

    Pushes a given InputStream to the location specified by key in the bucket.

    key

    the remote pathname for the file

    inputStream

    the InputStream to push

    length

    the content lenght (setting this to None can impact performance

    returns

    true if the push was successful, false otherwise.

  26. def push(key: String, file: File): Boolean

    Permalink

    Pushes a given local File to the location specified by key in the bucket.

    Pushes a given local File to the location specified by key in the bucket.

    key

    the remote pathname for the file

    file

    the local File to push

    returns

    true if the push was successful, false otherwise.

  27. def setAcl(key: String, acl: CannedAccessControlList): Unit

    Permalink

    Sets an access control list on a given Amazon S3 object.

    Sets an access control list on a given Amazon S3 object.

    key

    the remote pathname for the file

    acl

    the CannedAccessControlList to be applied to the Amazon S3 object

  28. def size(key: String): Long

    Permalink

    Returns size of the file in the location specified by key in the bucket.

    Returns size of the file in the location specified by key in the bucket. If the file doesn't exist the return value is 0.

    key

    the remote pathname for the file

    returns

    the size of the file in the location specified by key in the bucket if the exists, 0 otherwise.

  29. def stream(key: String): InputStream

    Permalink
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped