Class ProvideLinkDescriptor

java.lang.Object
org.glassfish.jersey.linking.ProvideLinkDescriptor

public class ProvideLinkDescriptor extends Object
Utility to work with ProvideLink annotations.
Author:
Leonard Brünings
  • Constructor Details

    • ProvideLinkDescriptor

      public ProvideLinkDescriptor(ResourceMethod resource, ProvideLink provideLink, Annotation parentAnnotation)
      c'tor
      Parameters:
      resource - the annotated resource method
      provideLink - the annotaion
      parentAnnotation - the parent annotation if present or null
  • Method Details

    • getProvideLink

      public ProvideLink getProvideLink()
      Returns:
      the annotation
    • getResource

      public ResourceMethod getResource()
      Returns:
      the annotated resource method
    • getLinkStyle

      public InjectLink.Style getLinkStyle()
      Get the style
      Returns:
      the style
    • getLinkTemplate

      public String getLinkTemplate(ResourceMappingContext rmc)
      Get the link template, either directly from the value() or from the @Path of the class referenced in resource()
      Returns:
      the link template
    • getBinding

      public String getBinding(String name)
      Get the binding as an EL expression for a particular URI template parameter
      Parameters:
      name - binding name.
      Returns:
      the EL binding.
    • getCondition

      public String getCondition()
      Get the condition.
      Returns:
      the condition
    • getLink

      public Link getLink(URI uri)
      Builds a link from a URI.
      Parameters:
      uri - base URI
      Returns:
      the Link instance
    • getParentAnnotation

      public Annotation getParentAnnotation()
      Returns:
      the parent annotation or null