Class StoreAreaAwareStoreWrapper

Object
com.liferay.document.library.kernel.store.StoreAreaAwareStoreWrapper
All Implemented Interfaces:
Store

public class StoreAreaAwareStoreWrapper extends Object implements Store
Author:
Adolfo Pérez
  • Constructor Details

  • Method Details

    • addFile

      public void addFile(long companyId, long repositoryId, String fileName, String versionLabel, InputStream inputStream) throws PortalException
      Description copied from interface: Store
      Adds a file based on an InputStream object.
      Specified by:
      addFile in interface Store
      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

      public void deleteDirectory(long companyId, long repositoryId, String dirName)
      Description copied from interface: Store
      Deletes a directory.
      Specified by:
      deleteDirectory in interface Store
      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

      public void deleteFile(long companyId, long repositoryId, String fileName, String versionLabel)
      Description copied from interface: Store
      Deletes a file at a particular version.
      Specified by:
      deleteFile in interface Store
      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

      public InputStream getFileAsStream(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException
      Description copied from interface: Store
      Returns the file as an InputStream object.
      Specified by:
      getFileAsStream in interface Store
      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

      public String[] getFileNames(long companyId, long repositoryId, String dirName)
      Description copied from interface: Store
      Returns all files of the directory.
      Specified by:
      getFileNames in interface Store
      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

      public long getFileSize(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException
      Description copied from interface: Store
      Returns the size of the file.
      Specified by:
      getFileSize in interface Store
      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

      public String[] getFileVersions(long companyId, long repositoryId, String fileName)
      Specified by:
      getFileVersions in interface Store
    • hasFile

      public boolean hasFile(long companyId, long repositoryId, String fileName, String versionLabel)
      Description copied from interface: Store
      Returns true if the file exists.
      Specified by:
      hasFile in interface Store
      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