Class FileHistoryDB


public class FileHistoryDB extends JpaDB<FileHistoryBean>
FileHistoryDB.java - praca s historiou suborov tiket 13373 DAO class for manipulating with FileHistoryBean
  • Constructor Details

    • FileHistoryDB

      public FileHistoryDB()
  • Method Details

    • sendFileFromHistory

      @Deprecated public static boolean sendFileFromHistory(String path, int historyId, jakarta.servlet.http.HttpServletResponse response)
      Retained for binary compatibility. In request context it resolves the authenticated user and delegates to the secured overload; without an authenticated administrator it fails closed.
    • sendFileFromHistory

      public static boolean sendFileFromHistory(String path, int historyId, Identity user, jakarta.servlet.http.HttpServletResponse response)
      Sends a stored file version after checking its domain and file-browser folder permissions.
    • isFileHistoryAccessible

      public static boolean isFileHistoryAccessible(String fileUrl, Integer domainId, Identity user)
      Checks access to file-history metadata in the current domain.
    • getFileHistoryCurrentFile

      public static IwcmFile getFileHistoryCurrentFile(String fileUrl, Integer domainId, Identity user)
      Resolves the current file to the canonical path that was checked by the folder ACL.
    • isFileHistoryContentAccessible

      public static boolean isFileHistoryContentAccessible(String fileUrl, String historyPath, long historyId, Integer domainId, Identity user)
      Checks access to the physical content of one file-history record.
    • getFileHistorySourceFile

      public static IwcmFile getFileHistorySourceFile(String fileUrl, String historyPath, long historyId, Integer domainId, Identity user)
      Resolves the stored history file below the configured history root after all access checks.
    • findByFileUrl

      public List<FileHistoryBean> findByFileUrl(String fileUrl)
    • findFirstByFileUrl

      public FileHistoryBean findFirstByFileUrl(String fileUrl)
    • findByChangeDate

      public List<FileHistoryBean> findByChangeDate(Date changeDate)
    • findFirstByChangeDate

      public FileHistoryBean findFirstByChangeDate(Date changeDate)
    • findByUserId

      public List<FileHistoryBean> findByUserId(int userId)
    • findFirstByUserId

      public FileHistoryBean findFirstByUserId(int userId)
    • getHistoryByPath

      public List<FileHistoryBean> getHistoryByPath(String virtualPath)