Package org.brixcms.jcr.api

Examples of org.brixcms.jcr.api.JcrSession.save()


                            if (session.itemExists(brix.getRootPath())) {
                                session.getItem(brix.getRootPath()).remove();
                            }
                            session.importXML("/", s,
                                    ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
                            session.save();

                            brix.initWorkspace(ManageSnapshotsPanel.this.getModelObject(), session);

                            getSession().info(ManageSnapshotsPanel.this.getString("restoreSuccessful"));
                        } catch (IOException e) {
View Full Code Here


                session.importXML("/", getClass().getResourceAsStream("workspace.xml"),
                        ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);

                brix.initWorkspace(w, session);

                session.save();
            }
        } catch (Exception e) {
            throw new RuntimeException("Could not initialize jackrabbit workspace with Brix", e);
        }
    }
View Full Code Here

                @Override
                public void onSubmit() {
                    try {
                        JcrSession session = currentNode.getObject().getSession();
                        currentNode.getObject().remove();
                        session.save();

                        currentNode.setObject(null);
                        currentMenu = new Menu();
                        setupEditor();
                    } catch (JcrException e) {
View Full Code Here

        setPrototypeName(workspace, prototypeName);

        JcrSession destSession = brix.getCurrentSession(workspace.getId());

        JcrUtil.cloneNodes(nodes, destSession.getRootNode());
        destSession.save();
    }

    public String getPrototypeName(Workspace workspace) {
        return workspace.getAttribute(WORKSPACE_ATTRIBUTE_PROTOTYPE_NAME);
    }
View Full Code Here

        try {
            JcrSession s = getCurrentSession(null);
            for (RepositoryInitializer initializer : initializers) {
                initializer.initializeRepository(this, s);
            }
            s.save();
            s.logout();
        }
        catch (RepositoryException e) {
            throw new RuntimeException("Couldn't initialize repository", 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.