Package io.jmix.flowui.model
Class CollectionContainerSortManager
java.lang.Object
io.jmix.flowui.model.CollectionContainerSortManager
@Component("flowui_CollectionContainerSortManager")
public class CollectionContainerSortManager
extends Object
Creates sorters for collection containers.
The manager asks CollectionContainerSortProvider beans in Spring order and uses the first non-null sorter.
If no provider supports the context, it delegates to SorterFactory.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SorterFactoryprotected org.springframework.beans.factory.ObjectProvider<CollectionContainerSortProvider> -
Constructor Summary
ConstructorsConstructorDescriptionCollectionContainerSortManager(SorterFactory sorterFactory, org.springframework.beans.factory.ObjectProvider<CollectionContainerSortProvider> sortProviders) Creates a collection container sort manager. -
Method Summary
Modifier and TypeMethodDescriptioncreateCollectionContainerSorter(CollectionContainer<?> container) Creates a sorter for the specified collection container.createCollectionContainerSorter(CollectionContainer<?> container, @Nullable BaseCollectionLoader loader) Creates a sorter for the specified collection container and loader.protected SortercreateCollectionContainerSorterInternal(CollectionContainer<?> container, @Nullable BaseCollectionLoader loader) Creates a sorter using providers or a fallback factory.protected SortercreateFallbackSorter(CollectionContainer<?> container, @Nullable BaseCollectionLoader loader)
-
Field Details
-
sorterFactory
-
sortProviders
protected org.springframework.beans.factory.ObjectProvider<CollectionContainerSortProvider> sortProviders
-
-
Constructor Details
-
CollectionContainerSortManager
public CollectionContainerSortManager(SorterFactory sorterFactory, org.springframework.beans.factory.ObjectProvider<CollectionContainerSortProvider> sortProviders) Creates a collection container sort manager.- Parameters:
sorterFactory- fallback factory used if no provider returns a sortersortProviders- provider beans that can supply sorters
-
-
Method Details
-
createCollectionContainerSorter
Creates a sorter for the specified collection container.- Parameters:
container- collection container for which a sorter is created- Returns:
- sorter supplied by a provider, or a fallback sorter created by
SorterFactory
-
createCollectionContainerSorter
public Sorter createCollectionContainerSorter(CollectionContainer<?> container, @Nullable BaseCollectionLoader loader) Creates a sorter for the specified collection container and loader.- Parameters:
container- collection container for which a sorter is createdloader- collection loader associated with the container, ornullif there is no loader- Returns:
- sorter supplied by a provider, or a fallback sorter created by
SorterFactory
-
createCollectionContainerSorterInternal
protected Sorter createCollectionContainerSorterInternal(CollectionContainer<?> container, @Nullable BaseCollectionLoader loader) Creates a sorter using providers or a fallback factory.- Parameters:
container- collection container for which a sorter is createdloader- collection loader associated with the container, ornullif there is no loader- Returns:
- sorter supplied by a provider, or a fallback sorter created by
SorterFactory
-
createFallbackSorter
protected Sorter createFallbackSorter(CollectionContainer<?> container, @Nullable BaseCollectionLoader loader)
-