public class ProjectionDefinitionConfiguration extends Object implements ProjectionDefinitions
| Constructor and Description |
|---|
ProjectionDefinitionConfiguration()
Creates a new
ProjectionDefinitionConfiguration. |
| Modifier and Type | Method and Description |
|---|---|
ProjectionDefinitionConfiguration |
addProjection(Class<?> projectionType)
Adds the given projection type to the configuration.
|
ProjectionDefinitionConfiguration |
addProjection(Class<?> projectionType,
Class<?>... sourceTypes)
Adds a projection type for the given source types.
|
ProjectionDefinitionConfiguration |
addProjection(Class<?> projectionType,
String name,
Class<?>... sourceTypes)
Adds the given projection type for the given source types under the given name.
|
String |
getParameterName()
Returns the request parameter to be used to expose the projection to the web.
|
Map<String,Class<?>> |
getProjectionsFor(Class<?> sourceType)
Returns all projections registered for the given source type.
|
Class<?> |
getProjectionType(Class<?> sourceType,
String name)
Returns the projection type for the given source type and name.
|
boolean |
hasProjectionFor(Class<?> sourceType)
Returns whether we have a projection registered for the given source type.
|
void |
setParameterName(String parameterName)
Configures the request parameter name to be used to accept the projection name to be returned.
|
public ProjectionDefinitionConfiguration()
ProjectionDefinitionConfiguration.public String getParameterName()
ProjectionDefinitionsgetParameterName in interface ProjectionDefinitionspublic void setParameterName(String parameterName)
parameterName - defaults to , will
be set back to this default if null or an empty value is configured.public ProjectionDefinitionConfiguration addProjection(Class<?> projectionType)
Projection for
additional metadata.projectionType - must not be null.Projectionpublic ProjectionDefinitionConfiguration addProjection(Class<?> projectionType, Class<?>... sourceTypes)
projectionType - must not be null.sourceTypes - must not be null or empty.public ProjectionDefinitionConfiguration addProjection(Class<?> projectionType, String name, Class<?>... sourceTypes)
projectionType - must not be null.name - must not be null or empty.sourceTypes - must not be null or empty.public Class<?> getProjectionType(Class<?> sourceType, String name)
ProjectionDefinitionsgetProjectionType in interface ProjectionDefinitionssourceType - must not be null.name - must not be null or empty.public boolean hasProjectionFor(Class<?> sourceType)
ProjectionDefinitionshasProjectionFor in interface ProjectionDefinitionssourceType - must not be null.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.