Package org.apache.jackrabbit.core.query
Class QueryHandlerContext
- java.lang.Object
-
- org.apache.jackrabbit.core.query.QueryHandlerContext
-
public class QueryHandlerContext extends Object
Acts as an argument for theQueryHandler
to keep the interface stable. This class provides access to the environment where the query handler is running in.
-
-
Constructor Summary
Constructors Constructor Description QueryHandlerContext(String workspace, RepositoryContext repositoryContext, SharedItemStateManager stateMgr, PersistenceManager pm, NodeId rootId, QueryHandler parentHandler, NodeId excludedNodeId)
Creates a new context instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroys this context and releases resources.ClusterNode
getClusterNode()
Returns the cluster node instance of this repository, ornull
if clustering is not enabled.NodeId
getExcludedNodeId()
Returns the id of the node that should be excluded from indexing.ScheduledExecutorService
getExecutor()
Returns the background task executor.HierarchyManager
getHierarchyManager()
Returns the hierarchy manager on top of the item state manager of this query handler context.ItemStateManager
getItemStateManager()
Returns the persistentItemStateManager
of the workspace thisQueryHandler
is based on.NamespaceRegistryImpl
getNamespaceRegistry()
Returns the NamespaceRegistryImpl for this repository.NodeTypeRegistry
getNodeTypeRegistry()
Returns the NodeTypeRegistry for this repository.QueryHandler
getParentHandler()
Returns the parent query handler.PersistenceManager
getPersistenceManager()
PropertyTypeRegistry
getPropertyTypeRegistry()
Returns the PropertyTypeRegistry for this repository.NodeId
getRootId()
Returns the id of the root node.String
getWorkspace()
-
-
-
Constructor Detail
-
QueryHandlerContext
public QueryHandlerContext(String workspace, RepositoryContext repositoryContext, SharedItemStateManager stateMgr, PersistenceManager pm, NodeId rootId, QueryHandler parentHandler, NodeId excludedNodeId)
Creates a new context instance.- Parameters:
workspace
- the workspace name.repositoryContext
- the repository context.stateMgr
- provides persistent item states.pm
- the underlying persistence manager.rootId
- the id of the root node.parentHandler
- the parent query handler ornull
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 persistentItemStateManager
of the workspace thisQueryHandler
is based on.- Returns:
- the persistent
ItemStateManager
of the current workspace.
-
getHierarchyManager
public HierarchyManager getHierarchyManager()
Returns the hierarchy manager on top of the item state manager of this query handler context.- Returns:
- the hierarchy manager.
-
getPersistenceManager
public PersistenceManager getPersistenceManager()
- Returns:
- the underlying persistence manager.
-
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.
-
getNamespaceRegistry
public NamespaceRegistryImpl getNamespaceRegistry()
Returns the NamespaceRegistryImpl for this repository.- Returns:
- the NamespaceRegistryImpl 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 excluded node.
-
destroy
public void destroy()
Destroys this context and releases resources.
-
getExecutor
public ScheduledExecutorService getExecutor()
Returns the background task executor.- Returns:
- background task executor
-
getClusterNode
public ClusterNode getClusterNode()
Returns the cluster node instance of this repository, ornull
if clustering is not enabled.- Returns:
- cluster node
-
getWorkspace
public String getWorkspace()
-
-