Package org.cyclos.services.system
Interface ImportService
-
- All Superinterfaces:
CRUDService<ImportedFileDTO,ImportedFileData,ImportedFileDataParams>,CRUDWithConfirmationPasswordService<ImportedFileDTO,ImportedFileData,ImportedFileDataParams>,Service
- All Known Subinterfaces:
ImportServiceLocal
- All Known Implementing Classes:
ImportServiceImpl,ImportServiceSecurity
public interface ImportService extends CRUDWithConfirmationPasswordService<ImportedFileDTO,ImportedFileData,ImportedFileDataParams>
Service interface for Imports
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanabort(@NotNull Long importedFileId)Attempts to trigger the abort process of the given import.ImportedLineDatagetImportedLineData(@NotNull Long importedLineId)Returns the imported line dataImportProgressVOgetImportProgress(@NotNull Long importedFileId)Returns a double between 0 and 1 indicating the progress of the given import.ImportedFileSearchDatagetSearchData(@NotNull ImportSearchContext context, UserLocatorVO user)Returns information to perform searches over imports.voidmarkAsSkipped(@NotNull Long importedFileId, @NotNull List<Long> lineIds, boolean skipped)Sets if the lines should be skipped by the import process or not based on the skipped parameter.voidprocess(@NotNull Long importedFileId)Starts an importvoidsaveDescription(@NotNull Long importedFileId, String description)Saves the description for the specified imported file id.voidsaveImportedLine(@NotNull ImportedLineDTO importedLineDTO)Saves the values of the imported linePage<ImportedFileVO>search(@NotNull ImportedFileQuery params)Returns the imports that satisfy the query restrictions.Page<ImportedLineVO>searchImportedLines(@NotNull ImportedLineQuery params)Returns the imported lines that matches the query restrictions.Longupload(@NotNull ImportedFileDTO importedFileDTO, @NotNull SerializableInputStream input, String confirmationPassword)Uploads a file to be imported.-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.services.CRUDWithConfirmationPasswordService
getConfirmationPasswordInputForRemove, removeAllWithConfirmationPassword, removeWithConfirmationPassword, saveWithConfirmationPassword
-
-
-
-
Method Detail
-
abort
boolean abort(@NotNull @NotNull Long importedFileId) throws FrameworkExceptionAttempts to trigger the abort process of the given import. If can returns true, otherwise returns false.- Throws:
FrameworkException
-
getImportedLineData
ImportedLineData getImportedLineData(@NotNull @NotNull Long importedLineId) throws FrameworkException
Returns the imported line data- Throws:
FrameworkException
-
getImportProgress
ImportProgressVO getImportProgress(@NotNull @NotNull Long importedFileId) throws FrameworkException
Returns a double between 0 and 1 indicating the progress of the given import.- Throws:
FrameworkException
-
getSearchData
ImportedFileSearchData getSearchData(@NotNull @NotNull ImportSearchContext context, UserLocatorVO user) throws FrameworkException
Returns information to perform searches over imports.- Throws:
FrameworkException
-
markAsSkipped
void markAsSkipped(@NotNull @NotNull Long importedFileId, @NotNull @NotNull List<Long> lineIds, boolean skipped) throws FrameworkExceptionSets if the lines should be skipped by the import process or not based on the skipped parameter. It is only possible to mark as skipped/not skipped the lines that were validated successfully.- Throws:
FrameworkException
-
process
void process(@NotNull @NotNull Long importedFileId) throws FrameworkExceptionStarts an import- Throws:
FrameworkException
-
saveDescription
void saveDescription(@NotNull @NotNull Long importedFileId, String description) throws FrameworkExceptionSaves the description for the specified imported file id.- Throws:
FrameworkException
-
saveImportedLine
void saveImportedLine(@NotNull @NotNull ImportedLineDTO importedLineDTO) throws FrameworkExceptionSaves the values of the imported line- Throws:
FrameworkException
-
search
Page<ImportedFileVO> search(@NotNull @NotNull ImportedFileQuery params) throws FrameworkException
Returns the imports that satisfy the query restrictions.- Throws:
FrameworkException
-
searchImportedLines
Page<ImportedLineVO> searchImportedLines(@NotNull @NotNull ImportedLineQuery params) throws FrameworkException
Returns the imported lines that matches the query restrictions.- Throws:
FrameworkException
-
upload
Long upload(@NotNull @NotNull ImportedFileDTO importedFileDTO, @NotNull @NotNull SerializableInputStream input, String confirmationPassword) throws FrameworkException
Uploads a file to be imported. The confirmation password is only checked depending on the imported file type.- Returns:
- the imported file id.
- Throws:
FrameworkException- See Also:
ImportType.requiresConfirmationPassword()
-
-