use of org.ovirt.engine.core.common.businessentities.Queryable in project ovirt-engine by oVirt.
the class AdElementListModel method addGroupsToModel.
protected void addGroupsToModel(QueryReturnValue returnValue, Set<String> excludeUsers) {
for (Queryable item : (Collection<Queryable>) returnValue.getReturnValue()) {
DirectoryGroup a = (DirectoryGroup) item;
if (!excludeUsers.contains(a.getId())) {
// TODO: This is a hack, we should either use DbGroup or reimplement user/group representation in GWT
DbUser group = new DbUser();
group.setExternalId(a.getId());
group.setFirstName(a.getName());
// $NON-NLS-1$
group.setLastName("");
// TODO: Due to group -> DbUser mapping hack we have to use note to represent display name of group
group.setNote(a.getDisplayName());
group.setDomain(a.getDirectoryName());
group.setNamespace(a.getNamespace());
EntityModel<DbUser> groupEntity = new EntityModel<>();
groupEntity.setEntity(group);
getgroups().add(groupEntity);
}
}
}
use of org.ovirt.engine.core.common.businessentities.Queryable in project ovirt-engine by oVirt.
the class AdElementListModel method addUsersToModel.
protected void addUsersToModel(QueryReturnValue returnValue, Set<String> excludeUsers) {
for (Queryable item : (List<Queryable>) returnValue.getReturnValue()) {
DirectoryUser a = (DirectoryUser) item;
if (!excludeUsers.contains(a.getId())) {
EntityModel<DbUser> tempVar2 = new EntityModel<>();
tempVar2.setEntity(new DbUser(a));
getusers().add(tempVar2);
}
}
}
Aggregations