Interface LinkService
-
- All Known Implementing Classes:
LinkServiceImpl
public interface LinkServiceService to provide _link sections to rest output.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddLinks(@NotNull AbstractRestModel resource, @NotNull javax.ws.rs.core.UriInfo uriInfo)Add links to the resource.voidaddLinks(@NotNull AbstractRestModel resource, @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull String resourceLocation)Add links to the resource.voidaddPaginationLinks(@NotNull RestPageModel<?> page, @NotNull javax.ws.rs.core.UriInfo uriInfo)Add pagination links to the pageResponse.voidaddPaginationLinks(@NotNull RestPageModel<?> page, @NotNull javax.ws.rs.core.UriInfo uriInfo, int nextStart)Add pagination links to the pageResponse.voidaddPaginationLinks(@NotNull RestPageModel<?> page, @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull String pageLocation)Add pagination links to the pageResponse.voidaddPaginationSelfLink(@NotNull RestPageModel<?> page, @NotNull javax.ws.rs.core.UriInfo uriInfo, @NotNull String pageLocation)Add pagination self link only to the pageResponse.
-
-
-
Method Detail
-
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 useruriInfo- 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 useruriInfo- information about the current requestresourceLocation- 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 useruriInfo- 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 useruriInfo- 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 useruriInfo- information about the current requestpageLocation- 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 useruriInfo- information about the current requestpageLocation- the url for the resource being paged
-
-