com.trackstudio.app.adapter.email
Class FilterNotifyAdapterManager

java.lang.Object
  extended by com.trackstudio.app.adapter.email.FilterNotifyAdapterManager

public class FilterNotifyAdapterManager
extends java.lang.Object

Notification filter adapter class. Sends subscription and notifications.


Constructor Summary
FilterNotifyAdapterManager(java.util.ArrayList adapters)
          ctor
 
Method Summary
 java.util.Map getDataMap(SessionContext sc, SecuredTaskBean task, java.lang.String sourceTaskName, java.lang.String sourceFilterName, java.lang.String sourceNotificationName, java.lang.String filterId, java.util.ArrayList items, java.lang.String reason)
          Returns a Map with data to be sent
 boolean processSubscription(java.lang.String subId, java.lang.String taskId)
          Send subscription for the task
 boolean sendMsg(java.lang.String sourceTaskName, java.lang.String sourceFilterName, java.lang.String sourceNotificationName, java.lang.String templateId, java.lang.String fi, java.lang.String fromUser, java.lang.String toUser, java.lang.String task, boolean sendForEmptyTaskList, java.lang.String reason)
          Send message for task
 boolean sendNotifyForTask(java.lang.String messageId, java.lang.String taskId, java.lang.String userId, java.lang.String mstatusId, java.lang.String singleNotificationId, java.lang.String notificationType)
          Send notification for the task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterNotifyAdapterManager

public FilterNotifyAdapterManager(java.util.ArrayList adapters)
ctor

Parameters:
adapters - list of adapters
Method Detail

sendMsg

public boolean sendMsg(java.lang.String sourceTaskName,
                       java.lang.String sourceFilterName,
                       java.lang.String sourceNotificationName,
                       java.lang.String templateId,
                       java.lang.String fi,
                       java.lang.String fromUser,
                       java.lang.String toUser,
                       java.lang.String task,
                       boolean sendForEmptyTaskList,
                       java.lang.String reason)
                throws GranException
Send message for task

Parameters:
sourceTaskName - name of task for which the message will be sent
sourceFilterName - name of filter which returns subtasks list
sourceNotificationName - name of notification rule
templateId - template of e-mail message's body
fi - source filter identifier
fromUser - from user's id
toUser - to user's id
task - task id
sendForEmptyTaskList - if true, notification will be sent even if the filtered subtasks list is empty
Returns:
true if succesful
Throws:
GranException

getDataMap

public java.util.Map getDataMap(SessionContext sc,
                                SecuredTaskBean task,
                                java.lang.String sourceTaskName,
                                java.lang.String sourceFilterName,
                                java.lang.String sourceNotificationName,
                                java.lang.String filterId,
                                java.util.ArrayList items,
                                java.lang.String reason)
                         throws GranException
Returns a Map with data to be sent

Parameters:
sc - session context
task - source task
sourceFilterName - name of filter which returns subtasks list
sourceNotificationName - name of notification rule
filterId - source filter identifier
items - list of subtasks
Returns:
Map with data to be sent
Throws:
GranException

sendNotifyForTask

public boolean sendNotifyForTask(java.lang.String messageId,
                                 java.lang.String taskId,
                                 java.lang.String userId,
                                 java.lang.String mstatusId,
                                 java.lang.String singleNotificationId,
                                 java.lang.String notificationType)
                          throws GranException
Send notification for the task

Parameters:
messageId - message id which will be sent
taskId - task's id
userId - user's id
mstatusId - id of status. Is not equals to 0, notification will be send to all users of this status
checkMessages - is true, tasks without messages won’t be filtered
singleNotificationId - id of single notification rule to be executed. If not null, all other rules won’t be executed
notificationType - type of notification rule to be executed. Returned by Notification.getCondition().
Returns:
true if successful
Throws:
GranException

processSubscription

public boolean processSubscription(java.lang.String subId,
                                   java.lang.String taskId)
                            throws GranException
Send subscription for the task

Parameters:
subId - subscription's id
taskId - task's id
Returns:
true is successful
Throws:
GranException


Copyright © 2002-2006 TrackStudio, Ltd. All Rights Reserved.