Package org.jboss.dna.graph.request

Examples of org.jboss.dna.graph.request.ReadBranchRequest


            } else if (request instanceof ReadAllChildrenRequest) {
                ReadAllChildrenRequest read = (ReadAllChildrenRequest)request;
                DateTime expires = computeExpirationTime(read);
                getOrCreateNode(read.getActualLocationOfNode(), expires).setChildren(read.getChildren());
            } else if (request instanceof ReadBranchRequest) {
                ReadBranchRequest read = (ReadBranchRequest)request;
                DateTime expires = computeExpirationTime(read);
                for (Location location : read) {
                    BatchResultsNode node = getOrCreateNode(location, expires);
                    node.setProperties(read.getPropertiesFor(location));
                    node.setChildren(read.getChildren(location));
                }
            }
            for (Map.Entry<Path, BatchResultsNode> entry : nodes.entrySet()) {
                entry.getValue().freeze();
            }
View Full Code Here


    @Test
    public void shouldIncludeTimeLoadedInReadBranchRequests() {
        String workspaceName = graph.getCurrentWorkspaceName();
        // Don't use the graph so that we can obtain and interrogate the request ...
        CacheableRequest request = new ReadBranchRequest(location("/"), workspaceName, 2);
        execute(request);
        assertThat(request.getTimeLoaded(), is(notNullValue()));
    }
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.request.ReadBranchRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.