public class RepositoryRestConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static RepositoryRestConfiguration |
DEFAULT |
Constructor and Description |
---|
RepositoryRestConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.net.URI |
getBaseUri()
The base URI against which the exporter should calculate its links.
|
java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> |
getCustomConverters()
Get the list of custom
HttpMessageConverter s to be used to convert user input to objects and visa versa. |
org.springframework.http.MediaType |
getDefaultMediaType()
Get the
MediaType to use as a default when none is specified. |
int |
getDefaultPageSize()
Get the default size of
Pageable s. |
java.util.Map<java.lang.Class<?>,java.lang.Class<?>> |
getDomainTypeToRepositoryMappings()
Get the list of domain type to repository implementation mappings that will help the exporters narrow down the
correct
Repository to return for a given domain type. |
java.lang.String |
getJsonpOnErrParamName()
Get the name of the URL query string parameter that indicates the name of the javascript function to use as the
error handler JSONP wrapper for errors.
|
java.lang.String |
getJsonpParamName()
Get the name of the URL query string parameter that indicates the name of the javascript function to use as the
JSONP wrapper for results.
|
java.lang.String |
getLimitParamName()
Get the name of the URL query string parameter that indicates how many results to return at once.
|
java.lang.String |
getPageParamName()
Get the name of the URL query string parameter that indicates what page to return.
|
java.lang.String |
getSortParamName()
Get the name of the URL query string parameter that indicates what direction to sort results.
|
boolean |
isDumpErrors()
Should exception messages be logged to the body of the response in a JSON object?
|
RepositoryRestConfiguration |
setBaseUri(java.net.URI baseUri)
The base URI against which the exporter should calculate its links.
|
RepositoryRestConfiguration |
setCustomConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> customConverters)
Set the list of custom
HttpMessageConverter s to be used to convert user input to objects and visa versa. |
RepositoryRestConfiguration |
setDefaultMediaType(org.springframework.http.MediaType defaultMediaType)
Set the
MediaType to use as a default when none is specified. |
RepositoryRestConfiguration |
setDefaultPageSize(int defaultPageSize)
Set the default size of
Pageable s. |
RepositoryRestConfiguration |
setDomainTypeToRepositoryMappings(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> typeMappings)
Set the list of domain type to repository implementation mappings that will help the exporters narrow down the
correct
Repository to return for a given domain type. |
RepositoryRestConfiguration |
setDumpErrors(boolean dumpErrors)
Set whether exception messages should be logged to the body of the response as a JSON object.
|
RepositoryRestConfiguration |
setJsonpOnErrParamName(java.lang.String jsonpOnErrParamName)
Set the name of the URL query string parameter that indicates the name of the javascript function to use as the
error handler JSONP wrapper for errors.
|
RepositoryRestConfiguration |
setJsonpParamName(java.lang.String jsonpParamName)
Set the name of the URL query string parameter that indicates the name of the javascript function to use as the
JSONP wrapper for results.
|
RepositoryRestConfiguration |
setLimitParamName(java.lang.String limitParamName)
Set the name of the URL query string parameter that indicates how many results to return at once.
|
RepositoryRestConfiguration |
setPageParamName(java.lang.String pageParamName)
Set the name of the URL query string parameter that indicates what page to return.
|
RepositoryRestConfiguration |
setSortParamName(java.lang.String sortParamName)
Set the name of the URL query string parameter that indicates what direction to sort results.
|
public static final RepositoryRestConfiguration DEFAULT
public java.net.URI getBaseUri()
public RepositoryRestConfiguration setBaseUri(java.net.URI baseUri)
baseUri
- public int getDefaultPageSize()
Pageable
s. Default is 20.public RepositoryRestConfiguration setDefaultPageSize(int defaultPageSize)
Pageable
s.defaultPageSize
- public java.lang.String getPageParamName()
public RepositoryRestConfiguration setPageParamName(java.lang.String pageParamName)
pageParamName
- public java.lang.String getLimitParamName()
public RepositoryRestConfiguration setLimitParamName(java.lang.String limitParamName)
limitParamName
- public java.lang.String getSortParamName()
public RepositoryRestConfiguration setSortParamName(java.lang.String sortParamName)
sortParamName
- public java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> getCustomConverters()
HttpMessageConverter
s to be used to convert user input to objects and visa versa.public RepositoryRestConfiguration setCustomConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> customConverters)
HttpMessageConverter
s to be used to convert user input to objects and visa versa.customConverters
- public java.util.Map<java.lang.Class<?>,java.lang.Class<?>> getDomainTypeToRepositoryMappings()
Repository
to return for a given domain type.public RepositoryRestConfiguration setDomainTypeToRepositoryMappings(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> typeMappings)
Repository
to return for a given domain type.typeMappings
- public java.lang.String getJsonpParamName()
public RepositoryRestConfiguration setJsonpParamName(java.lang.String jsonpParamName)
jsonpParamName
- public java.lang.String getJsonpOnErrParamName()
public RepositoryRestConfiguration setJsonpOnErrParamName(java.lang.String jsonpOnErrParamName)
jsonpOnErrParamName
- public org.springframework.http.MediaType getDefaultMediaType()
MediaType
to use as a default when none is specified.public RepositoryRestConfiguration setDefaultMediaType(org.springframework.http.MediaType defaultMediaType)
MediaType
to use as a default when none is specified.defaultMediaType
- public boolean isDumpErrors()
public RepositoryRestConfiguration setDumpErrors(boolean dumpErrors)
dumpErrors
-