Examples of orderBefore()


Examples of org.apache.jackrabbit.oak.api.Tree.orderBefore()

    @Test
    public void testOrderBeforeOnHiddenTree() {
        try {
            Tree hidden = parent.getChild(hiddenName);
            hidden.orderBefore("someother");
            fail("IllegalStateException expected");
        } catch (IllegalStateException e) {
            // success
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.AbstractAccessControlList.orderBefore()

        List<? extends JackrabbitAccessControlEntry> entries = acl.getEntries();
        assertEquals(3, entries.size());

        AccessControlEntry first = entries.get(0);
        acl.orderBefore(first, null);

        List<? extends JackrabbitAccessControlEntry> entriesAfter = acl.getEntries();
        assertEquals(first, entriesAfter.get(2));
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.AbstractAccessControlList.orderBefore()

        AccessControlEntry first = entries[0];
        AccessControlEntry second = entries[1];
        AccessControlEntry third = entries[2];

        // reorder 'second' to the first position
        acl.orderBefore(second, first);
        assertEquals(second, acl.getEntries().get(0));
        assertEquals(first, acl.getEntries().get(1));
        assertEquals(third, acl.getEntries().get(2));

        // reorder 'third' before 'first'
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.AbstractAccessControlList.orderBefore()

        assertEquals(second, acl.getEntries().get(0));
        assertEquals(first, acl.getEntries().get(1));
        assertEquals(third, acl.getEntries().get(2));

        // reorder 'third' before 'first'
        acl.orderBefore(third, first);
        assertEquals(second, acl.getEntries().get(0));
        assertEquals(third, acl.getEntries().get(1));
        assertEquals(first, acl.getEntries().get(2));
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AbstractAccessControlList.orderBefore()

        List<? extends JackrabbitAccessControlEntry> entries = acl.getEntries();
        assertEquals(3, entries.size());

        AccessControlEntry first = entries.get(0);
        acl.orderBefore(first, null);

        List<? extends JackrabbitAccessControlEntry> entriesAfter = acl.getEntries();
        assertEquals(first, entriesAfter.get(2));
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AbstractAccessControlList.orderBefore()

        AccessControlEntry first = entries[0];
        AccessControlEntry second = entries[1];
        AccessControlEntry third = entries[2];

        // reorder 'second' to the first position
        acl.orderBefore(second, first);
        assertEquals(second, acl.getEntries().get(0));
        assertEquals(first, acl.getEntries().get(1));
        assertEquals(third, acl.getEntries().get(2));

        // reorder 'third' before 'first'
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AbstractAccessControlList.orderBefore()

        assertEquals(second, acl.getEntries().get(0));
        assertEquals(first, acl.getEntries().get(1));
        assertEquals(third, acl.getEntries().get(2));

        // reorder 'third' before 'first'
        acl.orderBefore(third, first);
        assertEquals(second, acl.getEntries().get(0));
        assertEquals(third, acl.getEntries().get(1));
        assertEquals(first, acl.getEntries().get(2));
    }
View Full Code Here

Examples of org.apache.sling.resource.collection.ResourceCollection.orderBefore()

          Assert.assertEquals(resPaths[numOfRes], entry.getPath());
          numOfRes ++;
        }

        try {
          collection.orderBefore(resource, resource);
          Assert.fail("should have thrown IllegalArgument");
        } catch (IllegalArgumentException e) {

        }
View Full Code Here

Examples of org.apache.sling.resource.collection.ResourceCollection.orderBefore()

        } catch (IllegalArgumentException e) {

        }

        //change the order
        collection.orderBefore(resource2, resource);

        resources = collection.getResources();

        numOfRes = 2;
        while (resources.hasNext()) {
View Full Code Here

Examples of org.jahia.services.content.JCRNodeWrapper.orderBefore()

        JCRNodeWrapper editPage2 = englishEditSession.getNode(SITECONTENT_ROOT_NODE + "/home/page2");
        englishEditSession.checkout(editPage2);
        englishEditSession.checkout(
                editPage1); // we have to check it out because of a property being changed during move !
        englishEditSession.move(editPage1.getPath(), SITECONTENT_ROOT_NODE + "/home/page2/page1");
        editPage2.orderBefore("page1", "contentList1");
        englishEditSession.save();
        jcrService.publishByMainId(englishEditSiteHomeNodeIdentifier, Constants.EDIT_WORKSPACE,
                Constants.LIVE_WORKSPACE, languages, true, null);
        JCRNodeWrapper liveSiteHomeNode = englishLiveSession.getNode(SITECONTENT_ROOT_NODE + "/home");
        JCRNodeWrapper livePage2 = englishLiveSession.getNode(SITECONTENT_ROOT_NODE + "/home/page2");
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.