org.outerj.daisy.navigation.impl
Class QueryNode

java.lang.Object
  extended by org.outerj.daisy.navigation.impl.AbstractParentNode
      extended by org.outerj.daisy.navigation.impl.QueryNode
All Implemented Interfaces:
Node

public class QueryNode
extends AbstractParentNode

A query node is a special node which doesn't really exist in the result tree but is instead replaced with the result of executing a query.


Field Summary
 
Fields inherited from class org.outerj.daisy.navigation.impl.AbstractParentNode
children
 
Fields inherited from interface org.outerj.daisy.navigation.impl.Node
NAVIGATION_NS
 
Constructor Summary
QueryNode(java.lang.String query, java.lang.String extraCond, NodeVisibility nodeVisibility, CommonNavigationManager.Context context, long navigationBranchId, long navigationLanguageId, org.outerj.daisy.navigation.NavigationVersionMode versionMode)
           
 
Method Summary
 boolean checkId(java.lang.String id, long branchId, long languageId)
          Returns true if the id of this node equals the specified id.
 java.util.List getExpandedChildList()
          Returns a list of the child nodes for which the nodes for which Node.isExpandable() returns true are not included, but instead replaced by their children (recursively).
 boolean isExpandable()
          Returns true for expandable nodes, these are nodes which themselves are not a part of the generated navigation tree, but are replaced by one or more other nodes.
 boolean isIdentifiable()
          Returns true if this node has an ID and will generate a corresponding node in the output tree.
 boolean isVisible(long userId, long[] roleId, Node[] activeNodePath, int activeNodePathPos)
          Returns true if this node or any of its chilren would produce a visible node in the generated navigation tree.
 void searchPath(java.lang.String[] path, int pos, long branchId, long languageId, Node[] foundPath)
           
 
Methods inherited from class org.outerj.daisy.navigation.impl.AbstractParentNode
add, generateXml, generateXml, generateXml, generateXml, getId, populateNodeLookupMap, searchDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryNode

public QueryNode(java.lang.String query,
                 java.lang.String extraCond,
                 NodeVisibility nodeVisibility,
                 CommonNavigationManager.Context context,
                 long navigationBranchId,
                 long navigationLanguageId,
                 org.outerj.daisy.navigation.NavigationVersionMode versionMode)
Method Detail

searchPath

public void searchPath(java.lang.String[] path,
                       int pos,
                       long branchId,
                       long languageId,
                       Node[] foundPath)
                throws org.outerj.daisy.repository.RepositoryException
Specified by:
searchPath in interface Node
Overrides:
searchPath in class AbstractParentNode
Parameters:
path - the path we're looking for, each array element contains an id
pos - the current position in the array
foundPath - as the corresponding path nodes are found, they should be assigned
Throws:
org.outerj.daisy.repository.RepositoryException

getExpandedChildList

public java.util.List getExpandedChildList()
                                    throws org.outerj.daisy.repository.RepositoryException
Description copied from interface: Node
Returns a list of the child nodes for which the nodes for which Node.isExpandable() returns true are not included, but instead replaced by their children (recursively). This includes both visible and non-visible nodes.

Specified by:
getExpandedChildList in interface Node
Overrides:
getExpandedChildList in class AbstractParentNode
Throws:
org.outerj.daisy.repository.RepositoryException

isVisible

public boolean isVisible(long userId,
                         long[] roleId,
                         Node[] activeNodePath,
                         int activeNodePathPos)
                  throws org.outerj.daisy.repository.RepositoryException
Description copied from interface: Node
Returns true if this node or any of its chilren would produce a visible node in the generated navigation tree.

activeNodePath - this parameter can be null (if there is not active node path)
Throws:
org.outerj.daisy.repository.RepositoryException

checkId

public boolean checkId(java.lang.String id,
                       long branchId,
                       long languageId)
Description copied from interface: Node
Returns true if the id of this node equals the specified id.


isExpandable

public boolean isExpandable()
Description copied from interface: Node
Returns true for expandable nodes, these are nodes which themselves are not a part of the generated navigation tree, but are replaced by one or more other nodes.


isIdentifiable

public boolean isIdentifiable()
Description copied from interface: Node
Returns true if this node has an ID and will generate a corresponding node in the output tree.



Copyright © -2012 . All Rights Reserved.