Class CompositeResolver
java.lang.Object
com.djrapitops.plan.delivery.web.resolver.CompositeResolver
- All Implemented Interfaces:
Resolver
Utility Resolver for organizing resolution in a tree-like structure.
CompositeResolver removes first part of the target with URIPath.omitFirst()
before calling the child Resolvers.
Example: resolverService.registerResolver("/test/", compositeResolver);
The Resolvers added to CompositeResolver will be given Request with URIPath "/".
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompositeResolver.Builder
builder()
Create a new builder for a .boolean
Implement access control if authorization is enabled.boolean
requiresAuth
(Request request) Used to check if the resolver requires authentication to be used.Implement request resolution.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.djrapitops.plan.delivery.web.resolver.Resolver
newResponseBuilder, usedWebPermissions
-
Method Details
-
builder
Create a new builder for a .- Returns:
- a builder.
-
canAccess
Description copied from interface:Resolver
Implement access control if authorization is enabled.Is not called when access control is not active.
-
resolve
Description copied from interface:Resolver
Implement request resolution. -
requiresAuth
Description copied from interface:Resolver
Used to check if the resolver requires authentication to be used.- Specified by:
requiresAuth
in interfaceResolver
- Parameters:
request
- Incoming request that you can use to figure out if authentication is required.- Returns:
- true if you want 401 to be given when user has not logged in.
-