Skip to content

Commit

Permalink
Remove Content type hierarchy from Events API (#6840)
Browse files Browse the repository at this point in the history
  • Loading branch information
adutra authored May 17, 2023
1 parent 39862d5 commit 87839ec
Show file tree
Hide file tree
Showing 17 changed files with 99 additions and 985 deletions.
41 changes: 25 additions & 16 deletions events/api/src/main/java/org/projectnessie/events/api/Content.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,37 @@
*/
package org.projectnessie.events.api;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Collections;
import java.util.Map;
import org.immutables.value.Value;
import org.projectnessie.events.api.json.ContentTypeIdResolver;

/**
* An object stored in Nessie, such as a table or a view.
*
* @see Namespace
* @see IcebergTable
* @see IcebergView
* @see DeltaLakeTable
* @see UDF
* @see GenericContent
*/
@JsonTypeIdResolver(ContentTypeIdResolver.class)
@JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, visible = true, property = "type")
/** An object stored in Nessie, such as a table or a view. */
@Value.Immutable
@JsonSerialize(as = ImmutableContent.class)
@JsonDeserialize(as = ImmutableContent.class)
public interface Content {

ContentType getType();
/**
* Returns the type for this object.
*
* <p>Values returned here match the JSON type name used for serializing the original content
* object.
*
* <p>The currently-known built-in content types are:
*
* <ul>
* <li>{@code ICEBERG_TABLE};
* <li>{@code ICEBERG_VIEW};
* <li>{@code NAMESPACE};
* <li>{@code UDF};
* <li>{@code DELTA_LAKE_TABLE}.
* </ul>
*
* Other content types may be added in the future, or registered by end users.
*/
String getType();

/**
* Unique id for this object.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 87839ec

Please sign in to comment.