Class FileArchivSupportMethodsService
java.lang.Object
sk.iway.iwcm.components.file_archiv.FileArchivSupportMethodsService
- Direct Known Subclasses:
FileArchiveService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static String
protected Identity
protected int
protected String[]
protected FileArchivatorBean
protected IwcmFile
protected String
protected boolean
protected Prop
protected long
protected boolean
protected FileArchiveRepository
protected javax.servlet.http.HttpServletRequest
protected List<FileArchivatorBean>
protected int
protected boolean
static final String
protected FileArchiveService.UploadType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final boolean
protected boolean
deleteFile
(FileArchivatorBean fabToDelete, String prefixText, boolean ignoreMissingFile) Skontroluje prava na subory, zmaze subor fyzicky z disku a zmaze aj Beanprotected boolean
deleteFilePatterns
(FileArchivatorBean file, boolean ignoreMissingFile) protected void
findSameFiles
(FileArchivatorBean newFab, boolean removePattern, boolean isBeforeSave) Ak uz fyzicky existuje subor s rovnakym hash-om, vratime list beanov, inak nullprotected static int
getCacheTime
(String methodName) protected String
protected boolean
isConcurrentModification
(Long oldId, Long referenceId) Zisti ci sa nejde menit hlavny (aktualny) subor na ktory odkazuju ostatne.protected boolean
isCorrectEmails
(boolean fromEditorFields) protected boolean
isUploadDateCorrect
(boolean fromEditorFields) protected String
normalizePath
(String path) static String
normalizeToOldPath
(String path) protected void
prepareFileArchivatorBean
(String dirPath, String fileName, Long referenceId, boolean isNew) protected void
updateReferenceToMainFile
(Long referenceId, String referenceToMain) When referenceToMain is set update all history files referencesprotected void
updateReferenceToMainFile
(String oldReferenceToMain) When MAIN file is changed, update all references to this file
-
Field Details
-
cachePrefix
-
SEPARATOR
- See Also:
-
request
protected javax.servlet.http.HttpServletRequest request -
prop
-
currentUser
-
domainId
protected int domainId -
repository
-
fab
-
referenceId
protected long referenceId -
saveLater
protected boolean saveLater -
renameFile
protected boolean renameFile -
saveAfterId
protected int saveAfterId -
isPatternFile
protected boolean isPatternFile -
uploadType
-
fileToUploadName
-
fileToUpload
-
errorList
-
errorParams
-
sameFiles
-
-
Constructor Details
-
FileArchivSupportMethodsService
public FileArchivSupportMethodsService()
-
-
Method Details
-
updateReferenceToMainFile
When MAIN file is changed, update all references to this file- Parameters:
oldReferenceToMain
-
-
updateReferenceToMainFile
When referenceToMain is set update all history files references -
isUploadDateCorrect
protected boolean isUploadDateCorrect(boolean fromEditorFields) -
isCorrectEmails
protected boolean isCorrectEmails(boolean fromEditorFields) -
isConcurrentModification
Zisti ci sa nejde menit hlavny (aktualny) subor na ktory odkazuju ostatne. napriklad pri editacii viacerymi pouzivatelmi -
getFileDirPath
-
prepareFileArchivatorBean
-
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
-
getCacheTime
-
normalizePath
-
normalizeToOldPath
-
checkPerms
protected final boolean checkPerms()
-