Interface GridFsObject<ID,CONTENT>
- All Known Implementing Classes:
GridFsResource
,GridFsUpload
,ReactiveGridFsResource
,ReactiveGridFsUpload
public interface GridFsObject<ID,CONTENT>
A common interface when dealing with GridFs items using Spring Data.
- Since:
- 3.0
- Author:
- Christoph Strobl
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Additional, context relevant information. -
Method Summary
Modifier and TypeMethodDescriptionThe actual file content.TheGridFSFile.getId()
value converted into its simple java type.The filename.Additional information like file metadata (eg. contentType).
-
Method Details
-
getFileId
TheGridFSFile.getId()
value converted into its simple java type.
ABsonString
will be converted to plainString
.- Returns:
- can be null depending on the implementation.
-
getFilename
String getFilename()The filename.- Returns:
-
getContent
CONTENT getContent()The actual file content.- Returns:
- Throws:
IllegalStateException
- if the content cannot be obtained.
-
getOptions
GridFsObject.Options getOptions()Additional information like file metadata (eg. contentType).- Returns:
- never null.
-