Interface ResourceLinkResolver

All Known Implementing Classes:
AbstractResourceLinkResolver

public interface ResourceLinkResolver
Responsible for resolving a link (type of ResourceLink) for a Resource representation.
  • Method Details

    • resolve

      ResourceLink resolve(Resource resource) throws ResourceException
      Resolves a ResourceLink for the given resource.
      Parameters:
      resource - resource representation
      Returns:
      a ResourceLink for the given resource
      Throws:
      ResourceException - if resource resolution operation fails
    • resolve

      ResourceLink resolve(Resource resource, Map<String,Object> linkVariables) throws ResourceException
      Resolves a ResourceLink for the given resource with passing linkVariables that can be used by implementation to expand its internal link generation template.

      How the linkVariables is used in link generation template expansion is totally up to an implementation.

      Parameters:
      resource - resource representation
      linkVariables - the variables to expand the internal link generation template
      Returns:
      a ResourceLink for the given resource
      Throws:
      ResourceException - if resource resolution operation fails