List of usage examples for com.liferay.portal.kernel.workflow WorkflowConstants CONTEXT_USER_ID
String CONTEXT_USER_ID
To view the source code for com.liferay.portal.kernel.workflow WorkflowConstants CONTEXT_USER_ID.
Click Source Link
From source file:au.com.permeance.liferay.util.workflow.WebContentWorkflowHandler.java
License:Open Source License
/** * This implementation puts out a stack trace for any exception because Liferay can swallow them * and this is where potential PACL-related exceptions can occur. *///from www . j av a 2 s . c om @Override public JournalArticle updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException { try { long userId = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long classPK = GetterUtil .getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); JournalArticle article = JournalArticleLocalServiceUtil.getArticle(classPK); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); String articleURL = PortalUtil.getControlPanelFullURL(serviceContext.getScopeGroupId(), PortletKeys.JOURNAL, null); return JournalArticleLocalServiceUtil.updateStatus(userId, article, status, articleURL, serviceContext, workflowContext); } catch (RuntimeException e) { _log.error("Error updating status: " + e.getMessage(), e); throw e; } catch (PortalException e) { _log.error("Error updating status: " + e.getMessage(), e); throw e; } }
From source file:com.inkwell.internet.slogan.workflow.SloganWorkflowHandler.java
License:Open Source License
public Object updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException, SystemException { long userId = GetterUtil.getLong(workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long resourcePrimKey = GetterUtil.getLong(workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); return SloganLocalServiceUtil.updateStatus(userId, resourcePrimKey, status, serviceContext); }
From source file:com.liferay.blogs.internal.workflow.BlogsEntryWorkflowHandler.java
License:Open Source License
@Override public BlogsEntry updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException { long userId = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long classPK = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); return _blogsEntryLocalService.updateStatus(userId, classPK, status, serviceContext, workflowContext); }
From source file:com.liferay.calendar.workflow.CalendarBookingWorkflowHandler.java
License:Open Source License
@Override public CalendarBooking updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException { long userId = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long classPK = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); return CalendarBookingLocalServiceUtil.updateStatus(userId, classPK, status, serviceContext); }
From source file:com.liferay.document.library.internal.workflow.DLFileEntryWorkflowHandler.java
License:Open Source License
@Override public DLFileEntry updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException { long userId = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long classPK = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); return _dlFileEntryLocalService.updateStatus(userId, classPK, status, serviceContext, workflowContext); }
From source file:com.liferay.dynamic.data.lists.workflow.DDLFormWorkflowHandler.java
License:Open Source License
@Override public DDLFormRecord updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException { long userId = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long classPK = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); DDLRecord record = _ddlRecordLocalService.updateStatus(userId, classPK, status, serviceContext); return new DDLFormRecordImpl(record); }
From source file:com.liferay.dynamic.data.lists.workflow.DDLRecordWorkflowHandler.java
License:Open Source License
@Override public DDLRecord updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException { long userId = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long classPK = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); return _ddlRecordLocalService.updateStatus(userId, classPK, status, serviceContext); }
From source file:com.liferay.dynamic.data.mapping.workflow.DDMFormInstanceRecordWorkflowHandler.java
License:Open Source License
@Override public DDMFormInstanceRecord updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException { long userId = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long classPK = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); return _ddmFormInstanceRecordLocalService.updateStatus(userId, classPK, status, serviceContext); }
From source file:com.liferay.journal.workflow.JournalArticleWorkflowHandler.java
License:Open Source License
@Override public JournalArticle updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException { long userId = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long classPK = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); JournalArticle article = _journalArticleLocalService.getArticle(classPK); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); String articleURL = _portal.getControlPanelFullURL(serviceContext.getScopeGroupId(), PortletProviderUtil.getPortletId(JournalArticle.class.getName(), PortletProvider.Action.EDIT), null);//from w w w. ja va 2s. c o m return _journalArticleLocalService.updateStatus(userId, article, status, articleURL, serviceContext, workflowContext); }
From source file:com.liferay.knowledgebase.admin.workflow.KBArticleWorkflowHandler.java
License:Open Source License
@Override public KBArticle updateStatus(int status, Map<String, Serializable> workflowContext) throws PortalException { long userId = GetterUtil.getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_USER_ID)); long resourcePrimKey = GetterUtil .getLong((String) workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); ServiceContext serviceContext = (ServiceContext) workflowContext.get("serviceContext"); return KBArticleLocalServiceUtil.updateStatus(userId, resourcePrimKey, status, serviceContext); }