/** * Creates a new {@link UriTemplate} with a {@link TemplateVariable} with the given name and type added. * * @param variableName must not be {@literal null} or empty. * @param type must not be {@literal null}. * @return will never be {@literal null}. */ public UriTemplate with(String variableName, TemplateVariable.VariableType type) { return with(new TemplateVariables(new TemplateVariable(variableName, type))); }
/** * Creates a new {@link UriTemplate} with a {@link TemplateVariable} with the given name and type added. * * @param variableName must not be {@literal null} or empty. * @param type must not be {@literal null}. * @return will never be {@literal null}. */ public UriTemplate with(String variableName, TemplateVariable.VariableType type) { return with(new TemplateVariables(new TemplateVariable(variableName, type))); }
public RegistrationsResource() { add(linkTo(UserRegistrationRestController.class).withSelfRel()); Link searchLink = linkTo(UserRegistrationRestController.class).slash(RestApiConstants.SEARCH_RESOURCE) .withRel(RestApiConstants.SEARCH_RESOURCE); add(new Link(new UriTemplate(searchLink.getHref()) .with(RestApiConstants.TOKEN_PARAM, TemplateVariable.VariableType.REQUEST_PARAM), searchLink.getRel())); } }