001/*
002 * (C) Copyright 2009 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     mcedica
016 */
017package org.nuxeo.ecm.platform.comment.workflow.services;
018
019import java.util.ArrayList;
020
021import org.nuxeo.ecm.core.api.CoreSession;
022import org.nuxeo.ecm.core.api.DocumentModel;
023
024public interface CommentsModerationService {
025
026    /**
027     * Starts the moderation process on given Comment posted on a documentModel.
028     *
029     * @param session the coreSession
030     * @param document the document were the comment is posted
031     * @param commentId the commentId
032     */
033    void startModeration(CoreSession session, DocumentModel document, String commentId, ArrayList<String> moderators);
034
035    /**
036     * Approve the comment with the given commentId.
037     *
038     * @param session the coreSession
039     * @param document the document were the comment is posted
040     * @param commentId the commentId
041     */
042    void approveComent(CoreSession session, DocumentModel document, String commentId);
043
044    /**
045     * Reject the comment with the given commentId.
046     *
047     * @param session the coreSession
048     * @param document the document were the comment is posted
049     * @param commentId the commentId
050     */
051    void rejectComment(CoreSession session, DocumentModel document, String commentId);
052
053    /**
054     * Publish the given comment.
055     *
056     * @param session the coreSession
057     * @param comment the comment to publish
058     */
059    void publishComment(CoreSession session, DocumentModel comment);
060
061}