Exemple #1
0
        public void refreshItem()
        {
            RefreshItem refreshItem = new RefreshItem();

            System.Console.WriteLine("Enter Item ID:");
            long itemId = IOUtils.readLong();

            DataServiceService dataService = new DataServiceService();

            dataService.Url = System.Configuration.ConfigurationManager.AppSettings.Get("soapServer") + "/" + "DataService";
            ItemSummary itemSummary = dataService.getItemSummaryForItem(userContext, itemId, true);

            if (itemSummary != null)
            {
                bool    mfaFlag = false;
                MfaType?mfaType = itemSummary.contentServiceInfo.mfaType;
                if (mfaType != null && mfaType.HasValue)                 //mfaType.typeId > 0
                {
                    mfaFlag = true;
                }
                refreshItem.refreshItem(userContext, itemId, mfaFlag);
                // Poll for the refresh status and display the item
                // summary if refresh succeeds
                if (refreshItem.pollRefreshStatus(userContext, itemId))
                {
                    System.Console.WriteLine("\tDone refreshing, display item:");
                    viewItem(itemId);
                }
            }
            else
            {
                System.Console.WriteLine("The item does not exist");
            }
        }
Exemple #2
0
        /// <summary>
        /// Displays all information about the specified item.
        /// </summary>
        /// <param name="userContext"></param>
        /// <param name="itemId"></param>
        public void displayItemSummariesForItem(UserContext userContext, long itemId)
        {
            ItemSummary itemSummary = dataService.getItemSummaryForItem(userContext, itemId, true);

            object[] itemSummaries = new object[1];
            itemSummaries[0] = itemSummary;
            _printItemSummaries(itemSummaries);
        }
Exemple #3
0
        /**
         * This method is to find the MFAType of the content service given
         * the itemId and Usercontext
         * @param userContext
         * @param itemId
         * @return
         */
        public String getMFATypeId(UserContext userContext, long itemId)
        {
            ItemSummary          itemSummary      = dataService.getItemSummaryForItem(userContext, itemId, true);
            long                 contentserviceId = itemSummary.contentServiceInfo.contentServiceId;
            ContentServiceHelper csh = new ContentServiceHelper(userContext);

            return(csh.getMfATypeId(contentserviceId));
        }
Exemple #4
0
        /// <summary>
        /// Get the current credentials of an item.
        /// </summary>

        /*public void getItemInfo(UserContext userContext, long itemId)
         * {
         *
         *  System.Console.WriteLine("Getting Credentials for item: " + itemId);
         *  try
         *  {
         *      Form form = itemManagement.getLoginFormCredentialsForItem(userContext, itemId, true);
         *
         *      System.Console.WriteLine("\n" + SEPARATOR);
         *      FormUtil.PrintFormStructureAsText(form);
         *      System.Console.WriteLine(SEPARATOR + "\n");
         *      fieldInfoList = new ArrayList();
         *      //fieldInfoList = FormUtil.getUserInputFieldInfoList(userContext,
         *      //    itemManagement.getLoginFormCredentialsForItem(userContext, itemId,true));
         *      fieldInfoList = FormUtil.getUserInputFieldInfoList(userContext,
         *          itemManagement.getLoginFormForContentService(userContext, csId, true));
         *     // FormUtil.getUserInputFieldInfoList(form, fieldInfoList);
         *  }
         *  catch (SoapException se)
         *  {
         *      System.Console.WriteLine(se.StackTrace);
         *  }
         * }*/

        public void getItemInfo(UserContext userContext, long itemId)
        {
            System.Console.WriteLine("Getting Credentials for item: " + itemId);
            try
            {
                ItemSummary itemSummary = dataService.getItemSummaryForItem(userContext, itemId, true);
                Form        form        = itemManagement.getLoginFormForContentService(getCobrandContext(), itemSummary.contentServiceId, true);
                System.Console.WriteLine("\n" + SEPARATOR);
                FormUtil.PrintFormStructureAsText(form);
                System.Console.WriteLine(SEPARATOR + "\n");
                fieldInfoList = new ArrayList();
                FormUtil.getUserInputFieldInfoList(form, fieldInfoList);
            }
            catch (SoapException se)
            {
                System.Console.WriteLine(se.StackTrace);
            }
        }
Exemple #5
0
        public bool IsMFA(long itemId)
        {
            string soapServer  = CurrentValues.Instance.YodleeSoapServer;
            var    dataService = new DataServiceService {
                Url = soapServer + "/" + "DataService"
            };
            ItemSummary itemSummary = dataService.getItemSummaryForItem(UserContext, itemId, true);

            if (itemSummary == null)
            {
                throw new Exception("The item does not exist");
            }

            var mfaType = itemSummary.contentServiceInfo.mfaType;

            if (mfaType != null && mfaType.HasValue)             //mfaType.typeId > 0
            {
                return(true);
            }

            return(false);
        }