Examples of CassandraResourceResolver


Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceResolver

            LOGGER.info("Ignore err" + e.getMessage());
       }
    }

    private void getChildrenData(CassandraResourceProvider cassandraResourceProvider, String cf) {
        Resource resource = cassandraResourceProvider.getResource(new CassandraResourceResolver(), "/content/cassandra/" + cf + "/c1");
        Assert.assertNotNull(resource);
        Iterable<Resource> iterableChildren = resource.getChildren();
        Iterator<Resource> children = iterableChildren.iterator();
        boolean hasChild = false;
        while(children.hasNext()){
View Full Code Here

Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceResolver


    }

    private void readData(CassandraResourceProvider cassandraResourceProvider, String cf) {
        Resource resource = cassandraResourceProvider.getResource(new CassandraResourceResolver(), "/content/cassandra/" + cf + "/c1/c2");
        Assert.assertNotNull(resource);
    }
View Full Code Here

Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceResolver

            LOGGER.info("Ignore err" + e.getMessage());
       }
    }

    private void getChildrenData(CassandraResourceProvider cassandraResourceProvider, String cf) {
        Resource resource = cassandraResourceProvider.getResource(new CassandraResourceResolver(), "/content/cassandra/" + cf + "/c1");
        Assert.assertNotNull(resource);
        Iterator<Resource> children = resource.listChildren();
        boolean hasChild = false;
        while(children.hasNext()){
            Resource r = children.next();
View Full Code Here

Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceResolver

            for (int k = 0; k < sizes.length; k++) {
                CassandraResourceProvider cassandraResourceProvider = new CassandraResourceProvider();
                createColumnFamily(cfs[k], cassandraResourceProvider.getKeyspace(), new StringSerializer());
                cassandraResourceProvider.setColumnFamily(cfs[k]);
                CassandraResourceResolver resolver = new CassandraResourceResolver();
                for (int i = 0; i < sizes[k]; i++) {
                    String path = parentPath + cfs[k] + "/" + i;
                    Map<String, Object> map1 = new HashMap<String, Object>();
                    map1.put("metadata", "resolutionPathInfo=json");
                    map1.put("resourceType", "nt:cassandra0");
View Full Code Here

Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceResolver

            Map<String,Object> map1 = new HashMap<String, Object>();
            map1.put("metadata", "resolutionPathInfo=json");
            map1.put("resourceType", "nt:cassandra0");
            map1.put("resourceSuperType", "nt:supercass1");

            CassandraResourceResolver resolver =  new CassandraResourceResolver();
            cassandraResourceProvider.create(resolver,path1,map1);
            Assert.assertNull("Before Commiting Resource should be null", cassandraResourceProvider.getResource(resolver, path1));
            cassandraResourceProvider.commit(resolver);
            Assert.assertNotNull("Commited Resource cannot be null", cassandraResourceProvider.getResource(resolver, path1));
View Full Code Here

Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceResolver

            Map<String,Object> map1 = new HashMap<String, Object>();
            map1.put("metadata", "resolutionPathInfo=json");
            map1.put("resourceType", "nt:cassandra0");
            map1.put("resourceSuperType", "nt:supercass1");

            CassandraResourceResolver resolver =  new CassandraResourceResolver();
            cassandraResourceProvider.create(resolver,path1,map1);
            Assert.assertNull("Before Commiting resource should be null", cassandraResourceProvider.getResource(resolver, path1));
            cassandraResourceProvider.revert(resolver);
            Assert.assertNull("Reverted resource should be null", cassandraResourceProvider.getResource(resolver, path1));
View Full Code Here

Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceResolver


    }

    private void getParentData(CassandraResourceProvider cassandraResourceProvider, String cf) {
        Resource resource = cassandraResourceProvider.getResource(new CassandraResourceResolver(), "/content/cassandra/" + cf + "/c1/c2");
        Assert.assertNotNull(resource);
        Resource parent = resource.getParent();
        Assert.assertNotNull(parent);
        Assert.assertEquals("/content/cassandra/" + cf + "/c1",parent.getPath());
    }
View Full Code Here

Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceResolver

            Map<String,Object> map1 = new HashMap<String, Object>();
            map1.put("metadata", "resolutionPathInfo=json");
            map1.put("resourceType", "nt:cassandra0");
            map1.put("resourceSuperType", "nt:supercass1");

            CassandraResourceResolver resolver =  new CassandraResourceResolver();
            cassandraResourceProvider.create(resolver,path1,map1);
            Assert.assertNull("Before Commiting Resource should be null",cassandraResourceProvider.getResource(resolver,path1));
            cassandraResourceProvider.commit(resolver);
            Assert.assertNotNull("Commited Resource cannot be null",cassandraResourceProvider.getResource(resolver,path1));
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.