Examples of Root


Examples of org.apache.jackrabbit.oak.api.Root

                                boolean moveLabel)
            throws InvalidItemStateException, LabelExistsVersionException,
            VersionException, RepositoryException {
        // perform operation on fresh storage to not interfere
        // with pending changes in the workspace.
        Root fresh = sessionDelegate.getContentSession().getLatestRoot();
        VersionStorage storage = new VersionStorage(fresh);
        String vhRelPath = PathUtils.relativize(VersionStorage.VERSION_STORAGE_PATH,
                checkNotNull(versionHistory).getPath());
        versionManager.addVersionLabel(storage, vhRelPath,
                checkNotNull(version).getName(), checkNotNull(oakVersionLabel),
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.Root

    public void removeVersionLabel(@Nonnull VersionHistoryDelegate versionHistory,
                                   @Nonnull String oakVersionLabel)
            throws InvalidItemStateException, VersionException, RepositoryException {
        // perform operation on fresh storage to not interfere
        // with pending changes in the workspace.
        Root fresh = sessionDelegate.getContentSession().getLatestRoot();
        VersionStorage storage = new VersionStorage(fresh);
        String vhRelPath = PathUtils.relativize(VersionStorage.VERSION_STORAGE_PATH,
                checkNotNull(versionHistory).getPath());
        versionManager.removeVersionLabel(storage, vhRelPath,
                checkNotNull(oakVersionLabel));
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.Root

*/
public class SolrCommitHookIT extends SolrBaseTest {

    @Test
    public void testAddSomeNodes() throws Exception {
        Root r = createRoot();
        r.getTree("/").addChild("a").addChild("b").addChild("doc1").
                setProperty("text", "hit that hot hat tattoo");
        r.getTree("/").getChild("a").addChild("c").addChild("doc2").
                setProperty("text", "it hits hot hats");
        r.getTree("/").getChild("a").getChild("b").addChild("doc3").
                setProperty("text", "tattoos hate hot hits");
        r.getTree("/").getChild("a").getChild("b").addChild("doc4").
                setProperty("text", "hats tattoos hit hot");
        r.commit();

        SolrQuery query = new SolrQuery();
        query.setQuery("*:*");
        QueryResponse queryResponse = server.query(query);
        assertTrue("no documents were indexed", queryResponse.getResults().size() > 0);
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.Root

        assertTrue("no documents were indexed", queryResponse.getResults().size() > 0);
    }

    @Test
    public void testRemoveNode() throws Exception {
        Root r = createRoot();

        // Add a node
        r.getTree("/").addChild("testRemoveNode").setProperty("foo", "bar");
        r.commit();

        // check the node is not in Solr anymore
        SolrQuery query = new SolrQuery();
        query.setQuery("path_exact:\\/testRemoveNode\\/");
        assertTrue("item with id:testRemoveNode was not found in the index",
                server.query(query).getResults().size() > 0);

        // remove the node in oak
        r.getTree("/").getChild("testRemoveNode").remove();
        r.commit();

        // check the node is not in Solr anymore
        assertTrue("item with id:testRemoveNode was found in the index",
                server.query(query).getResults().size() == 0);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.Root

    @Before
    public void setUp() throws CommitFailedException {
        ContentSession session = createContentSession();

        // Add test content
        Root root = session.getLatestRoot();
        Tree tree = root.getTree("/");
        Tree x = tree.addChild("x");
        Tree y = x.addChild("y");
        Tree z = y.addChild("z");
        root.commit();

        // Acquire a fresh new root to avoid problems from lingering state
        this.root = new ImmutableRoot(session.getLatestRoot(), TreeTypeProvider.EMPTY);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.Root

        assumeTrue(fixture != NodeStoreFixture.MONGO_MK);

        session = createContentSession();

        // Add test content
        Root root = session.getLatestRoot();

        Tree tree = root.getTree("/");
        Tree treeA = tree.addChild("tree-a");
        this.treeAPath = treeA.getPath();
        Tree treeB = tree.addChild("tree-b");
        this.treeBPath = treeB.getPath();

        createNodes(treeA, 10, 5)// 111111 nodes in treeA
        root.commit();
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.Root

        }
    }

    @Test
    public void moveTest() throws CommitFailedException {
        Root root1 = session.getLatestRoot();

        // Concurrent changes to trunk: enforce rebase
        Root root2 = session.getLatestRoot();
        root2.getTree("/").addChild("any");
        root2.commit();

        root1.move(treeAPath, PathUtils.concat(treeBPath, "tree-a-moved"));
        root1.commit();
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.Root

        }
    }

    @Test
    public void testValidTokenCredentials() throws Exception {
        Root root = adminSession.getLatestRoot();
        AuthenticationConfiguration authConfig = getSecurityProvider().getConfiguration(AuthenticationConfiguration.class);
        TokenProvider tp = authConfig.getTokenProvider(root);

        SimpleCredentials sc = (SimpleCredentials) getAdminCredentials();
        TokenInfo info = tp.createToken(sc.getUserID(), Collections.<String, Object>emptyMap());
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.Root

     */
    @CheckForNull
    protected UserManager getUserManager() {
        UserManager userManager = null;
        SecurityProvider sp = getSecurityProvider();
        Root root = getRoot();
        if (root != null && sp != null) {
            UserConfiguration uc = securityProvider.getConfiguration(UserConfiguration.class);
            userManager = uc.getUserManager(root, NamePathMapper.DEFAULT);
        }

View Full Code Here

Examples of org.axsl.fo.fo.Root

     * Retrieves the FObj instance that is associated with id.
     * @param id The id whose FObj instance is sought.
     * @return The FObj instance that is associated with id.
     */
    public Fo retrieveId(final String id) {
        final Root root = traitGeneratedBy();
        return root.retrieveId(id);
    }
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.