Interface FileService<F extends AbstractFile<F,ID,S>,ID extends Serializable,S extends AbstractStorageInfo<F,ID,S>>
- Type Parameters:
F- File to be handledID- Data type of the file idS- Storage info of the file
- All Known Implementing Classes:
AbstractFileService,DefaultIdentityFileService,DefaultSequenceFileService,DefaultUUIDFileService
@Service
public interface FileService<F extends AbstractFile<F,ID,S>,ID extends Serializable,S extends AbstractStorageInfo<F,ID,S>>
Service able of permanently writing files and read them again later.
-
Method Summary
Modifier and TypeMethodDescriptionbooleandeleteFile(ID fileId) getAll()getAllFiltered(org.springframework.data.jpa.domain.Specification<F> specification) voidmarkAsUnavailable(S info) Stores a file in the configured storages.
-
Method Details
-
storeFile
Stores a file in the configured storages.- Parameters:
name- Name of the filemimeType- Mime type of the filefileContent- Content of the file as byte array- Returns:
- Storage info of the file
- Throws:
IOException- If the file could not be stored
-
loadFile
-
getAll
-
getAllFiltered
-
loadFromProviders
-
deleteFile
-