Class ProjectionManager
- java.lang.Object
-
- com.broadleafcommerce.common.extension.projection.ProjectionManager
-
public class ProjectionManager extends Object
Handles projection creation through theProjectionFactory
, and is further responsible for registering type extensions with theTypeFactory
, as well as registering any required deserializer modules with the JacksonObjectMapper
for appropriate deserialization to the projection upon entry into the service endpoint.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description ProjectionManager(TypeFactory typeFactory, ProjectionFactory projectionFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
processCandidate(Class<T> repoEntityClass, Class<T> candidate)
Given a class identified as managed by aRepository
, and a candidate domain class (either the same, or possibly more derived type), process all projection creation, type factory registration, and ObjectMapper deserialization module registration.<T> void
processProjection(Class<T> repoEntityClass, String projectionName)
Given a class identified as managed by aRepository
, and a target simple name for a projection class based on the managed class, process all projection creation, type factory registration, and ObjectMapper deserialization module registration.
-
-
-
Constructor Detail
-
ProjectionManager
public ProjectionManager(TypeFactory typeFactory, ProjectionFactory projectionFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
processCandidate
public <T> void processCandidate(Class<T> repoEntityClass, Class<T> candidate)
Given a class identified as managed by aRepository
, and a candidate domain class (either the same, or possibly more derived type), process all projection creation, type factory registration, and ObjectMapper deserialization module registration.- Type Parameters:
T
- The shared domain class type- Parameters:
repoEntityClass
- A class identified as managed by aRepository
candidate
- Either the same as repoEntityClass, or possibly more derived type
-
processProjection
public <T> void processProjection(Class<T> repoEntityClass, String projectionName)
Given a class identified as managed by aRepository
, and a target simple name for a projection class based on the managed class, process all projection creation, type factory registration, and ObjectMapper deserialization module registration.- Type Parameters:
T
- The shared domain class type- Parameters:
repoEntityClass
- A class identified as managed by aRepository
projectionName
- The simple name of the target projection class
-
-