예제 #1
0
        public IDictionary <string, SimpleListDisplayInfo> GetListInfo(NodeVisit visit)
        {
            ValidateByRole(visit, SystemRoleType.Program);
            Dictionary <string, SimpleListDisplayInfo> dict =
                new Dictionary <string, SimpleListDisplayInfo>();

            IList <SimpleFlowNotification> flowNotifications =
                _notificationDao.GetAllSimpleFlowNotificationsForUsername(visit.Account.NaasAccount);

            if (!CollectionUtils.IsNullOrEmpty(flowNotifications))
            {
                foreach (SimpleFlowNotification flowNotification in flowNotifications)
                {
                    dict.Add(flowNotification.FlowCode, new SimpleListDisplayInfo(flowNotification.FlowCode,
                                                                                  flowNotification.FlowDescription,
                                                                                  flowNotification.NotificationType));
                }
            }
            // Add in any missing flows
            IList <DataFlow> flows = _flowDao.GetAllDataFlows(false, false);

            if (!CollectionUtils.IsNullOrEmpty(flows))
            {
                foreach (DataFlow flow in flows)
                {
                    if (!dict.ContainsKey(flow.FlowName))
                    {
                        dict.Add(flow.FlowName, new SimpleListDisplayInfo(flow.FlowName, flow.Description,
                                                                          NotificationType.None));
                    }
                }
            }
            FilterFlowsForUser(visit, dict);
            return(dict);
        }
예제 #2
0
 public IList <DataFlow> GetAllDataFlows(bool loadDataServices, bool includeServiceParameters)
 {
     return(_flowDao.GetAllDataFlows(loadDataServices, includeServiceParameters));
 }