Example usage for org.springframework.web.util UriComponentsBuilder replaceQueryParam

List of usage examples for org.springframework.web.util UriComponentsBuilder replaceQueryParam

Introduction

In this page you can find the example usage for org.springframework.web.util UriComponentsBuilder replaceQueryParam.

Prototype

@Override
public UriComponentsBuilder replaceQueryParam(String name, @Nullable Collection<?> values) 

Source Link

Document

Set the query parameter values overriding all existing query values for the same parameter.

Usage

From source file:cherry.sqlman.tool.load.SqlLoadControllerImpl.java

private UriComponents redirectOnInit(String redirTo, Integer ref) {
    if (StringUtils.isNotEmpty(redirTo)) {
        return UriComponentsBuilder.fromPath(redirTo).build();
    } else {//from   ww w .  jav a2s .c  om
        UriComponentsBuilder ucb = fromMethodCall(
                on(SqlLoadController.class).start(null, null, null, null, null, null, null));
        if (ref == null) {
            return ucb.replaceQuery(StringUtils.EMPTY).build();
        } else {
            return ucb.replaceQueryParam(REQ_REF, ref).build();
        }
    }
}

From source file:cherry.sqlman.tool.statement.SqlStatementControllerImpl.java

private UriComponents redirectOnInit(String redirTo, Integer ref) {
    if (StringUtils.isNotEmpty(redirTo)) {
        return UriComponentsBuilder.fromPath(redirTo).build();
    } else {//from   w  w  w  .  jav a 2  s . co m
        UriComponentsBuilder ucb = fromMethodCall(
                on(SqlStatementController.class).start(null, null, null, null, null, null, null));
        if (ref == null) {
            return ucb.replaceQuery(StringUtils.EMPTY).build();
        } else {
            return ucb.replaceQueryParam(REQ_REF, ref).build();
        }
    }
}

From source file:cherry.sqlman.tool.clause.SqlClauseControllerImpl.java

private UriComponents redirectOnInit(String redirTo, Integer ref) {
    if (StringUtils.isNotEmpty(redirTo)) {
        return UriComponentsBuilder.fromPath(redirTo).build();
    } else {/*  w w w .  j  a  va 2  s  .c  o m*/
        UriComponentsBuilder ucb = fromMethodCall(
                on(SqlClauseController.class).start(null, null, null, null, null, null, null));
        if (ref == null) {
            return ucb.replaceQuery(StringUtils.EMPTY).build();
        } else {
            return ucb.replaceQueryParam(REQ_REF, ref).build();
        }
    }
}