public class ExposureConfiguration extends Object implements ExposureConfigurer
forDomainType(Class). Useful global
shortcuts like disablePutOnItemResources() do exist as well.forDomainType(Class)ExposureConfigurer.AggregateResourceHttpMethodsFilter, ExposureConfigurer.AssociationResourceHttpMethodsFilter| Constructor and Description |
|---|
ExposureConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsPutForCreation(Class<?> domainType)
Returns whether PUT requests can be used to create new instances of the given domain type.
|
boolean |
allowsPutForCreation(ResourceMetadata metadata)
Returns whether PUT requests can be used to create new instances for the type backing the given
ResourceMetadata. |
ExposureConfiguration |
disablePatchOnItemResources()
Disables the support for
HttpMethod.PATCH for item resources. |
ExposureConfiguration |
disablePutForCreation()
Disables the ability to create new item resources via
HttpMethod.PUT. |
ExposureConfiguration |
disablePutOnItemResources()
Disables the support for
HttpMethod.PUT for item resources. |
ExposureConfigurer |
forDomainType(Class<?> type)
Returns a
ExposureConfigurer to allow the registration of type specific
AggregateResourceHttpMethodsFilter and AssociationResourceHttpMethodsFilters which means the
configured filters will only be invoked for aggregates of the given type and properties owned by that type
respectively. |
ExposureConfiguration |
withAssociationExposure(ExposureConfigurer.AssociationResourceHttpMethodsFilter filter)
Registers the given
ExposureConfigurer.AssociationResourceHttpMethodsFilter. |
ExposureConfiguration |
withCollectionExposure(ExposureConfigurer.AggregateResourceHttpMethodsFilter filter)
Registers the given
ExposureConfigurer.AggregateResourceHttpMethodsFilter to be used for collection resources. |
ExposureConfiguration |
withItemExposure(ExposureConfigurer.AggregateResourceHttpMethodsFilter filter)
Registers the given
ExposureConfigurer.AggregateResourceHttpMethodsFilter to be used for item resources. |
public ExposureConfiguration withCollectionExposure(ExposureConfigurer.AggregateResourceHttpMethodsFilter filter)
ExposureConfigurerExposureConfigurer.AggregateResourceHttpMethodsFilter to be used for collection resources.withCollectionExposure in interface ExposureConfigurerfilter - must not be null.public ExposureConfiguration withItemExposure(ExposureConfigurer.AggregateResourceHttpMethodsFilter filter)
ExposureConfigurerExposureConfigurer.AggregateResourceHttpMethodsFilter to be used for item resources.withItemExposure in interface ExposureConfigurerpublic ExposureConfiguration withAssociationExposure(ExposureConfigurer.AssociationResourceHttpMethodsFilter filter)
ExposureConfigurerExposureConfigurer.AssociationResourceHttpMethodsFilter.withAssociationExposure in interface ExposureConfigurerpublic ExposureConfiguration disablePutForCreation()
ExposureConfigurerHttpMethod.PUT.disablePutForCreation in interface ExposureConfigurerpublic ExposureConfigurer forDomainType(Class<?> type)
ExposureConfigurer to allow the registration of type specific
AggregateResourceHttpMethodsFilter and AssociationResourceHttpMethodsFilters which means the
configured filters will only be invoked for aggregates of the given type and properties owned by that type
respectively.type - must not be null.public ExposureConfiguration disablePutOnItemResources()
HttpMethod.PUT for item resources.public ExposureConfiguration disablePatchOnItemResources()
HttpMethod.PATCH for item resources.public boolean allowsPutForCreation(ResourceMetadata metadata)
ResourceMetadata.metadata - must not be null.public boolean allowsPutForCreation(Class<?> domainType)
domainType - must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.