Package org.apache.sling.api.resource

Examples of org.apache.sling.api.resource.ModifiableValueMap.keySet()


            // around a potential issue with jackrabbit in a clustered environment
            resourceResolver.revert();
            resourceResolver.refresh();

            final ModifiableValueMap myInstanceMap = myInstance.adaptTo(ModifiableValueMap.class);
            final Set<String> keys = new HashSet<String>(myInstanceMap.keySet());
            for(final String key : keys) {
                if (newProps.containsKey(key)) {
                    // perfect
                    continue;
                } else if (key.indexOf(":")!=-1) {
View Full Code Here


    }

    static void assertLayer(Resource root, List<String> types, int depth) {
        for (Resource child : root.getChildren()) {
            final ModifiableValueMap m = child.adaptTo(ModifiableValueMap.class);
            if (m.keySet().contains(MessageStoreImplRepositoryTest.TEST_RT_KEY)) {
                String type = m.get(MessageStoreImplRepositoryTest.TEST_RT_KEY, String.class);
                assertEquals(String.format("Expecting %s to have %s type", child.getPath(), types.get(depth)), types.get(depth), type);
            }
            if (child.getChildren().iterator().hasNext()) {
                assertLayer(child, types, depth+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.