Iterable<AbstractBuild> promotedItems = Iterables.filter(item.asProject().getBuilds(), new Predicate() {
public boolean apply(Object o) {
AbstractBuild abstractBuild = (AbstractBuild)o;
PromotedBuildAction pba = abstractBuild.getAction(PromotedBuildAction.class);
return ( pba != null && pba.getPromotion(promoted) != null );
}
});