Examples of doWithSession()


Examples of org.apache.sling.ide.test.impl.helpers.RepositoryAccessor.doWithSession()

        // create server-side content
        RepositoryAccessor repo = new RepositoryAccessor(config);
        repo.tryDeleteResource("/content/test-root");
        repo.createNode("/content/test-root", "sling:Folder");
        repo.createFile("/content/test-root/file.txt", "hello, world".getBytes());
        repo.doWithSession(new SessionRunnable<Void>() {
            @Override
            public Void doWithSession(Session session) throws RepositoryException {

                ValueFactory valueFactory = session.getValueFactory();
               
View Full Code Here

Examples of org.apache.sling.ide.test.impl.helpers.RepositoryAccessor.doWithSession()

        deh.clearUnexpectedEventsAfterSettling();

        // create server-side content
        RepositoryAccessor repo = new RepositoryAccessor(config);
        repo.doWithSession(new SessionRunnable<Void>() {

            @Override
            public Void doWithSession(Session session) throws RepositoryException {
                Node configNode = session.getRootNode().addNode(
                        "content/test-root/org.apache.sling.example.Component.config", "sling:OsgiConfig");
View Full Code Here

Examples of org.apache.sling.ide.test.impl.helpers.RepositoryAccessor.doWithSession()

        deh.clearUnexpectedEventsAfterSettling();

        repo.createNode("/content/test-root/folder", "sling:Folder");
        repo.createNode("/content/test-root/folder/jcr:content", "nt:unstructured");
        repo.createFile("/content/test-root/folder/jcr:content/some_file.txt", "dummy contents".getBytes());
        repo.doWithSession(new SessionRunnable<Void>() {

            @Override
            public Void doWithSession(Session session) throws RepositoryException {
                session.getRootNode().getNode("content/test-root/folder/jcr:content/some_file.txt/jcr:content")
                        .setProperty("jcr:mimeType", "x-vendor-reserved");
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.