/** * {@inheritDoc} * * @see org.modeshape.graph.request.processor.RequestProcessor#process(org.modeshape.graph.request.ReadNodeRequest) */ @Override public void process( ReadNodeRequest request ) { WorkspaceType workspace = getWorkspace(request, request.inWorkspace()); NodeType node = getTargetNode(workspace, request, request.at()); if (node == null) { assert request.hasError(); return; } Location actualLocation = getActualLocation(workspace, request.at(), node); assert actualLocation != null; // Get the locations of the children ... List<Location> childLocations = txn.getChildrenLocations(workspace, node); request.addChildren(childLocations); // Get the properties of the node ... request.addProperty(propertyFactory.create(ModeShapeLexicon.UUID, node.getUuid())); request.addProperties(node.getProperties().values()); request.setActualLocationOfNode(actualLocation); setCacheableInfo(request); }
placeholderRequest.addProperties(placeholder.properties().values()); placeholderRequest.setActualLocationOfNode(placeholder.location()); federatedRequest.add(placeholderRequest, true, true, null);
/** * {@inheritDoc} * * @see org.modeshape.graph.request.processor.RequestProcessor#process(org.modeshape.graph.request.ReadNodeRequest) */ @Override public void process( ReadNodeRequest request ) { ReadNodeRequest source = (ReadNodeRequest)federatedRequest.getFirstProjectedRequest().getRequest(); if (checkErrorOrCancel(request, source)) return; request.setActualLocationOfNode(source.getActualLocationOfNode()); for (Location childInSource : source.getChildren()) { request.addChild(childInSource); } for (Property propertyInSource : source.getProperties()) { request.addProperties(propertyInSource); } request.setCachePolicy(getDefaultCachePolicy()); setCacheableInfo(request, source.getCachePolicy()); }
@Override public void process( ReadNodeRequest request ) { PathWorkspace workspace = getWorkspace(request, request.inWorkspace()); if (workspace == null) return; PathNode node = getTargetNode(workspace, request, request.at()); if (node == null) { request.setError(new PathNotFoundException(request.at(), workspace.getLowestExistingPath(request.at().getPath()))); return; } // Get the names of the children ... for (Path.Segment childSegment : node.getChildSegments()) { request.addChild(Location.create(pathFactory.create(node.getPath(), childSegment))); } // Get the properties of the node ... request.addProperties(node.getProperties().values()); request.setActualLocationOfNode(Location.create(node.getPath(), node.getUuid())); setCacheableInfo(request); }
if (firstRequest) { firstRequest = false; placeholderRequest.addProperties(placeholder.properties().values()); if (firstRequest) { firstRequest = false; placeholderRequest.addProperties(placeholder.properties().values());