Class AutoSuggestDataEndpoint
java.lang.Object
com.foreach.across.modules.entity.autosuggest.AutoSuggestDataEndpoint
Registry for attaching a
SimpleAutoSuggestDataSet
to a particular endpoint.
This usually makes the dataset callable over a remote API.- Since:
- 3.0.0
- Author:
- Arne Vandamme
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Wraps a regularSimpleAutoSuggestDataSet
with endpoint identification data. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDataSet
(String dataSetId) Get the dataset with that id.org.springframework.web.util.UriComponentsBuilder
prefetchUriComponents
(String dataSetId) Create the prefetch url components for a named dataset.registerDataSet
(@NonNull String id, @NonNull AutoSuggestDataSet dataSet) Attach a dataset with a specific id to this endpoint.registerDataSet
(AutoSuggestDataSet dataSet) Deprecated.since 3.4.0 - manually specify an idremoveDataSet
(String id) Remove the dataset with that id.org.springframework.web.util.UriComponentsBuilder
suggestionsUriComponents
(String dataSetId) Create the suggestions url components for a named dataset.
-
Constructor Details
-
AutoSuggestDataEndpoint
-
-
Method Details
-
registerDataSet
@Deprecated public AutoSuggestDataEndpoint.MappedDataSet registerDataSet(AutoSuggestDataSet dataSet) Deprecated.since 3.4.0 - manually specify an idAttach a dataset to this endpoint. This will assign a random unique name to this dataset, and make it available on the controller attached to this endpoint.- Parameters:
dataSet
- to attach- Returns:
- attached dataset context
-
registerDataSet
public AutoSuggestDataEndpoint.MappedDataSet registerDataSet(@NonNull @NonNull String id, @NonNull @NonNull AutoSuggestDataSet dataSet) Attach a dataset with a specific id to this endpoint. Will replace any previously registered dataset for that endpoint.- Parameters:
id
- of the datasetdataSet
- to attach- Returns:
- attached dataset context
-
removeDataSet
Remove the dataset with that id.- Parameters:
id
- of the dataset- Returns:
- the underlying dataset that has been removed
-
getDataSet
Get the dataset with that id.- Parameters:
dataSetId
- id of the dataset- Returns:
- dataset of
null
if not found
-
suggestionsUriComponents
Create the suggestions url components for a named dataset. Usually the resulting url should not be encoded as it contains{{XX}}
parameters.- Parameters:
dataSetId
- id of the dataset- Returns:
- url
-
prefetchUriComponents
Create the prefetch url components for a named dataset. Usually the resulting url should not be encoded as it contains{{XX}}
parameters.- Parameters:
dataSetId
- id of the dataset- Returns:
- url
-