Package de.cxp.ocs.util
Interface LinkBuilder
- All Known Implementing Classes:
DefaultLinkBuilder
public interface LinkBuilder
Interface for internal utility function exposed to the provided plugins. The link builder is immutable and
always uses the 'current URL state' as a basis. So each call just returns a copy state reflected as
an URL and does not change the linkbuilder itself.
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
withExactFilterAsLink
(String filtername, String... values) Returns an URL with that filter set.withFilterAsLink
(String filtername, boolean mergeValues, String... values) Returns an URL with the specified filter(s) set.withoutFilterAsLink
(String filtername) Returns an URL without the filter parameter of that according facet.
-
Method Details
-
withFilterAsLink
Returns an URL with the specified filter(s) set. If that filter already exists, the values will be merged in case the mergeValues option is set in the configuration. Otherwise the values are replaced.- Parameters:
filtername
- name of the filter to addmergeValues
- set true to merge values in case of existing filter, to replace existing values set to falsevalues
- the values the filter should have- Returns:
- the created URL
-
withExactFilterAsLink
Returns an URL with that filter set. If the filter-name existed before, it will be replaced completely. No multi-select value merging will be done.
- Parameters:
filtername
- name of the filter to addvalues
- the values the filter should have- Returns:
- the created filter URL
-
withoutFilterAsLink
Returns an URL without the filter parameter of that according facet.- Parameters:
filtername
- the filter to remove from the current ulr.- Returns:
-