Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?

0 votes



13 answers

Permanent link
zuk wrote:
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?


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

0 votes


Permanent link
Just call FeedManager.getDefault().getChannel(String url) to get the
feed for the given URL. It provides methods to access news items inside.


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...

0 votes


Permanent link
zuk wrote:
Just call FeedManager.getDefault().getChannel(String url) to get
the
feed for the given URL. It provides methods to access news items
inside.

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...


com.ibm.team.feed.core.FeedManager.getChannels()

--
Benjamin Pasero
Work Item & UI Commons Team

0 votes


Permanent link
Benjamin Pasero wrote:
zuk wrote:
Just call FeedManager.getDefault().getChannel(String url) to get
the
feed for the given URL. It provides methods to access news items
inside.

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...


com.ibm.team.feed.core.FeedManager.getChannels()


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

0 votes


Permanent link

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.


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

0 votes


Permanent link
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.


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



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

0 votes


Permanent link
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

0 votes


Permanent link
zuk wrote:
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


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

0 votes


Permanent link

Try something like
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences().
But take a look at the API for possible NULL values being returned.


i have tried with


IEditorReference[] e=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
for (int i=0;i<e.length;i++){
System.out.println(e[i].getTitle());

}


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

Class c=PlatformUI.getWorkbench().getActiveWorkbenchWindow(). getActivePage().getClass().forName("com.ibm.team.feed.ui.internal.itemview.FeedItemView");


?

0 votes


Permanent link
zuk wrote:
Try something like

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences().
But take a look at the API for possible NULL values being returned.


i have tried with


IEditorReference[]
e=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
for (int i=0;i<e.length;i++){
System.out.println(e.getTitle());

}


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

Class
c=PlatformUI.getWorkbench().getActiveWorkbenchWindow(). getActivePage().getClass().forName("com.ibm.team.feed.ui.internal.itemview.FeedItemView");


?



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

0 votes

1–15 items
page 1of 1 pagesof 2 pages

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,945

Question asked: Sep 04 '09, 10:15 a.m.

Question was seen: 9,420 times

Last updated: Sep 04 '09, 10:15 a.m.

Confirmation Cancel Confirm