Package com.atlassian.jira.jql.validator
Class SavedFilterCycleDetector
java.lang.Object
com.atlassian.jira.jql.validator.SavedFilterCycleDetector
Runs through a saved filter to determine if there is any self-reference anywhere in the nested filter.
- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionSavedFilterCycleDetector(SavedFilterResolver savedFilterResolver, JqlOperandResolver jqlOperandResolver) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsSavedFilterReference(ApplicationUser searcher, boolean overrideSecurity, SearchRequest savedFilter, Long filterId) Checks if the specified savedSearchRequestcontains a reference to another saved filter by using thesavedFilterclause.
-
Constructor Details
-
SavedFilterCycleDetector
public SavedFilterCycleDetector(SavedFilterResolver savedFilterResolver, JqlOperandResolver jqlOperandResolver)
-
-
Method Details
-
containsSavedFilterReference
public boolean containsSavedFilterReference(ApplicationUser searcher, boolean overrideSecurity, SearchRequest savedFilter, Long filterId) Checks if the specified savedSearchRequestcontains a reference to another saved filter by using thesavedFilterclause.- Parameters:
searcher- the user performing the searchoverrideSecurity- false if we should check permissionssavedFilter- the saved filter to check if it holds a reference to the filter with the filterIdfilterId- the id of the filter to check if it can be referenced from the savedFilter, can be null. if null it takes the filter id from the savedFilter, thus checking if it can reference itself- Returns:
- true if the filter does contains a reference to the filter with filterId; false otherwise.
-