public abstract class OnWorkspaceInconsistency extends Object
OnWorkspaceInconsistency
defines an interface to handle
workspace inconsistencies.Modifier and Type | Field and Description |
---|---|
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
|
Modifier | Constructor and Description |
---|---|
protected |
OnWorkspaceInconsistency(String name)
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
logError(ItemStateException exception,
QueryHandler handler,
Path path,
NodeState node,
ChildNodeEntry child)
Logs a generic workspace inconsistency error.
|
public static final OnWorkspaceInconsistency FAIL
public static final OnWorkspaceInconsistency LOG
protected static final Map<String,OnWorkspaceInconsistency> INSTANCES
protected OnWorkspaceInconsistency(String name)
name
- a unique name for this handler.public String getName()
OnWorkspaceInconsistency
.public static OnWorkspaceInconsistency fromString(String name) throws IllegalArgumentException
OnWorkspaceInconsistency
with the given
name
.name
- the name of a OnWorkspaceInconsistency
.OnWorkspaceInconsistency
with the given
name
.IllegalArgumentException
- if name
is not a well-known
OnWorkspaceInconsistency
name.public abstract void handleMissingChildNode(NoSuchItemStateException exception, QueryHandler handler, Path path, NodeState node, ChildNodeEntry child) throws ItemStateException, javax.jcr.RepositoryException
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.ItemStateException
- if an error occurs while handling the missing
child node state. This may also be the passed
exception
instance.javax.jcr.RepositoryException
- if another error occurs not related to item
state reading.public void logError(ItemStateException exception, QueryHandler handler, Path path, NodeState node, ChildNodeEntry child) throws javax.jcr.RepositoryException
exception
- the exception that was thrown when working on the workspacehandler
- 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.javax.jcr.RepositoryException
- if another error occurs not related to item
state reading.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.