Package org.springframework.social.alfresco.api.entities

Examples of org.springframework.social.alfresco.api.entities.Comment


    {
        String commentId = null;
        String firstComment = "This is a comment created by spring-social-alfresco";
        String updatedComment = "This is an updated comment";

        Comment comment = alfresco.createComment(network, node, firstComment);

        assertEquals(firstComment, comment.getContent());
        commentId = comment.getId();

        alfresco.updateComment(network, node, commentId, updatedComment);

        // TODO Do we need an individual get Comment?
View Full Code Here


    {
        Map<String, String> vars = new HashMap<String, String>();
        vars.put(TemplateParams.NETWORK, network);
        vars.put(TemplateParams.NODE, node);

        Comment _comment = new Comment();
        _comment.setContent(comment);

        String response = getRestTemplate().postForObject(NODE_COMMENTS_URL, new HttpEntity<Comment>(_comment, headers), String.class, vars);
        log.debug("createComment: " + response);
        Response<Comment> c = mapper.readValue(response, entryResponseType(Comment.class));
        return c.getEntry();
View Full Code Here

        vars.put(TemplateParams.NODE, node);

        java.util.List<Comment> _comments = new ArrayList<Comment>();
        for (String content : comments)
        {
            Comment _comment = new Comment();
            _comment.setContent(content);
            _comments.add(_comment);
        }

        String response = getRestTemplate().postForObject(NODE_COMMENTS_URL, new HttpEntity<java.util.List<Comment>>(_comments, headers), String.class, vars);
        log.debug("createComments: " + response);
View Full Code Here

        Map<String, String> vars = new HashMap<String, String>();
        vars.put(TemplateParams.NETWORK, network);
        vars.put(TemplateParams.NODE, node);
        vars.put(TemplateParams.COMMENT, commentId);

        Comment _comment = new Comment();
        _comment.setContent(comment);

        getRestTemplate().put(NODE_COMMENT_URL, new HttpEntity<Comment>(_comment, headers), vars);
        log.debug("updateComment: " + comment);
    }
View Full Code Here

TOP

Related Classes of org.springframework.social.alfresco.api.entities.Comment

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.