Interface AwsS3Service

All Known Implementing Classes:
AwsS3ServiceImpl

public interface AwsS3Service
Service that provides access to AWS S3.
Author:
joseross
  • Method Details

    • uploadItem

      S3Item uploadItem(String siteId, String profileId, String path, String filename, InputStream content) throws AwsException, SiteNotFoundException, org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
      Uploads a file to an S3 bucket.
      Parameters:
      siteId - the site id
      profileId - the profile id
      path - the path to upload the file (will be used as part of the S3 key)
      filename - the filename (will be used as part of the S3 key)
      content - a stream providing the content of the file
      Returns:
      the uploaded item
      Throws:
      AwsException - if there is any error connection to S3
      SiteNotFoundException - if the site is not found
      org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException - if the profile is not found
    • listItems

      List<S3Item> listItems(String siteId, String profileId, String path, String type) throws AwsException, SiteNotFoundException, org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
      Lists items in an S3 bucket.
      Parameters:
      siteId - the site id
      profileId - the profile id
      path - the path to list
      type - the type of items to list
      Returns:
      the list of items
      Throws:
      AwsException - if there is any error connection to S3
      SiteNotFoundException - if the site is not found
      org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException - if the profile is not found