public class RouteSpec extends Object
ComponentRoute
.Modifier and Type | Class and Description |
---|---|
static class |
RouteSpec.RouteBooleanSpec
A specification extension for
RouteSpec that provides an entry-point to chain
together predicates through methods RouteSpec.RouteBooleanSpec.and() , RouteSpec.RouteBooleanSpec.or() , and RouteSpec.RouteBooleanSpec.negate() . |
Constructor and Description |
---|
RouteSpec(RoutesSpec parent) |
RouteSpec(RoutesSpec parent,
ComponentRoute.ComponentRouteBuilder routeBuilder) |
Modifier and Type | Method and Description |
---|---|
RouteSpec.RouteBooleanSpec |
applicationOnly()
Adds a special predicate to limit this route to only be returned for a strict application
context.
|
protected ComponentRoute |
build() |
RouteSpec |
clearScopes()
Clears the scopes for the route.
|
RouteSpec |
componentId(String componentId)
Sets the component ID of the route.
|
RouteSpec |
componentName(String componentName)
Sets the component name of the route.
|
RouteSpec |
exact(boolean exact)
Sets whether or not the route must match exactly.
|
protected <B> B |
getBean(Class<B> beanClass) |
RouteSpec |
order(int order)
Sets the absolute ordering of the route.
|
RouteSpec |
path(String path)
Sets the path of the route.
|
RouteSpec.RouteBooleanSpec |
predicate(Predicate<org.springframework.web.context.request.WebRequest> predicate)
Sets a predicate for the route.
|
RouteSpec |
scope(String scope)
Adds the scope to the route.
|
RouteSpec |
scopes(List<String> scopes)
Sets the scopes for the route.
|
RouteSpec.RouteBooleanSpec |
tenancy(Consumer<TenancyRoutePredicateFactory.Config> fn)
Adds a special predicate for limiting this route to certain tenancy contexts.
|
RouteSpec.RouteBooleanSpec |
tenantOnly()
Adds a special predicate to limit this route to only be returned for a strict tenant context.
|
public RouteSpec(RoutesSpec parent)
public RouteSpec(RoutesSpec parent, ComponentRoute.ComponentRouteBuilder routeBuilder)
public RouteSpec path(String path)
path
- the new route pathpublic RouteSpec componentId(String componentId)
componentId
- the new component IDpublic RouteSpec componentName(String componentName)
componentName
- the new component namepublic RouteSpec scope(String scope)
scope
- a new scopepublic RouteSpec scopes(List<String> scopes)
scopes
- the new scopespublic RouteSpec clearScopes()
public RouteSpec order(int order)
order
- the new order of the routepublic RouteSpec exact(boolean exact)
exact
- whether or not exact match is requiredfor more details
public RouteSpec.RouteBooleanSpec predicate(Predicate<org.springframework.web.context.request.WebRequest> predicate)
predicate
- the new predicatepublic RouteSpec.RouteBooleanSpec tenancy(Consumer<TenancyRoutePredicateFactory.Config> fn)
fn
- a function to configure the tenancy contextRouteSpec.RouteBooleanSpec
to allow chaining of predicatespublic RouteSpec.RouteBooleanSpec tenantOnly()
RouteSpec.RouteBooleanSpec
to allow chaining of predicatespublic RouteSpec.RouteBooleanSpec applicationOnly()
RouteSpec.RouteBooleanSpec
to allow chaining of predicatesprotected ComponentRoute build()
protected <B> B getBean(Class<B> beanClass)
Copyright © 2021. All rights reserved.