Package org.apache.sling.cassandra.resource.provider

Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceProvider.create()


                    String path = parentPath + cfs[k] + "/" + i;
                    Map<String, Object> map1 = new HashMap<String, Object>();
                    map1.put("metadata", "resolutionPathInfo=json");
                    map1.put("resourceType", "nt:cassandra0");
                    map1.put("resourceSuperType", "nt:supercass1");
                    cassandraResourceProvider.create(resolver, path, map1);
                    cassandraResourceProvider.commit(resolver);
                    System.out.println(">>" + path);
                }
            }
        } catch (Exception e) {
View Full Code Here


            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));

            cassandraResourceProvider.delete(resolver,path1);
View Full Code Here

            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));

        } catch (Exception e) {
View Full Code Here

            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));

        } catch (Exception e) {
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.