org.kuali.rice.kew.actionrequest.service.impl
Class NotificationSuppression

java.lang.Object
  extended by org.kuali.rice.kew.actionrequest.service.impl.NotificationSuppression

public class NotificationSuppression
extends Object

This utility class encapsulates functions used to provide notification suppression

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
static String SUPPRESS_NOTIFY_KEY_START
           
 
Constructor Summary
NotificationSuppression()
           
 
Method Summary
 void addNotificationSuppression(RouteNodeInstance nodeInstance, ActionRequestValue actionRequestValue)
          add metadata (a NodeState) to the route node so that if this action request is regenerated verbatim, the notification email will suppressed (since it is a duplicate!).
private  void addSuppressNotifyNodeStateKey(List<String> results, String responsiblePartyType, String responsiblePartyId)
          This method adds a suppress notify key to the passed in list
private  void deleteNotificationSuppression(RouteNodeInstance routeNodeInstance)
          This method removes all NodeStates related to notification suppression, saving the RouteNodeInstance if there were any removed.
protected  void filterNotificationSuppressedActionItems(List<ActionItem> actionItems, RouteNodeInstance routeNodeInstance)
          This method filters any ActionItems whose related ActionRequestValueS have been flagged for notification suppression.
protected  List<String> getSuppressNotifyNodeStateKeys(ActionRequestDTO a)
          Builds keys for action requests used for notification suppression.
protected  List<String> getSuppressNotifyNodeStateKeys(ActionRequestValue a)
          Builds keys for action requests used for notification suppression.
 void notify(List<ActionItem> actionItems, RouteNodeInstance routeNodeInstance)
          This method takes care of notification for ActionItemS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPPRESS_NOTIFY_KEY_START

public static final String SUPPRESS_NOTIFY_KEY_START
See Also:
Constant Field Values
Constructor Detail

NotificationSuppression

public NotificationSuppression()
Method Detail

addNotificationSuppression

public void addNotificationSuppression(RouteNodeInstance nodeInstance,
                                       ActionRequestValue actionRequestValue)
add metadata (a NodeState) to the route node so that if this action request is regenerated verbatim, the notification email will suppressed (since it is a duplicate!).

Parameters:
nodeInstance - where additional NodeState will be added
actionRequestValue -

filterNotificationSuppressedActionItems

protected void filterNotificationSuppressedActionItems(List<ActionItem> actionItems,
                                                       RouteNodeInstance routeNodeInstance)
This method filters any ActionItems whose related ActionRequestValueS have been flagged for notification suppression.

Parameters:
actionItems - the ActionItemS to filter
routeNodeInstance - the RouteNodeInstance that the actionItems are associated with

notify

public void notify(List<ActionItem> actionItems,
                   RouteNodeInstance routeNodeInstance)

This method takes care of notification for ActionItemS. It has logic for suppressing notifications when the RouteNodeInstance has NodeState specifically hinting for notification suppression for a given ActionItem.

A side effect is that any notification suppression NodeStateS will be removed from the RouteNodeInstance after notifications are sent.

Parameters:
actionItems - a list of ActionItemS related to the given routeNodeInstance
routeNodeInstance - the RouteNodeInstance related to the given actionItems

deleteNotificationSuppression

private void deleteNotificationSuppression(RouteNodeInstance routeNodeInstance)
This method removes all NodeStates related to notification suppression, saving the RouteNodeInstance if there were any removed.

Parameters:
routeNodeInstance -

getSuppressNotifyNodeStateKeys

protected List<String> getSuppressNotifyNodeStateKeys(ActionRequestDTO a)
Builds keys for action requests used for notification suppression.

NOTE: This method needs to stay in sync with getSuppressNotifyNodeStateKeys(org.kuali.rice.kew.dto.ActionRequestDTO) Any changes here must be made there as well!

Parameters:
a -
Returns:
List

getSuppressNotifyNodeStateKeys

protected List<String> getSuppressNotifyNodeStateKeys(ActionRequestValue a)
Builds keys for action requests used for notification suppression.

NOTE: This method needs to stay in sync with getSuppressNotifyNodeStateKeys(org.kuali.rice.kew.actionrequest.ActionRequestValue) Any changes here must be made there as well!

Parameters:
a -
Returns:
List

addSuppressNotifyNodeStateKey

private void addSuppressNotifyNodeStateKey(List<String> results,
                                           String responsiblePartyType,
                                           String responsiblePartyId)
This method adds a suppress notify key to the passed in list

Parameters:
results - the list that the key will be added to
responsiblePartyType -
responsiblePartyId -


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.