Class FilterUtils
java.lang.Object
io.jmix.flowui.component.genericfilter.FilterUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.vaadin.flow.component.Composite<?>findCurrentOwner(GenericFilter genericFilter) Finds and returns the current owner of the specifiedGenericFilter.static StringgenerateConfigurationId(String configurationName) static StringgenerateFilterPath(GenericFilter filter) static <T extends Facet>
TRetrieves a facet of the specified type from the given owner.static <T extends Facet>
TgetFacet(GenericFilter genericFilter, Class<T> facetClass) Retrieves a facet of the specified type from the current owner of the givenGenericFilter.static voidsetCurrentConfiguration(GenericFilter filter, Configuration currentConfiguration, boolean fromClient) static voidupdateDataLoaderInitialCondition(GenericFilter genericFilter, Condition condition)
-
Constructor Details
-
FilterUtils
public FilterUtils()
-
-
Method Details
-
generateConfigurationId
-
generateFilterPath
-
setCurrentConfiguration
public static void setCurrentConfiguration(GenericFilter filter, Configuration currentConfiguration, boolean fromClient) -
updateDataLoaderInitialCondition
public static void updateDataLoaderInitialCondition(GenericFilter genericFilter, @Nullable Condition condition) -
findCurrentOwner
@Nullable public static com.vaadin.flow.component.Composite<?> findCurrentOwner(GenericFilter genericFilter) Finds and returns the current owner of the specifiedGenericFilter. The owner is determined by checking if theGenericFilterattached to a fragment or a view.- Parameters:
genericFilter- theGenericFilterfor which the current owner is to be found- Returns:
- the current owner of the
GenericFilter, ornullif no owner is found
-
getFacet
@Nullable public static <T extends Facet> T getFacet(GenericFilter genericFilter, Class<T> facetClass) Retrieves a facet of the specified type from the current owner of the givenGenericFilter.- Type Parameters:
T- the type of the facet to be returned- Parameters:
genericFilter- theGenericFilterwhose current owner is queried for the specified facet typefacetClass- theClassof the facet to be retrieved- Returns:
- the facet of the specified type if found, or
nullif no such facet exists
-
getFacet
@Nullable public static <T extends Facet> T getFacet(@Nullable com.vaadin.flow.component.Composite<?> currentOwner, Class<T> facetClass) Retrieves a facet of the specified type from the given owner.- Type Parameters:
T- the type of the facet to be returned- Parameters:
currentOwner- the current owningCompositeinstance from which to retrieve the facet (aFragmentor aView), ornullif no owner is currently availablefacetClass- theClassof the facet to be retrieved, must not benull- Returns:
- the facet of the specified type if found, or
nullif no such facet exists
-