Class GenericContent

java.lang.Object
org.projectnessie.model.Content
org.projectnessie.model.types.GenericContent

@Immutable public abstract class GenericContent extends Content
Special Content reserved for cases when the actual content type is not available.

Nessie servers cannot properly handle unknown content types, but with this "fallback" clients can at least deserialize the content object and do not fail hard / error out.

  • Constructor Details

    • GenericContent

      public GenericContent()
  • Method Details

    • getType

      @Parameter(order=1) public abstract Content.Type getType()
      Description copied from class: Content
      Returns the Content.Type value for this content object.

      The name of the returned value should match the JSON type name used for serializing the content object.

      Specified by:
      getType in class Content
    • getId

      @Nullable @Parameter(order=2) public abstract String getId()
      Description copied from class: Content
      Unique id for this object.

      This id is unique for the entire lifetime of this Content object and persists across renames. Two content objects with the same key will have different id.

      Specified by:
      getId in class Content
    • getAttributes

      @Nullable @Parameter(order=3) public abstract Map<String,Object> getAttributes()
    • contentUnknownType

      public static GenericContent contentUnknownType(String type, String id, Map<String,Object> all)