Java Code Examples for org.springframework.web.servlet.support.ServletUriComponentsBuilder#pathSegment()

The following examples show how to use org.springframework.web.servlet.support.ServletUriComponentsBuilder#pathSegment() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static UriComponents createEntityTypeMetadataAttributeUriComponents(
    String entityTypeId, String attributeName) {
  ServletUriComponentsBuilder builder = createBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(RestController.API_VERSION, entityTypeId, "meta", attributeName);
  return builder.build();
}
 
Example 2
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static UriComponents createEntityAttributeUriComponents(
    String entityTypeId, Object entityId, String attributeName) {
  ServletUriComponentsBuilder builder = createBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(
      RestController.API_VERSION, entityTypeId, entityId.toString(), attributeName);
  return builder.build();
}
 
Example 3
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static UriComponents createEntityCollectionUriComponents(
    ServletUriComponentsBuilder builder, String entityTypeId) {
  builder = builder.cloneBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(RestControllerV2.API_VERSION, entityTypeId);
  return builder.build();
}
 
Example 4
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static UriComponents createEntityTypeMetadataAttributeUriComponents(
    ServletUriComponentsBuilder builder, String entityTypeId, String attributeName) {
  builder = builder.cloneBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(RestControllerV2.API_VERSION, entityTypeId, "meta", attributeName);
  return builder.build();
}
 
Example 5
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static UriComponents createEntityUriComponents(
    ServletUriComponentsBuilder builder, String entityTypeId, Object entityId) {
  builder = builder.cloneBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(RestControllerV2.API_VERSION, entityTypeId, entityId.toString());
  return builder.build();
}
 
Example 6
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static UriComponents createEntityAttributeUriComponents(
    ServletUriComponentsBuilder builder,
    String entityTypeId,
    Object entityId,
    String attributeName) {
  builder = builder.cloneBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(
      RestControllerV2.API_VERSION, entityTypeId, entityId.toString(), attributeName);
  return builder.build();
}
 
Example 7
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static UriComponents createEntitiesUriComponents(
    ServletUriComponentsBuilder builder,
    String entityTypeId,
    String idAttributeName,
    Collection<String> entityIds) {
  builder = builder.cloneBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(RestControllerV2.API_VERSION, entityTypeId);
  builder.queryParam("q", createEntitiesUriQuery(idAttributeName, entityIds));
  return builder.build();
}
 
Example 8
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 4 votes vote down vote up
private static UriComponents createEntityCollectionUriComponents(String entityTypeId) {
  ServletUriComponentsBuilder builder = createBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(RestController.API_VERSION, entityTypeId);
  return builder.build();
}
 
Example 9
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 4 votes vote down vote up
private static UriComponents createEntityTypeMetadataUriComponents(String entityTypeId) {
  ServletUriComponentsBuilder builder = createBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(RestController.API_VERSION, entityTypeId, "meta");
  return builder.build();
}
 
Example 10
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 4 votes vote down vote up
private static UriComponents createEntityUriComponents(String entityTypeId, Object entityId) {
  ServletUriComponentsBuilder builder = createBuilder();
  builder.path(ApiNamespace.API_PATH);
  builder.pathSegment(RestController.API_VERSION, entityTypeId, entityId.toString());
  return builder.build();
}