1
14
15 package com.liferay.portlet.documentlibrary.workflow;
16
17 import com.liferay.portal.service.ServiceContext;
18 import com.liferay.portal.workflow.BaseWorkflowHandler;
19 import com.liferay.portlet.documentlibrary.model.DLFileEntry;
20 import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil;
21
22
27 public class DLFileEntryWorkflowHandler extends BaseWorkflowHandler {
28
29 public static final String CLASS_NAME = DLFileEntry.class.getName();
30
31 public String getClassName() {
32 return CLASS_NAME;
33 }
34
35 public String getType() {
36 return TYPE_DOCUMENT;
37 }
38
39 public DLFileEntry updateStatus(
40 long companyId, long groupId, long userId, long classPK, int status)
41 throws Exception {
42
43 ServiceContext serviceContext = new ServiceContext();
44
45 serviceContext.setStatus(status);
46
47 return DLFileEntryLocalServiceUtil.updateWorkflowStatus(
48 userId, classPK, serviceContext);
49 }
50
51 }