Package jakarta.faces.component.search
Class SearchExpressionContext
java.lang.Object
jakarta.faces.component.search.SearchExpressionContext
- Direct Known Subclasses:
SearchExpressionContextImpl
public abstract class SearchExpressionContext extends Object
A context object that is used to hold state relating to resolve a search expression.
- Since:
- 2.3
- See Also:
SearchExpressionHandler
-
Constructor Summary
Constructors Constructor Description SearchExpressionContext()
-
Method Summary
Modifier and Type Method Description static SearchExpressionContext
createSearchExpressionContext(FacesContext context, UIComponent source)
Creates aSearchExpressionContext
instance for use with theSearchExpressionHandler
.static SearchExpressionContext
createSearchExpressionContext(FacesContext context, UIComponent source, Set<SearchExpressionHint> expressionHints, Set<VisitHint> visitHints)
Creates aSearchExpressionContext
instance for use with theSearchExpressionHandler
.abstract Set<SearchExpressionHint>
getExpressionHints()
Returns hints that influence the behavior of resolving the expression.abstract FacesContext
getFacesContext()
Returns the FacesContext for the current request.abstract UIComponent
getSource()
Returns the source / base component from which we will start to perform our search.abstract Set<VisitHint>
getVisitHints()
Returns hints that influence the behavior of the tree visit, if it's used by anSearchKeywordResolver
implementation.
-
Constructor Details
-
SearchExpressionContext
public SearchExpressionContext()
-
-
Method Details
-
getSource
Returns the source / base component from which we will start to perform our search.
- Returns:
- the source component.
- Since:
- 2.3
-
getVisitHints
Returns hints that influence the behavior of the tree visit, if it's used by an
SearchKeywordResolver
implementation.- Returns:
- a non-empty, unmodifiable collection of
VisitHint
s - Since:
- 2.3
- See Also:
VisitContext.getHints()
-
getExpressionHints
Returns hints that influence the behavior of resolving the expression.
- Returns:
- a non-empty, unmodifiable collection of
SearchExpressionHint
s - Since:
- 2.3
-
getFacesContext
Returns the FacesContext for the current request.
- Returns:
- the FacesContext.
- Since:
- 2.3
-
createSearchExpressionContext
public static SearchExpressionContext createSearchExpressionContext(FacesContext context, UIComponent source)Creates a
SearchExpressionContext
instance for use with theSearchExpressionHandler
. This method can be used to obtain a SearchExpressionContext instance without anyVisitHint
orSearchExpressionHint
.- Parameters:
context
- the FacesContext for the current requestsource
- the source / base component from which we will start to perform our search.- Returns:
- a
SearchExpressionContext
instance - Since:
- 2.3
-
createSearchExpressionContext
public static SearchExpressionContext createSearchExpressionContext(FacesContext context, UIComponent source, Set<SearchExpressionHint> expressionHints, Set<VisitHint> visitHints)Creates a
SearchExpressionContext
instance for use with theSearchExpressionHandler
.- Parameters:
context
- the FacesContext for the current requestsource
- the source / base component from which we will start to perform our search.expressionHints
- the SearchExpressionHint to apply to the search. Ifnull
, no hints are applied.visitHints
- the VisitHints to apply to the visit, if used by aSearchKeywordResolver
. Ifnull
, no hints are applied.- Returns:
- a
SearchExpressionContext
instance - Since:
- 2.3
-