01: /******************************************************************************
02: * JBoss, a division of Red Hat *
03: * Copyright 2006, Red Hat Middleware, LLC, and individual *
04: * contributors as indicated by the @authors tag. See the *
05: * copyright.txt in the distribution for a full listing of *
06: * individual contributors. *
07: * *
08: * This is free software; you can redistribute it and/or modify it *
09: * under the terms of the GNU Lesser General Public License as *
10: * published by the Free Software Foundation; either version 2.1 of *
11: * the License, or (at your option) any later version. *
12: * *
13: * This software is distributed in the hope that it will be useful, *
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16: * Lesser General Public License for more details. *
17: * *
18: * You should have received a copy of the GNU Lesser General Public *
19: * License along with this software; if not, write to the Free *
20: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
21: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
22: ******************************************************************************/package org.jboss.portal.cms.workflow;
23:
24: import org.jboss.portal.workflow.WorkflowException;
25:
26: import java.util.Collection;
27: import java.util.Set;
28:
29: /**
30: * Created on : Dec 19, 2006
31: *
32: * @author Sohil Shah - sohil.shah@jboss.com
33: */
34: public interface ApprovePublish {
35: /**
36: * Called when content is added to the CMS, and needs to be approved by the managers before it can be published to go
37: * live
38: *
39: * @param content
40: * @return returns the process id of the workflow process set in motion
41: */
42: public long requestApproval(Content content)
43: throws WorkflowException;
44:
45: /**
46: * Called when a manager either approves or rejects the publishing of a specific content to go live
47: *
48: * @param processId
49: * @param manager userId of the manager
50: * @param approved true if approved, false if rejected
51: */
52: public void processManagerResponse(long processId, String manager,
53: boolean approved) throws WorkflowException;
54:
55: /**
56: * Called when a manager either approves the publishing of a specific content to go live, but at the same time
57: * adds his/her own modifications to the original content
58: *
59: * @param processId
60: * @param manager userId of the manager
61: * @param approved true if approved, false if rejected
62: */
63: public void processManagerResponse(long processId, String manager,
64: String modifiedContent) throws WorkflowException;
65:
66: /**
67: * Retrieves a queue of unapproved content associated with the specified file in the CMS
68: *
69: * @param filePath
70: * @return
71: * @throws WorkflowException
72: */
73: public Collection getPendingQueue(String filePath)
74: throws WorkflowException;
75:
76: /**
77: * Retrieves a queue of unapproved content for everything in the CMS.
78: *
79: * @return
80: * @throws WorkflowException
81: */
82: public Collection getAllPendingInQueue() throws WorkflowException;
83:
84: /**
85: * Returns role names of Roles that are designated to be Managers in this workflow. Managers approve/deny all content
86: * publish requests before the content goes live in the CMS
87: *
88: * @return a Set of role names
89: */
90: public Set getManagers();
91: }
|