private Links getSearchLinks(Class<?> domainType) {
List<Link> links = new ArrayList<Link>();
SearchResourceMappings searchMappings = mappings.getSearchResourceMappings(domainType);
LinkBuilder builder = entityLinks.linkFor(domainType).slash(searchMappings.getPath());
for (MethodResourceMapping mapping : searchMappings) {
if (!mapping.isExported()) {
continue;
}
TemplateVariables variables = new TemplateVariables();
for (ParameterMetadata metadata : mapping.getParametersMetadata()) {
variables = variables.concat(new TemplateVariable(metadata.getName(), VariableType.REQUEST_PARAM));
}
String href = builder.slash(mapping.getPath()).toString().concat(variables.toString());
Link link = new Link(href, mapping.getRel());
if (mapping.isPagingResource()) {
link = assembler.appendPaginationParameterTemplates(link);