Package org.apache.rave.portal.model.impl

Examples of org.apache.rave.portal.model.impl.WidgetCommentImpl


                                    @RequestParam String text,
                                    HttpServletResponse response) {

        WidgetComment widgetComment = widgetService.getWidgetComment(widgetId, widgetCommentId);
        if (widgetComment == null) {
            widgetComment = new WidgetCommentImpl();
            widgetComment.setUserId(userService.getAuthenticatedUser().getId());
            widgetComment.setCreatedDate(new Date());
            widgetComment.setLastModifiedDate(new Date());
            widgetComment.setText(text);
            widgetService.createWidgetComment(widgetId, widgetComment);
View Full Code Here


    @RequestMapping(method = RequestMethod.POST, value = "/{widgetId}/comments")
    public void createWidgetComment(@PathVariable long widgetId,
                                    @RequestParam String text,
                                    HttpServletResponse response) {
        WidgetComment widgetComment = new WidgetCommentImpl();
        widgetComment.setWidgetId(widgetId);
        widgetComment.setUser(userService.getAuthenticatedUser());
        widgetComment.setText(text);
        widgetComment.setCreatedDate(new Date());
        widgetComment.setLastModifiedDate(new Date());

        widgetCommentService.saveWidgetComment(widgetComment);

        response.setStatus(HttpStatus.NO_CONTENT.value());
    }
View Full Code Here

                                    @RequestParam String text,
                                    HttpServletResponse response) {

        WidgetComment widgetComment = widgetCommentService.getWidgetComment(widgetCommentId);
        if (widgetComment == null) {
            widgetComment = new WidgetCommentImpl();
            widgetComment.setWidgetId(widgetId);
            widgetComment.setUser(userService.getAuthenticatedUser());
            widgetComment.setCreatedDate(new Date());
            widgetComment.setLastModifiedDate(new Date());
        }
View Full Code Here

        widget.setComments(convertedComments);
    }


    private WidgetCommentImpl convert(WidgetComment comment, Widget widget) {
        WidgetCommentImpl converted = comment instanceof WidgetCommentImpl ? ((WidgetCommentImpl) comment) : new WidgetCommentImpl();
        converted.setUserId(comment.getUserId());
        converted.setId(comment.getId() == null ? generateId() : comment.getId());

        converted.setCreatedDate(comment.getCreatedDate());
        converted.setLastModifiedDate(comment.getLastModifiedDate());
        converted.setText(comment.getText());
        return converted;
    }
View Full Code Here

    @RequestMapping(method = RequestMethod.POST, value = "/{widgetId}/comments")
    public void createWidgetComment(@PathVariable String widgetId,
                                    @RequestParam String text,
                                    HttpServletResponse response) {
        WidgetComment widgetComment = new WidgetCommentImpl();
        widgetComment.setUserId(userService.getAuthenticatedUser().getId());
        widgetComment.setText(text);
        widgetComment.setCreatedDate(new Date());
        widgetComment.setLastModifiedDate(new Date());

        widgetService.createWidgetComment(widgetId, widgetComment);

        response.setStatus(HttpStatus.NO_CONTENT.value());
    }
View Full Code Here

                                    @RequestParam String text,
                                    HttpServletResponse response) {

        WidgetComment widgetComment = widgetService.getWidgetComment(widgetId, widgetCommentId);
        if (widgetComment == null) {
            widgetComment = new WidgetCommentImpl();
            widgetComment.setUserId(userService.getAuthenticatedUser().getId());
            widgetComment.setCreatedDate(new Date());
            widgetComment.setLastModifiedDate(new Date());
            widgetComment.setText(text);
            widgetService.createWidgetComment(widgetId, widgetComment);
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.impl.WidgetCommentImpl

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.