Class FileArchivSupportMethodsService

java.lang.Object
sk.iway.iwcm.components.file_archiv.FileArchivSupportMethodsService
Direct Known Subclasses:
FileArchiveService

public abstract class FileArchivSupportMethodsService extends Object
  • Field Details

    • cachePrefix

      protected static String cachePrefix
    • SEPARATOR

      public static final String SEPARATOR
      See Also:
    • request

      protected javax.servlet.http.HttpServletRequest request
    • prop

      protected Prop prop
    • currentUser

      protected Identity currentUser
    • domainId

      protected int domainId
    • repository

      protected FileArchiveRepository repository
    • fab

      protected FileArchivatorBean fab
    • referenceId

      protected long referenceId
    • saveLater

      protected boolean saveLater
    • renameFile

      protected boolean renameFile
    • saveAfterId

      protected int saveAfterId
    • isPatternFile

      protected boolean isPatternFile
    • uploadType

      protected FileArchiveService.UploadType uploadType
    • fileToUploadName

      protected String fileToUploadName
    • fileToUpload

      protected IwcmFile fileToUpload
    • errorList

      protected List<String> errorList
    • errorParams

      protected String[] errorParams
    • sameFiles

      protected List<FileArchivatorBean> sameFiles
  • Constructor Details

    • FileArchivSupportMethodsService

      public FileArchivSupportMethodsService()
  • Method Details

    • updateReferenceToMainFile

      protected void updateReferenceToMainFile(String oldReferenceToMain)
      When MAIN file is changed, update all references to this file
      Parameters:
      oldReferenceToMain -
    • updateReferenceToMainFile

      protected void updateReferenceToMainFile(Long referenceId, String referenceToMain)
      When referenceToMain is set update all history files references
    • isUploadDateCorrect

      protected boolean isUploadDateCorrect(boolean fromEditorFields)
    • isCorrectEmails

      protected boolean isCorrectEmails(boolean fromEditorFields)
    • isConcurrentModification

      protected boolean isConcurrentModification(Long oldId, Long referenceId)
      Zisti ci sa nejde menit hlavny (aktualny) subor na ktory odkazuju ostatne. napriklad pri editacii viacerymi pouzivatelmi
    • getFileDirPath

      protected String getFileDirPath()
    • prepareFileArchivatorBean

      protected void prepareFileArchivatorBean(String dirPath, String fileName, Long referenceId, boolean isNew)
    • findSameFiles

      protected void findSameFiles(FileArchivatorBean newFab, boolean removePattern, boolean isBeforeSave)
      Ak uz fyzicky existuje subor s rovnakym hash-om, vratime list beanov, inak null
    • deleteFile

      protected boolean deleteFile(FileArchivatorBean fabToDelete, String prefixText, boolean ignoreMissingFile)
      Skontroluje prava na subory, zmaze subor fyzicky z disku a zmaze aj Bean
    • deleteFilePatterns

      protected boolean deleteFilePatterns(FileArchivatorBean file, boolean ignoreMissingFile)
    • getCacheTime

      protected static int getCacheTime(String methodName)
    • normalizePath

      protected String normalizePath(String path)
    • normalizeToOldPath

      public static String normalizeToOldPath(String path)
    • checkPerms

      protected final boolean checkPerms()