Package org.modeshape.web.jcr.rest.model

Examples of org.modeshape.web.jcr.rest.model.RestItem


        Session session = getSession(request, repositoryName, workspaceName);
        Node parentNode = (Node)session.getItem(parentAbsPath);
        Node newNode = addNode(parentNode, newNodeName, requestBodyJSON);

        session.save();
        RestItem restNewNode = createRestItem(request, 0, session, newNode);
        return Response.status(Response.Status.CREATED).entity(restNewNode).build();
    }
View Full Code Here


            String parentAbsPath = parentPath(nodePath);
            String newNodeName = newNodeName(nodePath);

            Node parentNode = (Node)session.getItem(parentAbsPath);
            Node newNode = addNode(parentNode, newNodeName, nodesByPath.get(nodePath));
            RestItem restNewNode = createRestItem(request, 0, session, newNode);
            result.add(restNewNode);
        }

        session.save();
        return createOkResponse(result);
View Full Code Here

            Binary binary = session.getValueFactory().createBinary(binaryStream);
            Property binaryProperty = content.setProperty(JcrConstants.JCR_DATA, binary);
            session.save();

            RestItem restItem = createRestItem(request, 0, session, binaryProperty);
            return Response.status(responseStatus).entity(restItem).build();
        } finally {
            try {
                binaryStream.close();
            } catch (IOException ioe) {
View Full Code Here

TOP

Related Classes of org.modeshape.web.jcr.rest.model.RestItem

Copyright © 2018 www.massapicom. 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.