Package org.brixcms.jcr.api

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


            // retrieve jcr session
            final String workspace = getWorkspace();
            final JcrSession session = brix.getCurrentSession(workspace);

            if (session.itemExists(jcrPath)) {
                // node exists, return it
                node = (BrixNode) session.getItem(jcrPath);
            }
        }
View Full Code Here


                            InputStream s = u.getInputStream();
                            String id = ManageSnapshotsPanel.this.getModelObject().getId();
                            Brix brix = getBrix();
                            JcrSession session = brix.getCurrentSession(id);

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

    }

    private BrixNode getRootNode(String workspaceId, boolean createIfNotExist) {
        JcrSession session = brix.getCurrentSession(workspaceId);

        if (session.itemExists(getRootPath()) == false) {
            if (createIfNotExist) {
                BrixNode parent = (BrixNode) session.getItem(brix.getRootPath());
                parent.addNode(ROOT_NODE_NAME, "nt:unstructured");
            } else {
                return null;
View Full Code Here

            // retrieve jcr session
            final String workspace = getWorkspace();
            final JcrSession session = brix.getCurrentSession(workspace);

            if (session.itemExists(jcrPath)) {
                // node exists, return it
                node = (BrixNode) session.getItem(jcrPath);
            }
        }
View Full Code Here

        final Path path = new Path(parent.getPath());
        final Path newPath = path.append(new Path(name));

        final JcrSession session = parent.getSession();

        if (session.itemExists(newPath.toString())) {
            class ModelObject implements Serializable {
                @SuppressWarnings("unused")
                public String path = SitePlugin.get().fromRealWebNodePath(newPath.toString());
            }
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.