New feed subscription titles
hi,
how can i get all titles relative to added (by user) feed subscription? i have the need to fetch these and show in a view, added previously to RTC 2.0 ui... any hints? |
13 answers
zuk wrote:
hi, Just call FeedManager.getDefault().getChannel(String url) to get the feed for the given URL. It provides methods to access news items inside. -- Benjamin Pasero Work Item & UI Commons Team |
Just call FeedManager.getDefault().getChannel(String url) to get the excuse me, i'm afraid there may be a misunderstanding... i'm interesting to get all titles of the feed subscriptions added by users (the subscripions that are visible in Feed folder), not all the newsItem info... |
zuk wrote:
Just call FeedManager.getDefault().getChannel(String url) to get com.ibm.team.feed.core.FeedManager.getChannels() -- Benjamin Pasero Work Item & UI Commons Team |
Benjamin Pasero wrote:
zuk wrote: And to find out if they are added by the user you could check for the category (channel.getCategory) matching "com.ibm.team.feed.core.SystemFeed" which is our special ID for system feeds (the one pointing to the repository). Note that some of these could still be added manually by the user. -- Benjamin Pasero Work Item & UI Commons Team |
this is ok... but now i have the need to get only the specific feed channel who is opened in that moment, to be more precise for which view is opened. for example, if i have two subscriptions added by user, my application should react in different way depending on who channel (subscription) is opened; so i would get the channel name when it is used in rtc. how can i do this? regards enzo |
zuk wrote:
And to find out if they are added by the user you could check for You mean opened in the Timeline Editor? Hm, you can use the PlatformUI facade to get the currently opened editors and then iterate over all instances of com.ibm.team.feed.ui.internal.itemview.FeedItemView. When you ask this class for its editor input, you will be able to find out the feed or feeds that are displayed. Hope that helps. -- Benjamin Pasero Work Item & UI Commons Team |
this is what i need!
where can i find an example for manage PlatformUI facade? i don't know how use and initialize it... thanks enzo |
zuk wrote:
this is what i need! Try something like PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences(). But take a look at the API for possible NULL values being returned. -- Benjamin Pasero Work Item & UI Commons Team |
i have tried with
but this return only one item, that is "news reader and events". i'm not able to iterate over all instances of com.ibm.team.feed.ui.internal.itemview.FeedItemView... i should try something like
? |
zuk wrote:
Try something like No you should not. If more than 1 Feedview is opened, then you will get each of them using the API I mentioned earlier. -- Benjamin Pasero Work Item & UI Commons Team |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.