Package com.adobe.granite.taskmanagement
Class Filter
java.lang.Object
com.adobe.granite.taskmanagement.Filter
used to specify searching constraints for TaskManagement queries. see
TaskManager.getTasks(Filter, int, int)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCondition(Condition... condition) Set the List of Condition objects associated with this filter.Returns a List of Condition objects associated with this filter.Return the parent task Id specified for this filter.String[]Gets the task type names associated with this filterbooleanindicates if the tasks will be returned in a flattened formatbooleanindicates if task structure is being returnedvoidsetParentTaskId(String parentTaskId) Specify the parent task Id for this filter.voidsetReturnFlatStructure(boolean returnFlatStructure) If true the search will recurse the subtasks to return all tasks matching this filter, false will only check the level specified by the parentTaskid.voidsetReturnTaskStructure(boolean returnTaskStructure) if true child tasks are returned as a structure under a parent task Consider only using #setReturnFlatStructure(true) or #setReturnTaskStructure(true), not bothvoidsetTaskTypes(String... taskTypes) Sets the taskTypes to be returned by a query
-
Constructor Details
-
Filter
public Filter()Construct an empty Filter -
Filter
Construct a Filter object with null conditions and the specified taskTypes- Parameters:
taskTypes- the taskTypes for this filter
-
-
Method Details
-
setTaskTypes
Sets the taskTypes to be returned by a query- Parameters:
taskTypes- task type names specified for this filter
-
getTaskTypes
Gets the task type names associated with this filter- Returns:
- A String[] representing the task type name or null if no task type name has been set
-
addCondition
Set the List of Condition objects associated with this filter. The List must be set before using the filter.- Parameters:
condition- conditions to add to this filter
-
getConditions
Returns a List of Condition objects associated with this filter.- Returns:
- A List of Condition objects or null if no conditions have been set.
-
setParentTaskId
Specify the parent task Id for this filter.- Parameters:
parentTaskId- the id of the task at which we want to start searching for tasks.
-
getParentTaskId
Return the parent task Id specified for this filter.- Returns:
- the parent task Id specified for this filter
-
setReturnFlatStructure
public void setReturnFlatStructure(boolean returnFlatStructure) If true the search will recurse the subtasks to return all tasks matching this filter, false will only check the level specified by the parentTaskid. The tasks will be returned in a flat structure, not in the parent/child structure.
Consider only using #setReturnFlatStructure(true) or #setReturnTaskStructure(true), not both- Parameters:
returnFlatStructure- indicates to return all tasks regardless of where they fall in the structure
-
isReturnFlatStructure
public boolean isReturnFlatStructure()indicates if the tasks will be returned in a flattened format- Returns:
- true if tasks are to be returned flattened
-
setReturnTaskStructure
public void setReturnTaskStructure(boolean returnTaskStructure) if true child tasks are returned as a structure under a parent task Consider only using #setReturnFlatStructure(true) or #setReturnTaskStructure(true), not both- Parameters:
returnTaskStructure- indicates to return tasks in their parent/child structure
-
isReturnTaskStructure
public boolean isReturnTaskStructure()indicates if task structure is being returned- Returns:
- true if the task structure is being returned.
-