Package wt.navigation

Interface NavigationUnit

All Superinterfaces:
Serializable

public interface NavigationUnit extends Serializable
A NavigationUnit denotes a traversal from a start node to an end node. Depending upon how the traversal was performed, a NavigationUnit may optionally contain the objects that relate the two nodes such as links, uses occurrences and path occurrences. In order to support filtering, a NavigationUnit also records the FilteredStatus of every element that it contains.

Supported API: true

Extendable: false
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addTag(Object element, wt.navigation.NavigationTag tag)
    Adds the given navigation tag to specified element provided it does not already have the same tag.
    <T> Set<T>
    getChildrn(Object parent, Class<T> type, boolean includeSubTypes)
    Returns all elements of this navigation unit of the specified type that were derived from the given element (its children).
    <T> Set<T>
    getChildrn(Object parent, Class<T> type, boolean includeSubTypes, FilteredStatus statusThreshold)
    Returns all elements of this navigation unit of the specified type that were derived from the given element (its children) and whose filtered status exceeds the given threshold.
    <T> Set<T>
    getElements(Class<T> type, boolean includeSubTypes)
    Returns all elements of this navigation unit of the specified type.
    <T> Set<T>
    getElements(Class<T> type, boolean includeSubTypes, FilteredStatus statusThreshold)
    Returns all elements of this navigation unit of the specified type whose filtered status exceeds the given threshold.
    Returns the object where the navigation ended.
    Returns the filtered status of the given element.
    wt.navigation.FilteredStatusDetails
    Returns the filtered status details of the given element.
    <T> Set<T>
    getParnts(Object child, Class<T> type, boolean includeSubTypes)
    Returns all elements of this navigation unit of the specified type that the given element was derived from (its parents).
    <T> Set<T>
    getParnts(Object child, Class<T> type, boolean includeSubTypes, FilteredStatus statusThreshold)
    Returns all elements of this navigation unit of the specified type that the given element was derived from (its parents) and whose filtered status exceeds the given threshold.
    Returns the object where the navigation began.
    <T extends wt.navigation.NavigationTag>
    Set<T>
    getTags(Object element, Class<T> type, boolean includeSubTypes)
    Returns all navigation tags of the specified type associated with the given element.
    default Set<Object>
    Returns all the nodes that has filter status set to DESCENDENT_DRIVEN.
    boolean
    Returns true or false depending upon whether this navigation unit contains elements that were derived from the given element (its children).
    boolean
    hasParents(Object element)
    Returns true or false depending upon whether this navigation unit contains elements that the given element was derived from (its parents).
    boolean
    hasTags(Object element)
    Returns true or false depending upon whether the given element has any navigation tags associated to it.
    boolean
    Returns true or false depending upon whether or not the given element is marked as filtered.
    boolean
    Returns true or false depending upon whether or not the given element is marked as retain.
    boolean
    Returns true or false depending upon whether or not the given element is marked as traverse.
    boolean
    Returns true or false depending upon whether the filtered status of the given element can be updated to the specified filtered status.
    boolean
    removeTag(Object element, wt.navigation.NavigationTag tag)
    Removes the given navigation tag from the specified element.
    boolean
    setFilteredStatus(Object element, FilteredStatus status, wt.navigation.FilteredStatusDetails details)
    Sets the filtered status on the given element to the specified filtered status provided the specified filtered status has a higher precedence than its current filtered status.
  • Method Details

    • getStartNode

      Persistable getStartNode()
      Returns the object where the navigation began.
      Returns:
      Persistable - object where the navigation began.

      Supported API: true
    • getEndNode

      Persistable getEndNode()
      Returns the object where the navigation ended.
      Returns:
      Persistable - The object where the navigation ended.

      Supported API: true
    • hasChildren

      boolean hasChildren(Object element)
      Returns true or false depending upon whether this navigation unit contains elements that were derived from the given element (its children).
      Parameters:
      element - The object wanted to check whether the child is present or not.
      Returns:
      True or false depending upon whether this navigation unit contains elements that were derived from the given element (its children).

      Supported API: true
    • hasParents

      boolean hasParents(Object element)
      Returns true or false depending upon whether this navigation unit contains elements that the given element was derived from (its parents).
      Parameters:
      element - The object wanted to check whether the parent is present or not.
      Returns:
      True or false depending upon whether this navigation unit contains elements.

      Supported API: true
    • getElements

      <T> Set<T> getElements(Class<T> type, boolean includeSubTypes)
      Returns all elements of this navigation unit of the specified type.
      Parameters:
      type - Type of Element.
      includeSubTypes - Wants to add a sub-type: Yes (true) or No (false).
      Returns:
      All elements of this navigation unit of the specified type.

      Supported API: true
    • getElements

      <T> Set<T> getElements(Class<T> type, boolean includeSubTypes, FilteredStatus statusThreshold)
      Returns all elements of this navigation unit of the specified type whose filtered status exceeds the given threshold.
      Parameters:
      type - Type of Element.
      includeSubTypes - Wants to add a sub-type: Yes (true) or No (false).
      statusThreshold - Status of Threshold.
      Returns:
      All elements of this navigation unit of the specified type whose filtered status exceeds the given threshold.

      Supported API: true
    • getParnts

      <T> Set<T> getParnts(Object child, Class<T> type, boolean includeSubTypes)
      Returns all elements of this navigation unit of the specified type that the given element was derived from (its parents).
      Parameters:
      child - Wants to find the parent for the child.
      type - Type of Element.
      includeSubTypes - Wants to add a sub-type: Yes (true) or No (false).
      Returns:
      Returns all elements of this navigation unit of the specified type that the given element was derived from (its parents).

      Supported API: true
    • getParnts

      <T> Set<T> getParnts(Object child, Class<T> type, boolean includeSubTypes, FilteredStatus statusThreshold)
      Returns all elements of this navigation unit of the specified type that the given element was derived from (its parents) and whose filtered status exceeds the given threshold.
      Parameters:
      child - Wants to find the parent for the child.
      type - Type of child.
      includeSubTypes - Wants to add a sub-type: Yes (true) or No (false).
      statusThreshold - Status of Threshold.
      Returns:
      All elements of this navigation unit of the specified type that the given element was derived from (its parents) and whose filtered status exceeds the given threshold.

      Supported API: true
    • getChildrn

      <T> Set<T> getChildrn(Object parent, Class<T> type, boolean includeSubTypes)
      Returns all elements of this navigation unit of the specified type that were derived from the given element (its children).
      Parameters:
      parent - Wants to find the child for the parent.
      type - Type of parent.
      includeSubTypes - Wants to add a sub-type: Yes (true) or No (false).
      Returns:
      All elements of this navigation unit of the specified type that were derived from the given element (its children).

      Supported API: true
    • getChildrn

      <T> Set<T> getChildrn(Object parent, Class<T> type, boolean includeSubTypes, FilteredStatus statusThreshold)
      Returns all elements of this navigation unit of the specified type that were derived from the given element (its children) and whose filtered status exceeds the given threshold.
      Parameters:
      parent - Wants to find the child for the parent.
      type - Type of parent.
      includeSubTypes - Wants to add a sub-type: Yes (true) or No (false).
      statusThreshold - Status of Threshold.
      Returns:
      Returns all elements of this navigation unit of the specified type that were derived from the given element (its children) and whose filtered status exceeds the given threshold.

      Supported API: true
    • setFilteredStatus

      boolean setFilteredStatus(Object element, FilteredStatus status, wt.navigation.FilteredStatusDetails details)
      Sets the filtered status on the given element to the specified filtered status provided the specified filtered status has a higher precedence than its current filtered status.
      Parameters:
      element - Element for which Filtered Status associated.
      status - Status of filter type.
      details - Filtered status details.
      Returns:
      Sets the filtered status on the given element to the specified filtered status provided the specified filtered status has a higher precedence than its current filtered status.

      Supported API: true
    • isUpdateAllowed

      boolean isUpdateAllowed(Object element, FilteredStatus status)
      Returns true or false depending upon whether the filtered status of the given element can be updated to the specified filtered status. In order to update the filtered status on an element, the given filtered status must have a higher precedence than its current filtered status.
      Parameters:
      element - Wants to check if updating is allowed for the element.
      status - Status of filter.
      Returns:
      Returns true or false depending upon whether the filtered status.

      Supported API: true
    • getFilteredStatus

      FilteredStatus getFilteredStatus(Object element)
      Returns the filtered status of the given element.
      Parameters:
      element - Wants to find the filter status for the element.
      Returns:
      Returns the filtered status of the given element.

      Supported API: true
    • getFilteredStatusDetails

      wt.navigation.FilteredStatusDetails getFilteredStatusDetails(Object element)
      Returns the filtered status details of the given element.
      Parameters:
      element - Wants to find the filter status details for the element.
      Returns:
      Returns the filtered status details of the given element.

      Supported API: true
    • isMarkedAsRetain

      boolean isMarkedAsRetain(Object element)
      Returns true or false depending upon whether or not the given element is marked as retain. This method will return true if the filtered status is NOT_FILTERED, FILTERED_RETAIN or FILTERED_RETAIN_TRAVERSE.
      Parameters:
      element - The element for which wants to check if it's marked as retain.
      Returns:
      Returns true or false depending upon whether or not the given element is marked as retain.

      Supported API: true
    • isMarkedAsTraverse

      boolean isMarkedAsTraverse(Object element)
      Returns true or false depending upon whether or not the given element is marked as traverse. This method will return true if the filtered status is NOT_FILTERED or FILTERED_RETAIN_TRAVERSE.
      Parameters:
      element - The element for which wants to check if it's marked as Traverse.
      Returns:
      Returns true or false depending upon whether or not the given element is marked as Traverse.

      Supported API: true
    • isMarkedAsFiltered

      boolean isMarkedAsFiltered(Object element)
      Returns true or false depending upon whether or not the given element is marked as filtered. This method will return true if the filtered status is FILTERED, FILTERED_RETAIN or FILTERED_RETAIN_TRAVERSE.
      Parameters:
      element - The element for which wants to check if it's marked as FILTERED.
      Returns:
      Returns true or false depending upon whether or not the given element is marked as FILTERED.

      Supported API: true
    • hasTags

      boolean hasTags(Object element)
      Returns true or false depending upon whether the given element has any navigation tags associated to it.
      Parameters:
      element - Element for which wanted find tag.
      Returns:
      Returns true or false depending upon whether the given element has any navigation tags associated to it.

      Supported API: true
    • getTags

      <T extends wt.navigation.NavigationTag> Set<T> getTags(Object element, Class<T> type, boolean includeSubTypes)
      Returns all navigation tags of the specified type associated with the given element.
      Parameters:
      element - Element for which wanted find tags.
      type - Type of element.
      includeSubTypes - Wants to add a sub-type: Yes (true) or No (false).
      Returns:
      Returns all navigation tags of the specified type associated with the given element.

      Supported API: true
    • addTag

      boolean addTag(Object element, wt.navigation.NavigationTag tag)
      Adds the given navigation tag to specified element provided it does not already have the same tag. (Duplicate tags are not allowed.)
      Parameters:
      element - Element for which wants to add tag.
      tag - Tag which wants to add with element.
      Returns:
      True or false depending upon whether or not the navigation tag was successfully added.

      Supported API: true
    • removeTag

      boolean removeTag(Object element, wt.navigation.NavigationTag tag)
      Removes the given navigation tag from the specified element.
      Parameters:
      element - Element for which wants to add tag.
      tag - Tag which wants to remove.
      Returns:
      True or false depending upon whether or not the navigation tag was successfully removed.

      Supported API: true
    • getUnresolvedNodes

      default Set<Object> getUnresolvedNodes()
      Returns all the nodes that has filter status set to DESCENDENT_DRIVEN.
      Returns:
      Returns all the nodes that has filter status set to DESCENDENT_DRIVEN (Default:NULL).

      Supported API: true