Class AbstractFileService<F extends AbstractFile<F,ID,S>,ID extends Serializable,S extends AbstractStorageInfo<F,ID,S>>
java.lang.Object
de.frachtwerk.essencium.storage.generic.service.AbstractFileService<F,ID,S>
- All Implemented Interfaces:
FileService<F,ID, S>
- Direct Known Subclasses:
DefaultIdentityFileService,DefaultSequenceFileService,DefaultUUIDFileService
public abstract class AbstractFileService<F extends AbstractFile<F,ID,S>,ID extends Serializable,S extends AbstractStorageInfo<F,ID,S>>
extends Object
implements FileService<F,ID,S>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeleteFile(ID id) getAll()getAllFiltered(org.springframework.data.jpa.domain.Specification<F> specification) protected abstract FgetNewFile(List<S> infos, String name, int length, String mimeType) voidmarkAsUnavailable(S info) Stores a file in the configured storages.
-
Constructor Details
-
AbstractFileService
public AbstractFileService()
-
-
Method Details
-
storeFile
Description copied from interface:FileServiceStores a file in the configured storages.- Specified by:
storeFilein interfaceFileService<F extends AbstractFile<F,ID, S>, ID extends Serializable, S extends AbstractStorageInfo<F, ID, S>> - 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
-
getNewFile
-
loadFile
- Specified by:
loadFilein interfaceFileService<F extends AbstractFile<F,ID, S>, ID extends Serializable, S extends AbstractStorageInfo<F, ID, S>>
-
getAll
- Specified by:
getAllin interfaceFileService<F extends AbstractFile<F,ID, S>, ID extends Serializable, S extends AbstractStorageInfo<F, ID, S>>
-
getAllFiltered
@NotNull public @NotNull List<F> getAllFiltered(org.springframework.data.jpa.domain.Specification<F> specification) - Specified by:
getAllFilteredin interfaceFileService<F extends AbstractFile<F,ID, S>, ID extends Serializable, S extends AbstractStorageInfo<F, ID, S>>
-
loadFromProviders
- Specified by:
loadFromProvidersin interfaceFileService<F extends AbstractFile<F,ID, S>, ID extends Serializable, S extends AbstractStorageInfo<F, ID, S>>
-
deleteFile
- Specified by:
deleteFilein interfaceFileService<F extends AbstractFile<F,ID, S>, ID extends Serializable, S extends AbstractStorageInfo<F, ID, S>>
-