Package com.btcvelocity.api.permission
Interface PermissionResolverProvider
public interface PermissionResolverProvider
Provides
PermissionResolvers for PermissionSubjects.-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable PermissionResolvercreateResolver(PermissionSubject subject) Creates aPermissionResolverfor the subject without a delegate.@Nullable PermissionResolvercreateResolver(PermissionSubject subject, @Nullable PermissionFunction delegate) Creates aPermissionResolverfor the subject with an optionalPermissionFunctiondelegate.booleanShould perform a check to see if thisPermissionResolverProvideris available or not.
-
Method Details
-
isAvailable
boolean isAvailable()Should perform a check to see if thisPermissionResolverProvideris available or not. If this method returnsfalse, subsequent calls to the provider's functions may result in errors or undefined behavior.- Returns:
trueif thisPermissionResolverProvideris available,falseif not
-
createResolver
@Nullable PermissionResolver createResolver(PermissionSubject subject, @Nullable PermissionFunction delegate) Creates aPermissionResolverfor the subject with an optionalPermissionFunctiondelegate.- Parameters:
subject- the subjectdelegate- the optional delegate to use- Returns:
- the permission resolver
-
createResolver
Creates aPermissionResolverfor the subject without a delegate.- Parameters:
subject- the subject- Returns:
- the permission resolver
-