Interface LinkService

All Known Implementing Classes:
LinkServiceImpl

public interface LinkService
Service to provide _link sections to rest output.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addLinks(@NotNull AbstractRestModel resource, @NotNull javax.ws.rs.core.UriInfo uriInfo)
    Add links to the resource.
    void
    addLinks(@NotNull AbstractRestModel resource, @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull String resourceLocation)
    Add links to the resource.
    void
    addPaginationLinks(@NotNull RestPageModel<?> page, @NotNull javax.ws.rs.core.UriInfo uriInfo)
    Add pagination links to the pageResponse.
    void
    addPaginationLinks(@NotNull RestPageModel<?> page, @NotNull javax.ws.rs.core.UriInfo uriInfo, int nextStart)
    Add pagination links to the pageResponse.
    void
    addPaginationLinks(@NotNull RestPageModel<?> page, @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull String pageLocation)
    Add pagination links to the pageResponse.
    void
    addPaginationSelfLink(@NotNull RestPageModel<?> page, @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull String pageLocation)
    Add pagination self link only to the pageResponse.
  • Method Details

    • addLinks

      void addLinks(@NotNull @NotNull AbstractRestModel resource, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo)
      Add links to the resource. Links provide base/self urls if required. Assumes the resource is at the level requested by the client, NOT an expand/sub object. i.e it uses the current request url to determine the base/self urls
      Parameters:
      resource - the resource ready to go back to the user
      uriInfo - information about the current request
    • addLinks

      void addLinks(@NotNull @NotNull AbstractRestModel resource, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull @NotNull String resourceLocation)
      Add links to the resource. Links provide base/self urls if required.
      Parameters:
      resource - the resource ready to go back to the user
      uriInfo - information about the current request
      resourceLocation - the url for the resource being returned relative to the base URI
    • addPaginationLinks

      void addPaginationLinks(@NotNull @NotNull RestPageModel<?> page, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo)
      Add pagination links to the pageResponse. Pagination links provide next/prev urls if required. Assumes the pagination is at the level requested by the client, NOT an expand/sub object. i.e it uses the current request url to determine the next/prev urls
      Parameters:
      page - the paged response ready to go back to the user
      uriInfo - information about the current request
    • addPaginationLinks

      void addPaginationLinks(@NotNull @NotNull RestPageModel<?> page, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo, int nextStart)
      Add pagination links to the pageResponse. Pagination links provide next/prev urls if required.
      Parameters:
      page - the paged response ready to go back to the user
      uriInfo - information about the current request
    • addPaginationLinks

      void addPaginationLinks(@NotNull @NotNull RestPageModel<?> page, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull @NotNull String pageLocation)
      Add pagination links to the pageResponse. Pagination links provide next/prev urls if required.
      Parameters:
      page - the paged response ready to go back to the user
      uriInfo - information about the current request
      pageLocation - the url for the resource being paged
    • addPaginationSelfLink

      void addPaginationSelfLink(@NotNull @NotNull RestPageModel<?> page, @NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull @NotNull String pageLocation)
      Add pagination self link only to the pageResponse.
      Parameters:
      page - the paged response ready to go back to the user
      uriInfo - information about the current request
      pageLocation - the url for the resource being paged