|
|
|
@ -6,6 +6,7 @@ import java.util.HashMap;
|
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import org.gcube.portlets.widgets.pickitem.client.bundle.CssAndImages;
|
|
|
|
|
import org.gcube.portlets.widgets.pickitem.client.rpc.PickItemService;
|
|
|
|
|
import org.gcube.portlets.widgets.pickitem.shared.ItemBean;
|
|
|
|
|
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
|
|
|
@ -78,7 +79,9 @@ public class PickItemServiceImpl extends RemoteServiceServlet implements PickIte
|
|
|
|
|
OrderByComparator teamComparator = OrderByComparatorFactoryUtil.create("team", "name", true);
|
|
|
|
|
List<Team> teams = TeamLocalServiceUtil.search(currentGroupId, keyword, "", null, QueryUtil.ALL_POS, QueryUtil.ALL_POS, teamComparator);
|
|
|
|
|
for (Team team : teams) {
|
|
|
|
|
toReturn.add(new ItemBean(team.getTeamId()+"", team.getName()));
|
|
|
|
|
ItemBean iBean = new ItemBean(team.getTeamId()+"", team.getName());
|
|
|
|
|
iBean.setItemGroup(true);
|
|
|
|
|
toReturn.add(iBean);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
@ -88,8 +91,11 @@ public class PickItemServiceImpl extends RemoteServiceServlet implements PickIte
|
|
|
|
|
toReturn.add(new ItemBean("id", "andrea.rossi", "Andrea Rossi", "email"));
|
|
|
|
|
if (i % 2 == 0)
|
|
|
|
|
toReturn.add(new ItemBean(""+i, "username"+i, "userGetFullname()"+i, "user.getEmail()"+i));
|
|
|
|
|
else
|
|
|
|
|
toReturn.add(new ItemBean(""+i, "ciccio"+i, "ciccioNome"+i, "ciccioEMail"+i));
|
|
|
|
|
else {
|
|
|
|
|
ItemBean groupBean = new ItemBean("idG"+i, "Group "+i);
|
|
|
|
|
groupBean.setItemGroup(true);
|
|
|
|
|
toReturn.add(new ItemBean(""+i, "Group "+i));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return toReturn;
|
|
|
|
@ -112,15 +118,5 @@ public class PickItemServiceImpl extends RemoteServiceServlet implements PickIte
|
|
|
|
|
}
|
|
|
|
|
return thumbnailURL;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* utility method extract the @domain.com from an email address
|
|
|
|
|
* return @unknown-domain in case of no emails
|
|
|
|
|
*/
|
|
|
|
|
private String extractDomainFromEmail(String email) {
|
|
|
|
|
int index = email.indexOf('@');
|
|
|
|
|
if (index > 0)
|
|
|
|
|
return email.substring(index);
|
|
|
|
|
else
|
|
|
|
|
return "@unknown-domain";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|