Class MockRestEntityEnrichmentManager
java.lang.Object
com.atlassian.integrationtest.confluence.rest.serialization.jackson2.enrich.MockRestEntityEnrichmentManager
- All Implemented Interfaces:
RestEntityEnrichmentManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull Object
convertAndEnrich
(Object entity, SchemaType schemaType) Converts the given entity into a RestEntity if the entity has the RestEnrichable annotation or is a PageResponse that contains RestEnrichable entities.getEnrichedPropertyTypes
(Type type, boolean root) Get the types of the properties that may possibly be provided by the enrichers.boolean
isEnrichableEntity
(Class entityType) Get whether an object type can be enriched using a RestEntity.boolean
isEnrichableList
(Class listType) Get whether an object type can be enriched using a RestList.
-
Constructor Details
-
MockRestEntityEnrichmentManager
public MockRestEntityEnrichmentManager()
-
-
Method Details
-
isEnrichableList
Description copied from interface:RestEntityEnrichmentManager
Get whether an object type can be enriched using a RestList.- Specified by:
isEnrichableList
in interfaceRestEntityEnrichmentManager
-
isEnrichableEntity
Description copied from interface:RestEntityEnrichmentManager
Get whether an object type can be enriched using a RestEntity.- Specified by:
isEnrichableEntity
in interfaceRestEntityEnrichmentManager
-
getEnrichedPropertyTypes
Description copied from interface:RestEntityEnrichmentManager
Get the types of the properties that may possibly be provided by the enrichers. This is used to populate the graph-ql schema.- Specified by:
getEnrichedPropertyTypes
in interfaceRestEntityEnrichmentManager
- Parameters:
type
- The type of the object being enriched- Returns:
- A map of property names to property types
-
convertAndEnrich
Description copied from interface:RestEntityEnrichmentManager
Converts the given entity into a RestEntity if the entity has the RestEnrichable annotation or is a PageResponse that contains RestEnrichable entities.- Specified by:
convertAndEnrich
in interfaceRestEntityEnrichmentManager
- Parameters:
entity
- the entity to enrichschemaType
- rest or graphql- Returns:
- a converted rest entity or the entity that was given
-