Class Filter

java.lang.Object
com.adobe.granite.taskmanagement.Filter

public class Filter extends Object
used to specify searching constraints for TaskManagement queries. see TaskManager.getTasks(Filter, int, int)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct an empty Filter
    Filter(String... taskTypes)
    Construct a Filter object with null conditions and the specified taskTypes
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCondition(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.
    Gets the task type names associated with this filter
    boolean
    indicates if the tasks will be returned in a flattened format
    boolean
    indicates if task structure is being returned
    void
    setParentTaskId(String parentTaskId)
    Specify the parent task Id for this filter.
    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.
    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
    void
    setTaskTypes(String... taskTypes)
    Sets the taskTypes to be returned by a query

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Filter

      public Filter()
      Construct an empty Filter
    • Filter

      public Filter(String... taskTypes)
      Construct a Filter object with null conditions and the specified taskTypes
      Parameters:
      taskTypes - the taskTypes for this filter
  • Method Details

    • setTaskTypes

      public void setTaskTypes(String... taskTypes)
      Sets the taskTypes to be returned by a query
      Parameters:
      taskTypes - task type names specified for this filter
    • getTaskTypes

      public String[] 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

      public void addCondition(Condition... condition)
      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

      public Iterator<Condition> 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

      public void setParentTaskId(String parentTaskId)
      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

      public String 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.