2 * (C) Copyright 2009 Nuxeo SA (http://nuxeo.com/) and contributors.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the GNU Lesser General Public License
6 * (LGPL) version 2.1 which accompanies this distribution, and is available at
7 * http://www.gnu.org/licenses/lgpl.html
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
17 package org.collectionspace.ecm.platform.quote.workflow.services;
19 import java.util.ArrayList;
21 import org.nuxeo.ecm.core.api.ClientException;
22 import org.nuxeo.ecm.core.api.CoreSession;
23 import org.nuxeo.ecm.core.api.DocumentModel;
25 public interface QuotesModerationService {
28 * Starts the moderation process on given Comment posted on a documentModel.
30 * @param session the coreSession
31 * @param document the document were the comment is posted
32 * @param commentId the commentId
33 * @throws ClientException
35 void startModeration(CoreSession session, DocumentModel document,
36 String commentId, ArrayList<String> moderators)
37 throws ClientException;
40 * Gets the moderation process for the given Comment posted on a documentModel.
42 * @param session the coreSession
43 * @param document the document were the comment is posted
44 * @param commentId the commentId
45 * @throws ClientException
48 ProcessInstance getModerationProcess(JbpmService jbpmService,
49 CoreSession session, DocumentModel doc, String commentId)
50 throws ClientException;
54 * Approve the comment with the given commentId.
56 * @param session the coreSession
57 * @param document the document were the comment is posted
58 * @param commentId the commentId
59 * @throws ClientException
61 void approveQuote(CoreSession session, DocumentModel document,
62 String commentId) throws ClientException;
65 * Reject the comment with the given commentId.
67 * @param session the coreSession
68 * @param document the document were the comment is posted
69 * @param commentId the commentId
70 * @throws ClientException
72 void rejectQuote(CoreSession session, DocumentModel document,
73 String commentId) throws ClientException;
76 * Publish the given comment.
78 * @param session the coreSession
79 * @param comment the comment to publish
80 * @throws ClientException
82 void publishQuote(CoreSession session, DocumentModel comment)
83 throws ClientException;