Ejemplo n.º 1
0
        public void addItem()
        {
            System.Console.WriteLine("Enter Content ServiceId: ");
            long    csid   = IOUtils.readInt();
            AddItem ad     = new AddItem();
            long    itemId = ad.doAddItem(userContext, csid);

            if (itemId != 0)
            {
                RefreshItem          refreshItem = new RefreshItem();
                ContentServiceHelper csh         = new ContentServiceHelper(userContext);
                String mfatype = csh.getMfATypeId(csid);
                // Start the Refresh
                if (mfatype != null)
                {
                    refreshItem.refreshItem(userContext, itemId, true);
                }
                else
                {
                    refreshItem.refreshItem(userContext, itemId, false);
                }

                // Poll for the refresh status and display the item
                // summary if refresh succeeds
                if (refreshItem.pollRefreshStatus(userContext, itemId))
                {
                    System.Console.WriteLine("Done refreshing, display item:");
                    viewItem(itemId);
                }
            }
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
0
        public void contentServiceMenu()
        {
            ContentServiceHelper csh = new ContentServiceHelper(userContext);

            csh.contentServiceMenu();
        }