Interface AccessContext

    • Method Detail

      • getTargetType

        AccessContext.TargetType getTargetType()
        The type of the target for which to check access; either a route or and endpoint.
        Returns:
        type of the target for which to check access
      • findAnnotation

        <A extends AnnotationOptional<A> findAnnotation​(Class<A> annotationType)
        A convenience method that allows to find the first matching annotation of a certain type, looking in locations and in an order that makes the most sense for the target type of this access context. This method does support meta-annotations.
        Type Parameters:
        A - the annotation type
        Parameters:
        annotationType - the annotation type
        Returns:
        the first matching annotation
      • isRoute

        default boolean isRoute()
        Returns whether this is a route access context, i.e. whether asRouteAccessContext() can be safely called.
        Returns:
        whether this is a route access context
      • asRouteAccessContext

        default RouteAccessContext asRouteAccessContext()
        Casts this access context to a RouteAccessContext which provides more information that is specific to this target type. Check the type before calling this method to see if this is possible.
        Returns:
        this access context as a RouteAccessContext
      • isEndpoint

        default boolean isEndpoint()
        Returns whether this is an endpoint access context, i.e. whether asEndpointAccessContext() can be safely called.
        Returns:
        whether this is an endpoint access context