Examples of ResourceProxy


Examples of org.apache.sling.ide.transport.ResourceProxy

        // was rearranged under a covering parent aggregate
        if (resource.getType() == IResource.FOLDER) {
            IPath serializationFilePath = Path.fromOSString(serializationManager.getSerializationFilePath(
                    resourceLocation, SerializationKind.FOLDER));

            ResourceProxy coveringParentData = findSerializationDataFromCoveringParent(resource, syncDirectory,
                    resourceLocation, serializationFilePath);
            if (coveringParentData != null) {
                Activator
                        .getDefault()
                        .getPluginLogger()
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

        InputStream contents = null;
        try{
            contents = file.getContents();
            String resourceLocation = file.getFullPath().makeRelativeTo(contentSyncRoot.getFullPath())
                    .toPortableString();
            ResourceProxy resourceProxy = Activator.getDefault()
                    .getSerializationManager().readSerializationData(resourceLocation, contents);
           
            // resourceProxy could be containing a full tree
            // dive into the right position
            String rawValue = properties.getValue(propertyName);
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

            }
        } else {
            List<ResourceProxy> resourceProxyChildren = resourceProxy.getChildren();
            for (Iterator<ResourceProxy> it = resourceProxyChildren.iterator(); it
                    .hasNext();) {
                final ResourceProxy aChild = it.next();
                final Object p1 = doGetProperty(aChild, propertyName);
                if (p1!=null) {
                    return p1;
                }
            }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

                content.addNode(nodeName);
            }

            session.save();

            ResourceProxy resource = newResource("/content", "nt:unstructured");

            for (String resourceName : resourceNames) {
                resource.addChild(newResource("/content/" + resourceName, "nt:unstructured"));
            }

            ReorderChildNodesCommand cmd = new ReorderChildNodesCommand(repo, credentials, resource, logger);
            cmd.execute().get();
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

        assertThat("Incorrect node order", finalOrder, equalTo(expected));
    }

    private ResourceProxy newResource(String path, String primaryType) {

        ResourceProxy resource = new ResourceProxy(path);
        resource.addProperty("jcr:primaryType", primaryType);
        return resource;
    }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

    }

    @Test
    public void parseFullCoverageXmlFile() throws ParserConfigurationException, SAXException, IOException {

        ResourceProxy root = parseContentXmlFile("full-coverage.xml", "/apps/full-coverage");

        assertThat("full-coverage path", root.getPath(), is("/apps/full-coverage"));
        assertThat("full-coverage properties.size", root.getProperties().size(), is(3));
        assertThat("full-coverage properties[jcr:title]", root.getProperties(),
                hasEntry("jcr:title", (Object) "Full coverage parent"));
        assertThat("full-coverage children.size", root.getChildren().size(), is(2));

        ResourceProxy parent1 = root.getChildren().get(0);
        assertThat("parent-1 path", parent1.getPath(), is("/apps/full-coverage/parent-1"));
        assertThat("parent-1 properties[jcr:title]", parent1.getProperties(),
                hasEntry("jcr:title", (Object) "Parent 1"));
        assertThat("parent-1 children.size", parent1.getChildren().size(), is(2));

        ResourceProxy child11 = parent1.getChildren().get(0);
        assertThat("child-1-1 path", child11.getPath(), is("/apps/full-coverage/parent-1/child-1-1"));
        assertThat("child-1-1 properties[jcr:title]", child11.getProperties(),
                hasEntry("jcr:title", (Object) "Child 1-1"));

    }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

    }

    @Test
    public void parseRootContentXml() throws ParserConfigurationException, SAXException, IOException {

        ResourceProxy root = parseContentXmlFile("root-content.xml", "/");

        assertThat("root contains /jcr:system", root.getChildren(), hasChildPath("/jcr:system"));
    }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

    }

    @Test
    public void encodedChildContentXml() throws ParserConfigurationException, SAXException, IOException {

        ResourceProxy root = parseContentXmlFile("encoded-child-content.xml", "/ROOT");

        assertThat("/ROOT contains /_jcr_content", root.getChildren(), hasChildPath("/ROOT/_jcr_content"));
    }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

    }

    @Test
    public void parseContentXmlWithEscapedNames() throws ParserConfigurationException, SAXException, IOException {

        ResourceProxy root = parseContentXmlFile("full-coverage-escaped-names.xml", "/");
        assertThat("node contains /50-50", root.getChildren(), hasChildPath("/50-50"));
    }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

    }

    @Test
    public void parseContentXmlWithBinaryProperty() throws ParserConfigurationException, SAXException, IOException {

        ResourceProxy root = parseContentXmlFile("binary-property.xml", "/");

        assertThat("root has 1 property, binary property is ignored", root.getProperties().entrySet(), hasSize(1));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.