Interface BoxService

All Known Implementing Classes:
BoxServiceImpl

public interface BoxService
Defines the operations available for handling files in Box
  • Method Details

    • getAccessToken

      String getAccessToken(String site, String profileId) throws BoxException, org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
      Gets an access token to allow direct access to the Box folder.
      Parameters:
      site - the name of the site to search for the configuration file
      profileId - the name of the profile to search
      Returns:
      the value of the access token
      Throws:
      BoxException - box error
      org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException - if the profile is not found
    • getUrl

      String getUrl(String site, String profileId, String fileId, String filename) throws BoxException, org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
      Builds a local URL for the given asset
      Parameters:
      site - site identifier
      profileId - the name of the profile to use
      fileId - the id of the file
      filename - the name of the file
      Returns:
      the local URL for the file
      Throws:
      BoxException - box error
      org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException - if the profile is not found