All Known Implementing Classes:
StoreAreaAwareStoreWrapper

@ProviderType public interface Store
The interface for all file store implementations. Most, if not all implementations should extend from the class BaseStore.
Author:
Brian Wing Shun Chan, Edward Han
See Also:
  • BaseStore
  • Field Details

  • Method Details

    • addFile

      void addFile(long companyId, long repositoryId, String fileName, String versionLabel, InputStream inputStream) throws PortalException
      Adds a file based on an InputStream object.
      Parameters:
      companyId - the primary key of the company
      repositoryId - the primary key of the data repository (optionally CompanyConstants.SYSTEM)
      fileName - the file name
      versionLabel - the file's version label
      inputStream - the files's data
      Throws:
      PortalException
    • deleteDirectory

      void deleteDirectory(long companyId, long repositoryId, String dirName)
      Deletes a directory.
      Parameters:
      companyId - the primary key of the company
      repositoryId - the primary key of the data repository (optionally CompanyConstants.SYSTEM)
      dirName - the directory's name
    • deleteFile

      void deleteFile(long companyId, long repositoryId, String fileName, String versionLabel)
      Deletes a file at a particular version.
      Parameters:
      companyId - the primary key of the company
      repositoryId - the primary key of the data repository (optionally CompanyConstants.SYSTEM)
      fileName - the file's name
      versionLabel - the file's version label
    • getFileAsStream

      InputStream getFileAsStream(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException
      Returns the file as an InputStream object.
      Parameters:
      companyId - the primary key of the company
      repositoryId - the primary key of the data repository (optionally CompanyConstants.SYSTEM)
      fileName - the file's name
      versionLabel - the file's version label
      Returns:
      Returns the InputStream object with the file's name
      Throws:
      PortalException
    • getFileNames

      String[] getFileNames(long companyId, long repositoryId, String dirName)
      Returns all files of the directory.
      Parameters:
      companyId - the primary key of the company
      repositoryId - the primary key of the data repository (optionally CompanyConstants.SYSTEM)
      dirName - the directory's name
      Returns:
      Returns all files of the directory
    • getFileSize

      long getFileSize(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException
      Returns the size of the file.
      Parameters:
      companyId - the primary key of the company
      repositoryId - the primary key of the data repository (optionally CompanyConstants.SYSTEM)
      fileName - the file's name
      Returns:
      Returns the size of the file
      Throws:
      PortalException
    • getFileVersions

      String[] getFileVersions(long companyId, long repositoryId, String fileName)
    • hasFile

      boolean hasFile(long companyId, long repositoryId, String fileName, String versionLabel)
      Returns true if the file exists.
      Parameters:
      companyId - the primary key of the company
      repositoryId - the primary key of the data repository (optionally CompanyConstants.SYSTEM)
      fileName - the file's name
      versionLabel - the file's version label
      Returns:
      true if the file exists; false otherwise