Package org.apache.jackrabbit.core.query
Class OnWorkspaceInconsistency
- java.lang.Object
- 
- org.apache.jackrabbit.core.query.OnWorkspaceInconsistency
 
- 
 public abstract class OnWorkspaceInconsistency extends Object OnWorkspaceInconsistencydefines an interface to handle workspace inconsistencies.
- 
- 
Field SummaryFields Modifier and Type Field Description static OnWorkspaceInconsistencyFAILAn 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>INSTANCESstatic OnWorkspaceInconsistencyLOGAn handler that simply logs the path of the parent node and the name of the missing child node
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedOnWorkspaceInconsistency(String name)Protected constructor.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static OnWorkspaceInconsistencyfromString(String name)Returns theOnWorkspaceInconsistencywith the givenname.StringgetName()abstract voidhandleMissingChildNode(NoSuchItemStateException exception, QueryHandler handler, Path path, NodeState node, ChildNodeEntry child)Handle a missing child node state.voidlogError(ItemStateException exception, QueryHandler handler, Path path, NodeState node, ChildNodeEntry child)Logs a generic workspace inconsistency error.
 
- 
- 
- 
Field Detail- 
FAILpublic 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.
 - 
LOGpublic static final OnWorkspaceInconsistency LOG An handler that simply logs the path of the parent node and the name of the missing child node
 - 
INSTANCESprotected static final Map<String,OnWorkspaceInconsistency> INSTANCES 
 
- 
 - 
Constructor Detail- 
OnWorkspaceInconsistencyprotected OnWorkspaceInconsistency(String name) Protected constructor.- Parameters:
- name- a unique name for this handler.
 
 
- 
 - 
Method Detail- 
getNamepublic String getName() - Returns:
- the name of this OnWorkspaceInconsistency.
 
 - 
fromStringpublic static OnWorkspaceInconsistency fromString(String name) throws IllegalArgumentException Returns theOnWorkspaceInconsistencywith the givenname.- Parameters:
- name- the name of a- OnWorkspaceInconsistency.
- Returns:
- the OnWorkspaceInconsistencywith the givenname.
- Throws:
- IllegalArgumentException- if- nameis not a well-known- OnWorkspaceInconsistencyname.
 
 - 
handleMissingChildNodepublic 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- exceptioninstance.
- RepositoryException- if another error occurs not related to item state reading.
 
 - 
logErrorpublic void logError(ItemStateException exception, QueryHandler handler, Path path, NodeState node, ChildNodeEntry child) throws RepositoryException Logs a generic workspace inconsistency error.- Parameters:
- exception- the exception that was thrown when working on the workspace
- 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:
- RepositoryException- if another error occurs not related to item state reading.
 
 
- 
 
-