public void buildChildren()

in src/main/java/org/apache/sling/pipes/internal/ReferencePipe.java [51:72]


    public void buildChildren() {
        String expression = getExpr();
        if (StringUtils.isNotBlank(expression) && !expression.equals(referencePath)) {
            referencePath = expression;
            Resource pipeResource = resolver.getResource(referencePath);
            if (pipeResource == null) {
                pipeResource = plumber.getReferencedResource(resource, referencePath);
            }
            if (pipeResource == null) {
                throw new IllegalArgumentException("Reference configuration error: There is no resource at " + referencePath);
            }
            reference = plumber.getPipe(pipeResource, bindings);
            if (reference == null) {
                throw new IllegalArgumentException("Unable to build out pipe out of " + referencePath);
            }
            reference.setParent(this);
            log.info("sets reference to {}", reference);

            subpipes.clear();
            subpipes.add(reference);
        }
    }