org.apache.jackrabbit.core.query
Class QueryHandlerContext

java.lang.Object
  extended byorg.apache.jackrabbit.core.query.QueryHandlerContext

public class QueryHandlerContext
extends Object

Acts as an argument for the QueryHandler to keep the interface stable. This class provides access to the environment where the query handler is running in.


Constructor Summary
QueryHandlerContext(FileSystem fs, ItemStateManager stateMgr, NodeId rootId, NodeTypeRegistry ntRegistry, QueryHandler parentHandler, NodeId excludedNodeId)
          Creates a new context instance.
 
Method Summary
 void destroy()
          Destroys this context and releases resources.
 NodeId getExcludedNodeId()
          Returns the id of the node that should be excluded from indexing.
 FileSystem getFileSystem()
          Returns the FileSystem instance this QueryHandler may use to store its index.
 ItemStateManager getItemStateManager()
          Returns the persistent ItemStateManager of the workspace this QueryHandler is based on.
 NodeTypeRegistry getNodeTypeRegistry()
          Returns the NodeTypeRegistry for this repository.
 QueryHandler getParentHandler()
          Returns the parent query handler.
 PropertyTypeRegistry getPropertyTypeRegistry()
          Returns the PropertyTypeRegistry for this repository.
 NodeId getRootId()
          Returns the id of the root node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryHandlerContext

public QueryHandlerContext(FileSystem fs,
                           ItemStateManager stateMgr,
                           NodeId rootId,
                           NodeTypeRegistry ntRegistry,
                           QueryHandler parentHandler,
                           NodeId excludedNodeId)
Creates a new context instance.

Parameters:
fs - a FileSystem this QueryHandler may use to store its index. If no FileSystem has been configured fs is null.
stateMgr - provides persistent item states.
rootId - the id of the root node.
ntRegistry - the node type registry.
parentHandler - the parent query handler or null it there is no parent handler.
excludedNodeId - id of the node that should be excluded from indexing. Any descendant of that node is also excluded from indexing.
Method Detail

getItemStateManager

public ItemStateManager getItemStateManager()
Returns the persistent ItemStateManager of the workspace this QueryHandler is based on.

Returns:
the persistent ItemStateManager of the current workspace.

getFileSystem

public FileSystem getFileSystem()
Returns the FileSystem instance this QueryHandler may use to store its index. If no FileSystem has been configured this method returns null.

Returns:
the FileSystem instance for this QueryHandler.

getRootId

public NodeId getRootId()
Returns the id of the root node.

Returns:
the idof the root node.

getPropertyTypeRegistry

public PropertyTypeRegistry getPropertyTypeRegistry()
Returns the PropertyTypeRegistry for this repository.

Returns:
the PropertyTypeRegistry for this repository.

getNodeTypeRegistry

public NodeTypeRegistry getNodeTypeRegistry()
Returns the NodeTypeRegistry for this repository.

Returns:
the NodeTypeRegistry for this repository.

getParentHandler

public QueryHandler getParentHandler()
Returns the parent query handler.

Returns:
the parent query handler.

getExcludedNodeId

public NodeId getExcludedNodeId()
Returns the id of the node that should be excluded from indexing. Any descendant of this node is also excluded from indexing.

Returns:
the uuid of the exluded node.

destroy

public void destroy()
Destroys this context and releases resources.



Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.