Class FileArchiveService
java.lang.Object
sk.iway.iwcm.components.file_archiv.FileArchivSupportMethodsService
sk.iway.iwcm.components.file_archiv.FileArchiveService
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class sk.iway.iwcm.components.file_archiv.FileArchivSupportMethodsService
cachePrefix, currentUser, domainId, errorList, errorParams, fab, fileToUpload, fileToUploadName, isPatternFile, prop, referenceId, renameFile, repository, request, sameFiles, saveAfterId, saveLater, SEPARATOR, uploadType -
Constructor Summary
ConstructorsConstructorDescriptionFileArchiveService(Identity user, Prop prop, FileArchivatorBean fab, FileArchiveRepository repository) -
Method Summary
Modifier and TypeMethodDescriptionintvoidcheckFileProperties(org.springframework.validation.Errors errors) Mazanie za podmienky ze na subor Neexistuje referenciafinal String[]static final LonggetId(String filePath, String fileName, FileArchiveRepository far) Finds the ID of an existing archive file by its folder path and file name.static FileArchiveServicegetInstance(Identity user, Long fileArchivId) Instance for old Java/JSP (non Spring) classes.final List<FileArchivatorBean>static final List<LabelValue>getStatusIconOptions(Prop prop) getUploadType(String key) static final List<LabelValue>getUploadTypeOptions(Prop prop) static List<FileArchivatorBean>getWaitingFileList(Long mainId, FileArchiveRepository repo) Vrati vsetky subory cakajuce na nahranie v buducnosti.moveBehind(int moveBelowFileId) booleanrollback()vymazanie aktualneho suboru z vlakna a jeho nahradenie predchadzajucim suborom z vlaknasaveFile()Methods inherited from class sk.iway.iwcm.components.file_archiv.FileArchivSupportMethodsService
checkPerms, deleteFile, deleteFilePatterns, findSameFiles, getCacheTime, getFileDirPath, isConcurrentModification, isCorrectEmails, isUploadDateCorrect, normalizePath, normalizeToOldPath, prepareFileArchivatorBean, updateReferenceToMainFile, updateReferenceToMainFile
-
Constructor Details
-
FileArchiveService
public FileArchiveService(Identity user, Prop prop, FileArchivatorBean fab, FileArchiveRepository repository)
-
-
Method Details
-
getUploadType
-
getUploadTypeOptions
-
getStatusIconOptions
-
getInstance
Instance for old Java/JSP (non Spring) classes. For Spring use standard FileArchiveService constructor.- Parameters:
user-fileArchivId-- Returns:
-
getErrorList
-
getErrorParams
-
getSameFiles
-
checkFileProperties
public void checkFileProperties(org.springframework.validation.Errors errors) -
saveFile
-
checkAndRenameFile
public int checkAndRenameFile()- Returns:
- 1 if change was successful, 0 if not, -1 if change WAS NOT needed
-
rollback
public boolean rollback()vymazanie aktualneho suboru z vlakna a jeho nahradenie predchadzajucim suborom z vlakna -
deleteStructure
-
deleteWaitingFile
Mazanie za podmienky ze na subor Neexistuje referencia -
getWaitingFileList
Vrati vsetky subory cakajuce na nahranie v buducnosti. AK je zadana entita, vrati sa tie, co patria pod nu. Do CACHE sa vsak ulozia vsetky subory.- Returns:
- List
-
moveBehind
-
getId
Finds the ID of an existing archive file by its folder path and file name. Performs a dual lookup: first using the legacy (old) path format for backward compatibility, then using the normalized path format.- Parameters:
filePath- - the folder path where the file residesfileName- - the file name to look upfar- - file archive repository- Returns:
- the file archive entity ID, or -1 if not found
-