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() |
public ExposureConfiguration withCollectionExposure(ExposureConfigurer.AggregateResourceHttpMethodsFilter filter)
ExposureConfigurer
ExposureConfigurer.AggregateResourceHttpMethodsFilter
to be used for collection resources.withCollectionExposure
in interface ExposureConfigurer
filter
- must not be null.public ExposureConfiguration withItemExposure(ExposureConfigurer.AggregateResourceHttpMethodsFilter filter)
ExposureConfigurer
ExposureConfigurer.AggregateResourceHttpMethodsFilter
to be used for item resources.withItemExposure
in interface ExposureConfigurer
public ExposureConfiguration withAssociationExposure(ExposureConfigurer.AssociationResourceHttpMethodsFilter filter)
ExposureConfigurer
ExposureConfigurer.AssociationResourceHttpMethodsFilter
.withAssociationExposure
in interface ExposureConfigurer
public ExposureConfiguration disablePutForCreation()
ExposureConfigurer
HttpMethod.PUT
.disablePutForCreation
in interface ExposureConfigurer
public ExposureConfigurer forDomainType(Class<?> type)
ExposureConfigurer
to allow the registration of type specific
AggregateResourceHttpMethodsFilter
and AssociationResourceHttpMethodsFilter
s 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.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.