Skip to content
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void recreateAndAwait(final List<EntityReference> refs, final Duration ma
* "type must not be null".
*/
public void recreateAndAwait(
final String entityType, final List<? extends EntityInterface> entities) {
final String entityType, final List<? extends EntityInterface<?>> entities) {
if (entities == null || entities.isEmpty()) {
throw new IllegalArgumentException("entity list must not be empty");
}
Expand All @@ -87,13 +87,13 @@ public void recreateAndAwait(
* live-index path that runs after entity creation.
*/
public void awaitIndexed(
final String entityType, final List<? extends EntityInterface> entities) {
final String entityType, final List<? extends EntityInterface<?>> entities) {
awaitIndexed(entityType, entities, DEFAULT_WAIT);
}

public void awaitIndexed(
final String entityType,
final List<? extends EntityInterface> entities,
final List<? extends EntityInterface<?>> entities,
final Duration maxWait) {
final List<EntityReference> refs =
entities.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

public final class EntityCases {
private final String entityType;
private final Function<ShapeContext, EntityInterface> minimal;
private final Function<ShapeContext, EntityInterface<?>> minimal;
private final ShapeContext ctx;
private final List<PlannedCase> cases = new ArrayList<>();

public EntityCases(
final String entityType,
final Function<ShapeContext, EntityInterface> minimal,
final Function<ShapeContext, EntityInterface<?>> minimal,
final ShapeContext ctx) {
this.entityType = entityType;
this.minimal = minimal;
Expand All @@ -36,7 +36,7 @@ public EntityCases(
public EntityCases add(
final String dimension,
final Rung rung,
final BiFunction<EntityInterface, Rung, EntityInterface> apply) {
final BiFunction<EntityInterface<?>, Rung, EntityInterface<?>> apply) {
cases.add(
new PlannedCase(
entityType, dimension, rung, () -> apply.apply(minimal.apply(ctx), rung), null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public interface EntityShapeProfile {
String entityType();

EntityInterface minimal(ShapeContext ctx);
EntityInterface<?> minimal(ShapeContext ctx);

default List<PlannedCase> entitySpecificCases(ShapeContext ctx) {
return List.of();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public record PlannedCase(
String entityType,
String dimension,
Rung rung,
Supplier<EntityInterface> entity,
Supplier<EntityInterface<?>> entity,
FieldProbe probe) {

public String label() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ShapeCanary(final SearchRepository searchRepository, final SearchClient h
}

public ShapeResult index(
final String entityType, final EntityInterface entity, final FieldProbe probe) {
final String entityType, final EntityInterface<?> entity, final FieldProbe probe) {
final String docId = entity.getId().toString();
// Built before the try: JsonUtils.pojoToJson reports a serialization bug as a
// JsonParsingException caused by a JsonProcessingException, which extends IOException -- so
Expand Down Expand Up @@ -98,7 +98,7 @@ public static final class ShapeTransportException extends RuntimeException {
* refusing an unindexable shape, so it must surface as an error rather than masquerade as
* REJECTED (which is reserved for the write below).
*/
private String buildDoc(final String entityType, final EntityInterface entity) {
private String buildDoc(final String entityType, final EntityInterface<?> entity) {
final SearchIndex index =
searchRepository.getSearchIndexFactory().buildIndex(entityType, entity);
return JsonUtils.pojoToJson(index.buildSearchIndexDoc());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
public interface ShapeMutation {
String dimension();

boolean appliesTo(EntityInterface entity);
boolean appliesTo(EntityInterface<?> entity);

List<Rung> ladder();

EntityInterface apply(EntityInterface entity, Rung rung);
EntityInterface<?> apply(EntityInterface<?> entity, Rung rung);

default FieldProbe probe(Rung rung) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public String dimension() {
* the filter type-aware.
*/
@Override
public boolean appliesTo(final EntityInterface entity) {
public boolean appliesTo(final EntityInterface<?> entity) {
boolean serializesExtension;
try {
serializesExtension =
Expand All @@ -52,7 +52,7 @@ public List<Rung> ladder() {
}

@Override
public EntityInterface apply(final EntityInterface entity, final Rung rung) {
public EntityInterface<?> apply(final EntityInterface<?> entity, final Rung rung) {
final Map<String, Object> props = new LinkedHashMap<>();
for (int i = 0; i < rung.magnitude(); i++) {
props.put("prop_" + i, "value_" + i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public String dimension() {
}

@Override
public boolean appliesTo(final EntityInterface entity) {
public boolean appliesTo(final EntityInterface<?> entity) {
return true;
}

Expand All @@ -35,7 +35,7 @@ public List<Rung> ladder() {
}

@Override
public EntityInterface apply(final EntityInterface entity, final Rung rung) {
public EntityInterface<?> apply(final EntityInterface<?> entity, final Rung rung) {
entity.setDescription("x".repeat(rung.magnitude()));
return entity;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public String dimension() {
}

@Override
public boolean appliesTo(final EntityInterface entity) {
public boolean appliesTo(final EntityInterface<?> entity) {
return true;
}

Expand All @@ -37,7 +37,7 @@ public List<Rung> ladder() {
}

@Override
public EntityInterface apply(final EntityInterface entity, final Rung rung) {
public EntityInterface<?> apply(final EntityInterface<?> entity, final Rung rung) {
final List<EntityReference> followers = new ArrayList<>(rung.magnitude());
for (int i = 0; i < rung.magnitude(); i++) {
followers.add(new EntityReference().withId(UUID.randomUUID()).withType("user"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public String dimension() {
}

@Override
public boolean appliesTo(final EntityInterface entity) {
public boolean appliesTo(final EntityInterface<?> entity) {
return true;
}

Expand All @@ -38,7 +38,7 @@ public List<Rung> ladder() {
}

@Override
public EntityInterface apply(final EntityInterface entity, final Rung rung) {
public EntityInterface<?> apply(final EntityInterface<?> entity, final Rung rung) {
entity.setDisplayName(value(rung));
return entity;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public String dimension() {
}

@Override
public boolean appliesTo(final EntityInterface entity) {
public boolean appliesTo(final EntityInterface<?> entity) {
return true;
}

Expand All @@ -50,7 +50,7 @@ public List<Rung> ladder() {
}

@Override
public EntityInterface apply(final EntityInterface entity, final Rung rung) {
public EntityInterface<?> apply(final EntityInterface<?> entity, final Rung rung) {
final List<EntityReference> owners = new ArrayList<>(rung.magnitude());
for (int i = 0; i < rung.magnitude(); i++) {
owners.add(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String dimension() {
}

@Override
public boolean appliesTo(final EntityInterface entity) {
public boolean appliesTo(final EntityInterface<?> entity) {
return true;
}

Expand All @@ -36,7 +36,7 @@ public List<Rung> ladder() {
}

@Override
public EntityInterface apply(final EntityInterface entity, final Rung rung) {
public EntityInterface<?> apply(final EntityInterface<?> entity, final Rung rung) {
final List<TagLabel> tags = new ArrayList<>(rung.magnitude());
for (int i = 0; i < rung.magnitude(); i++) {
tags.add(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new APICollection()
.withId(ctx.id())
.withName("apiCollection")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new APIEndpoint()
.withId(ctx.id())
.withName("endpoint")
Expand All @@ -53,13 +53,13 @@ public List<PlannedCase> entitySpecificCases(final ShapeContext ctx) {
.build();
}

private EntityInterface requestFields(final EntityInterface entity, final Rung rung) {
private EntityInterface<?> requestFields(final EntityInterface<?> entity, final Rung rung) {
final APIEndpoint endpoint = (APIEndpoint) entity;
endpoint.setRequestSchema(new APISchema().withSchemaFields(fields("req_", rung.magnitude())));
return endpoint;
}

private EntityInterface responseFields(final EntityInterface entity, final Rung rung) {
private EntityInterface<?> responseFields(final EntityInterface<?> entity, final Rung rung) {
final APIEndpoint endpoint = (APIEndpoint) entity;
endpoint.setResponseSchema(new APISchema().withSchemaFields(fields("resp_", rung.magnitude())));
return endpoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new Chart()
.withId(ctx.id())
.withName("chart")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new Container()
.withId(ctx.id())
.withName("container")
Expand All @@ -49,7 +49,7 @@ public List<PlannedCase> entitySpecificCases(final ShapeContext ctx) {
.build();
}

private EntityInterface dataModelColumns(final EntityInterface entity, final Rung rung) {
private EntityInterface<?> dataModelColumns(final EntityInterface<?> entity, final Rung rung) {
final Container container = (Container) entity;
final List<Column> columns = new ArrayList<>(rung.magnitude());
for (int i = 0; i < rung.magnitude(); i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new DashboardDataModel()
.withId(ctx.id())
.withName("dataModel")
Expand All @@ -50,7 +50,7 @@ public List<PlannedCase> entitySpecificCases(final ShapeContext ctx) {
.build();
}

private EntityInterface columns(final EntityInterface entity, final Rung rung) {
private EntityInterface<?> columns(final EntityInterface<?> entity, final Rung rung) {
final DashboardDataModel model = (DashboardDataModel) entity;
final List<Column> columns = new ArrayList<>(rung.magnitude());
for (int i = 0; i < rung.magnitude(); i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new Dashboard()
.withId(ctx.id())
.withName("dashboard")
Expand All @@ -48,7 +48,7 @@ public List<PlannedCase> entitySpecificCases(final ShapeContext ctx) {
.build();
}

private EntityInterface charts(final EntityInterface entity, final Rung rung) {
private EntityInterface<?> charts(final EntityInterface<?> entity, final Rung rung) {
final Dashboard dashboard = (Dashboard) entity;
final List<EntityReference> charts = new ArrayList<>(rung.magnitude());
for (int i = 0; i < rung.magnitude(); i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new DataProduct()
.withId(ctx.id())
.withName("dataProduct")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new DatabaseSchema()
.withId(ctx.id())
.withName("schema")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new Database()
.withId(ctx.id())
.withName("database")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new Domain()
.withId(ctx.id())
.withName("domain")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new Glossary()
.withId(ctx.id())
.withName("glossary")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new GlossaryTerm()
.withId(ctx.id())
.withName("term")
Expand All @@ -50,7 +50,7 @@ public List<PlannedCase> entitySpecificCases(final ShapeContext ctx) {
.build();
}

private EntityInterface synonyms(final EntityInterface entity, final Rung rung) {
private EntityInterface<?> synonyms(final EntityInterface<?> entity, final Rung rung) {
final GlossaryTerm term = (GlossaryTerm) entity;
final List<String> synonyms = new ArrayList<>(rung.magnitude());
for (int i = 0; i < rung.magnitude(); i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new Metric()
.withId(ctx.id())
.withName("metric")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public String entityType() {
}

@Override
public EntityInterface minimal(final ShapeContext ctx) {
public EntityInterface<?> minimal(final ShapeContext ctx) {
return new MlModel()
.withId(ctx.id())
.withName("model")
Expand All @@ -49,7 +49,7 @@ public List<PlannedCase> entitySpecificCases(final ShapeContext ctx) {
.build();
}

private EntityInterface features(final EntityInterface entity, final Rung rung) {
private EntityInterface<?> features(final EntityInterface<?> entity, final Rung rung) {
final MlModel model = (MlModel) entity;
final List<MlFeature> features = new ArrayList<>(rung.magnitude());
for (int i = 0; i < rung.magnitude(); i++) {
Expand Down
Loading
Loading