Ejemplo n.º 1
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);
            }
        }
Ejemplo n.º 2
0
 public Form getLoginForm(long csId)
 {
     return(itemManagement.getLoginFormForContentService(getCobrandContext(), csId, true));
 }