}
@Override
public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
TransactionWorkspace workspace = getTransactionWorkspace(ctx);
Object result;
WorkspaceNode workspaceNode = fetchWorkspaceNode(ctx, command.getFqn(), workspace, false, false);
if (workspaceNode == null)
{
if (trace) log.trace("Unable to find node " + command.getFqn() + " in workspace.");
result = null;
}
else if (workspaceNode.isDeleted())
{
if (trace) log.trace("Attempted to retrieve node " + command.getFqn() + " but it has been deleted!");
result = null;
}
else
{
notifier.notifyNodeVisited(command.getFqn(), true, ctx);
workspace.addNode(workspaceNode);
notifier.notifyNodeVisited(command.getFqn(), false, ctx);
result = workspaceNode.getNode();
}
return result;
}