Package org.glassfish.jersey.linking
Class ProvideLinkDescriptor
- java.lang.Object
-
- org.glassfish.jersey.linking.ProvideLinkDescriptor
-
public class ProvideLinkDescriptor extends Object
Utility to work withProvideLinkannotations.- Author:
- Leonard Brünings
-
-
Constructor Summary
Constructors Constructor Description ProvideLinkDescriptor(ResourceMethod resource, ProvideLink provideLink, Annotation parentAnnotation)c'tor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBinding(String name)Get the binding as an EL expression for a particular URI template parameterStringgetCondition()Get the condition.LinkgetLink(URI uri)Builds a link from aURI.InjectLink.StylegetLinkStyle()Get the styleStringgetLinkTemplate(ResourceMappingContext rmc)Get the link template, either directly from the value() or from the@Pathof the class referenced in resource()AnnotationgetParentAnnotation()ProvideLinkgetProvideLink()ResourceMethodgetResource()
-
-
-
Constructor Detail
-
ProvideLinkDescriptor
public ProvideLinkDescriptor(ResourceMethod resource, ProvideLink provideLink, Annotation parentAnnotation)
c'tor- Parameters:
resource- the annotated resource methodprovideLink- the annotaionparentAnnotation- the parent annotation if present ornull
-
-
Method Detail
-
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@Pathof 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 aURI.- Parameters:
uri- base URI- Returns:
- the
Linkinstance
-
getParentAnnotation
public Annotation getParentAnnotation()
- Returns:
- the parent annotation or
null
-
-