/** * {@inheritDoc} * * @see org.modeshape.graph.request.processor.RequestProcessor#process(org.modeshape.graph.request.VerifyNodeExistsRequest) */ @Override public void process( VerifyNodeExistsRequest request ) { WorkspaceType original = getWorkspace(request, request.inWorkspace()); if (original != null) { try { Location actualLoation = txn.verifyNodeExists(original, request.at()); request.setActualLocationOfNode(actualLoation); } catch (RuntimeException e) { request.setError(e); } } }
/** * Process a request to verify that a node exists at the supplied location. * <p> * This method does nothing if the request is null. Unless overridden, this method converts the request that * {@link ReadAllPropertiesRequest reads the node} and uses the result to determine if the node exists. * </p> * * @param request the read request */ public void process( VerifyNodeExistsRequest request ) { if (request == null) return; ReadAllPropertiesRequest readNode = new ReadAllPropertiesRequest(request.at(), request.inWorkspace()); process(readNode); if (readNode.hasError()) { request.setError(readNode.getError()); return; } // Set the actual location ... request.setActualLocationOfNode(readNode.getActualLocationOfNode()); setCacheableInfo(request); }