Package org.projectnessie.model.types
Class GenericContent
- java.lang.Object
-
- org.projectnessie.model.Content
-
- org.projectnessie.model.types.GenericContent
-
@Immutable public abstract class GenericContent extends Content
SpecialContentreserved for cases when the actualcontent typeis 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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.projectnessie.model.Content
Content.Type
-
-
Constructor Summary
Constructors Constructor Description GenericContent()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static GenericContentcontentUnknownType(java.lang.String type, java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> all)abstract java.util.Map<java.lang.String,java.lang.Object>getAttributes()abstract java.lang.StringgetId()Unique id for this object.abstract Content.TypegetType()Returns theContent.Typevalue for this content object.
-
-
-
Method Detail
-
getType
@Parameter(order=1) public abstract Content.Type getType()
Description copied from class:ContentReturns theContent.Typevalue for this content object.The name of the returned value should match the JSON type name used for serializing the content object.
-
getId
@Nullable @Nullable @Parameter(order=2) public abstract java.lang.String getId()
Description copied from class:ContentUnique 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.
-
getAttributes
@Nullable @Nullable @Parameter(order=3) public abstract java.util.Map<java.lang.String,java.lang.Object> getAttributes()
-
contentUnknownType
public static GenericContent contentUnknownType(java.lang.String type, java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> all)
-
-