/*
   * (non-Javadoc)
   * @see org.springframework.hateoas.mvc.UriComponentsContributor#enhance(org.springframework.web.util.UriComponentsBuilder, org.springframework.core.MethodParameter, java.lang.Object)
   */
  @Override
  public void enhance(UriComponentsBuilder builder, MethodParameter parameter, Object value) {

    if (value instanceof Pageable) {
      pagingResolver.enhance(builder, parameter, value);
    } else if (value instanceof Sort) {
      sortResolver.enhance(builder, parameter, value);
    }
  }
 /*
  * (non-Javadoc)
  * @see org.springframework.data.rest.webmvc.support.PagingAndSortingTemplateVariables#getSortTemplateVariables(org.springframework.core.MethodParameter, org.springframework.web.util.UriComponents)
  */
 @Override
 public TemplateVariables getSortTemplateVariables(
     MethodParameter parameter, UriComponents template) {
   return sortResolver.getSortTemplateVariables(parameter, template);
 }