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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CompositeResolver.Builderbuilder()Create a new builder for a .booleanImplement access control if authorization is enabled.booleanrequiresAuth(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, waitMethods 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:ResolverImplement access control if authorization is enabled.Is not called when access control is not active.
-
resolve
Description copied from interface:ResolverImplement request resolution. -
requiresAuth
Description copied from interface:ResolverUsed to check if the resolver requires authentication to be used.- Specified by:
requiresAuthin 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.
-