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

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Additional, context relevant information.
  • Method Summary

    Modifier and Type
    Method
    Description
    The actual file content.
    The GridFSFile.getId() value converted into its simple java type.
    The filename.
    Additional information like file metadata (eg. contentType).
  • Method Details

    • getFileId

      @Nullable ID getFileId()
      The GridFSFile.getId() value converted into its simple java type.
      A BsonString will be converted to plain String.
      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.