Search in sources :

Example 1 with AbstractNode

use of org.apache.jackrabbit.commons.AbstractNode in project acs-aem-commons by Adobe-Consulting-Services.

the class RootNodeMockFactory method generateEntryNodes.

private NodeIterator generateEntryNodes(final Node parentNode) throws RepositoryException, IOException {
    int totalNodeCount = settings.entryNodeCount + settings.expiredEntryNodeCount;
    final Node[] nodes = new AbstractNode[totalNodeCount];
    int i = 0;
    for (; i < settings.entryNodeCount; i++) {
        final Node randomNode = mockEntryNode(parentNode, i, false);
        nodes[i] = randomNode;
    }
    for (; i < totalNodeCount; i++) {
        final Node randomNode = mockEntryNode(parentNode, i, true);
        nodes[i] = randomNode;
    }
    return new MockNodeIterator(nodes);
}
Also used : MockNodeIterator(org.apache.sling.commons.testing.jcr.MockNodeIterator) AbstractNode(org.apache.jackrabbit.commons.AbstractNode) AbstractNode(org.apache.jackrabbit.commons.AbstractNode) Node(javax.jcr.Node)

Aggregations

Node (javax.jcr.Node)1 AbstractNode (org.apache.jackrabbit.commons.AbstractNode)1 MockNodeIterator (org.apache.sling.commons.testing.jcr.MockNodeIterator)1