org.apache.jackrabbit.core.query
Class OnWorkspaceInconsistency

java.lang.Object
  extended by org.apache.jackrabbit.core.query.OnWorkspaceInconsistency

public abstract class OnWorkspaceInconsistency
extends Object

OnWorkspaceInconsistency defines an interface to handle workspace inconsistencies.


Field Summary
static OnWorkspaceInconsistency FAIL
          An handler that simply logs the path of the parent node and the name of the missing child node and then re-throws the exception.
protected static Map<String,OnWorkspaceInconsistency> INSTANCES
           
static OnWorkspaceInconsistency LOG
          An handler that simply logs the path of the parent node and the name of the missing child node
 
Constructor Summary
protected OnWorkspaceInconsistency(String name)
          Protected constructor.
 
Method Summary
static OnWorkspaceInconsistency fromString(String name)
          Returns the OnWorkspaceInconsistency with the given name.
 String getName()
           
abstract  void handleMissingChildNode(NoSuchItemStateException exception, QueryHandler handler, Path path, NodeState node, ChildNodeEntry child)
          Handle a missing child node state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAIL

public static final OnWorkspaceInconsistency FAIL
An handler that simply logs the path of the parent node and the name of the missing child node and then re-throws the exception.


LOG

public static final OnWorkspaceInconsistency LOG
An handler that simply logs the path of the parent node and the name of the missing child node


INSTANCES

protected static final Map<String,OnWorkspaceInconsistency> INSTANCES
Constructor Detail

OnWorkspaceInconsistency

protected OnWorkspaceInconsistency(String name)
Protected constructor.

Parameters:
name - a unique name for this handler.
Method Detail

getName

public String getName()
Returns:
the name of this OnWorkspaceInconsistency.

fromString

public static OnWorkspaceInconsistency fromString(String name)
                                           throws IllegalArgumentException
Returns the OnWorkspaceInconsistency with the given name.

Parameters:
name - the name of a OnWorkspaceInconsistency.
Returns:
the OnWorkspaceInconsistency with the given name.
Throws:
IllegalArgumentException - if name is not a well-known OnWorkspaceInconsistency name.

handleMissingChildNode

public abstract void handleMissingChildNode(NoSuchItemStateException exception,
                                            QueryHandler handler,
                                            Path path,
                                            NodeState node,
                                            ChildNodeEntry child)
                                     throws ItemStateException,
                                            RepositoryException
Handle a missing child node state.

Parameters:
exception - the exception that was thrown when the query handler tried to load the child node state.
handler - the query handler.
path - the path of the parent node.
node - the parent node state.
child - the child node entry, for which no node state could be found.
Throws:
ItemStateException - if an error occurs while handling the missing child node state. This may also be the passed exception instance.
RepositoryException - if another error occurs not related to item state reading.


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