It's all about the answers!

Ask a question

adding new feed filters


enzo zuk (12693) | asked Aug 25 '09, 2:14 p.m.
hi,
i have added the extension point ItemViewUIAdvisor to create my ItemViewerFilter and to add this to client's user interface.
now i'm confused about filter behaviour (i'm only interested to new feed subscription created by user):


public class FeedFilterExtension implements IItemViewUIAdvisor {

ItemViewerFilter facebookFilter;
FeedFilter ff;

public void configure(ItemViewUIConfigurer arg0) {

facebookFilter=new ItemViewerFilter(ff, "fb", "Facebook",1);
facebookFilter.setEnabledByDefault(true);
arg0.addFilter(facebookFilter);

}

}



in my filter I need to exclude some specific feeds from the feedreader and that is done implementing the select method in a classe that extends ViewerFilter...

public class FeedFilter extends ViewerFilter {
@Override
public boolean select(Viewer viewer, Object parentElement,
Object element) {
return true;
}
}


how can i get all feeds to feedreader and use these in select method, utilizing a casting with the element argument?

I will appreciate any hints, snippet or example and thank you in advance

18 answers



permanent link
Work Item & UI Commons Team (1.3k1) | answered Aug 26 '09, 4:41 a.m.
This filter mechanism only allows you to filter out news and not feeds.
But you can always get to the related feed from the news calling
NewsItem.getChannel(). Then you could look at the name or link of that
feed and decide based on that.

hi,
i have added the extension point ItemViewUIAdvisor to create my
ItemViewerFilter and to add this to client's user interface.
now i'm confused about filter behaviour (i'm only interested to new
feed subscription created by user):


public class FeedFilterExtension implements IItemViewUIAdvisor {

ItemViewerFilter facebookFilter;
FeedFilter ff;

public void configure(ItemViewUIConfigurer arg0)
{

facebookFilter=new ItemViewerFilter(ff, "fb",
"Facebook",1);
facebookFilter.setEnabledByDefault(true);
arg0.addFilter(facebookFilter);

}

}



in my filter I need to exclude some specific feeds from the feedreader
and that is done implementing the select method in a classe that
extends ViewerFilter...

public class FeedFilter extends ViewerFilter {
@Override
public boolean select(Viewer viewer, Object parentElement,
Object element) {
return true;
}
}


how can i get all feeds to feedreader and use these in select method,
utilizing a casting with the element argument?

I will appreciate any hints, snippet or example and thank you in
advance



--
Benjamin Pasero
Work Item & UI Commons Team

permanent link
enzo zuk (12693) | answered Aug 26 '09, 8:51 a.m.
so i work on News and i put this class in select method for the cast with element...
what are the impors and dependences to set for working with News in my rcp.ui plugin?
where can i watch for something like this?

permanent link
Work Item & UI Commons Team (1.3k1) | answered Aug 27 '09, 5:25 a.m.
zuk wrote:
so i work on News and i put this class in select method for the cast
with element...
what are the impors and dependences to set for working with News in my
rcp.ui plugin?
where can i watch for something like this?


Yes, you work on com.ibm.team.feed.core.model.NewsItem which lives in
the bundle com.ibm.team.feed.core.

You can find examples of this e.g. in FeedItemViewUIAdvisor.

--
Benjamin Pasero
Work Item & UI Commons Team

permanent link
enzo zuk (12693) | answered Aug 27 '09, 1:21 p.m.
thanks for the hint, but i have another question:
i have observed that the new feed subscription are independent from jazz server repository, differently to workitem feeds...
exists one way to fetch this NewsItem directly from client feedreader, without passing from repository?

permanent link
rose cicinelli (2644) | answered Aug 28 '09, 4:32 a.m.
You can find examples of this e.g. in FeedItemViewUIAdvisor.

where can be found this examlpe?
is this in a wiki-page?

i'm a novice developer interested in feeds fetching & filtering.
in my rtc client i have created an additional view, that in my intentions should contain only the news of user subscription excluding the other artifact news...

can i do this in a ui plugin, without involving service, common and client plugin?

thank in advance

permanent link
Work Item & UI Commons Team (1.3k1) | answered Aug 28 '09, 6:06 a.m.
zuk wrote:
thanks for the hint, but i have another question:
i have observed that the new feed subscription are independent from
jazz server repository, differently to workitem feeds...
exists one way to fetch this NewsItem directly from client feedreader,
without passing from repository?


Yes, the eclipse client is capable to download both repository feeds and
normal feeds. it will not call the repository if the feed is from
external. From your filter it should not make any difference if the feed
is from the repository or external.

--
Benjamin Pasero
Work Item & UI Commons Team

permanent link
Work Item & UI Commons Team (1.3k1) | answered Aug 28 '09, 6:08 a.m.
rose wrote:
You can find examples of this e.g. in FeedItemViewUIAdvisor.
where can be found this examlpe?
is this in a wiki-page?

i'm a novice developer interested in feeds fetching & filtering.
in my rtc client i have created an additional view, that in my
intentions should contain only the news of user subscription
excluding the other artifact news...

can i do this in a ui plugin, without involving service, common and
client plugin?

thank in advance


The FeedItemViewUIAdvisor is a filter we use in RTC, you can find it
inside the com.ibm.team.feed.ui bundle.

If you just want to contribute a client side view you dont need
dependencies to common or service.

--
Benjamin Pasero
Work Item & UI Commons Team

permanent link
enzo zuk (12693) | answered Aug 28 '09, 10:17 a.m.
Yes, the eclipse client is capable to download both repository feeds and
normal feeds. it will not call the repository if the feed is from
external. From your filter it should not make any difference if the feed
is from the repository or external.


thanks a lot for your punctual answer!
enzo

permanent link
enzo zuk (12693) | answered Sep 01 '09, 7:00 a.m.
now i have added and implemented my new filters, but if i try to add more than three, only the first, second and third are visibles because the space assigned to checkbox item filters not enough...

how can i modify this portion of user interface, maybe whit a show all-hide details button?

any example?
thanks in advance
enzo

permanent link
Work Item & UI Commons Team (1.3k1) | answered Sep 01 '09, 7:59 a.m.
zuk wrote:
now i have added and implemented my new filters, but if i try to add
more than three, only the first, second and third are visibles
because the space assigned to checkbox item filters not enough...

how can i modify this portion of user interface, maybe whit a show
all-hide details button?

any example?
thanks in advance
enzo


You should see up to 5 before getting the expand/hide link. Can you send
me a screenshot of the problem?

--
Benjamin Pasero
Work Item & UI Commons Team

Your answer


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