public class RulesEngine
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static MessagingManager |
messagingManager |
| Constructor and Description |
|---|
RulesEngine() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addNotifications(Message message)
This method determines the scope of for the given message and then adds a notification record
for the given message for each user in the scope.
|
static NotificationRuleViewModel |
apply(Message message,
javax.portlet.PortletRequest request)
Given a message, a request object, and a condition type, determine the
NotificationRuleViewModel
that applies to this message. |
static NotificationRuleViewModel |
apply(Message message,
javax.portlet.PortletRequest request,
java.lang.String condition)
Given a message and a condition string, determine the
NotificationRuleViewModel
that applies to this message. |
static NotificationRuleViewModel |
apply(java.lang.String eventName,
java.lang.String status,
java.lang.String role,
java.lang.String condition)
Given the primary key of
NotificationRuleViewModel, return a NotificationRuleViewModel contains information that
can be used by the UI, such as message resource string, priority, activity, etc. |
static java.lang.String |
getCondition(Message message)
Given a message, a request object, and a condition type, determine string value of the condition
|
public static final MessagingManager messagingManager
public static void addNotifications(Message message) throws NotificationRuleException
message - org.codehaus.jackson.JsonParseExceptionorg.codehaus.jackson.map.JsonMappingExceptionjava.io.IOExceptioncom.liferay.portal.PortalExceptioncom.liferay.portal.SystemExceptionNotificationRuleExceptionpublic static NotificationRuleViewModel apply(Message message, javax.portlet.PortletRequest request) throws NotificationRuleException
NotificationRuleViewModel
that applies to this message. The return NotificationRuleViewModel contains information that
can be used by the UI, such as message resource string, priority, activity, etc.message - request - type - NotificationRuleExceptionpublic static NotificationRuleViewModel apply(Message message, javax.portlet.PortletRequest request, java.lang.String condition) throws NotificationRuleException
NotificationRuleViewModel
that applies to this message. The return NotificationRuleViewModel contains information that
can be used by the UI, such as message resource string, priority, activity, etc.message - condition - NotificationRuleExceptionpublic static NotificationRuleViewModel apply(java.lang.String eventName, java.lang.String status, java.lang.String role, java.lang.String condition) throws NotificationRuleException
NotificationRuleViewModel, return a NotificationRuleViewModel contains information that
can be used by the UI, such as message resource string, priority, activity, etc.eventName - status - isProjectMember - isAdmin - condition - NotificationRuleExceptionpublic static java.lang.String getCondition(Message message) throws NotificationRuleException
message - request - type - NotificationRuleExceptionCopyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.