use of cz.metacentrum.perun.webgui.model.ExtSource in project perun by CESNET.
the class GetExtSources method filterTable.
@Override
public void filterTable(String filter) {
// store list only for first time
if (fullBackup.isEmpty() || fullBackup == null) {
fullBackup.addAll(getList());
}
// always clear selected items
selectionModel.clear();
list.clear();
if (filter.equalsIgnoreCase("")) {
list.addAll(fullBackup);
} else {
for (ExtSource src : fullBackup) {
// store ext source if name or type matches
if ((src.getName().toLowerCase().contains(filter.toLowerCase())) || renameContent(src.getType()).toLowerCase().contains(filter.toLowerCase())) {
list.add(src);
}
}
}
if (list.isEmpty() && !filter.isEmpty()) {
loaderImage.setEmptyResultMessage("No external source matching '" + filter + "' found.");
} else {
loaderImage.setEmptyResultMessage("No external sources found in Perun.");
}
dataProvider.flush();
dataProvider.refresh();
loaderImage.loadingFinished();
}
use of cz.metacentrum.perun.webgui.model.ExtSource in project perun by CESNET.
the class GetVoExtSources method filterTable.
@Override
public void filterTable(String filter) {
// store list only for first time
if (fullBackup.isEmpty() || fullBackup == null) {
fullBackup.addAll(getList());
}
// always clear selected items
selectionModel.clear();
list.clear();
if (filter.equalsIgnoreCase("")) {
list.addAll(fullBackup);
} else {
for (ExtSource src : fullBackup) {
// store ext source if name or type matches
if ((src.getName().toLowerCase().contains(filter.toLowerCase())) || renameContent(src.getType()).toLowerCase().contains(filter.toLowerCase())) {
list.add(src);
}
}
}
if (list.isEmpty() && !filter.isEmpty()) {
loaderImage.setEmptyResultMessage("No external source matching '" + filter + "' found.");
} else {
loaderImage.setEmptyResultMessage("VO has no external source of members.");
}
dataProvider.flush();
dataProvider.refresh();
loaderImage.loadingFinished();
}
use of cz.metacentrum.perun.webgui.model.ExtSource in project perun by CESNET.
the class GetGroupExtSources method filterTable.
@Override
public void filterTable(String filter) {
// store list only for first time
if (fullBackup.isEmpty() || fullBackup == null) {
fullBackup.addAll(getList());
}
// always clear selected items
selectionModel.clear();
list.clear();
if (filter.equalsIgnoreCase("")) {
list.addAll(fullBackup);
} else {
for (ExtSource src : fullBackup) {
// store ext source if name or type matches
if ((src.getName().toLowerCase().contains(filter.toLowerCase())) || renameContent(src.getType()).toLowerCase().contains(filter.toLowerCase())) {
list.add(src);
}
}
}
if (list.isEmpty() && !filter.isEmpty()) {
loaderImage.setEmptyResultMessage("No external source matching '" + filter + "' found.");
} else {
loaderImage.setEmptyResultMessage("Group has no external source of members.");
}
dataProvider.flush();
dataProvider.refresh();
loaderImage.loadingFinished();
}
use of cz.metacentrum.perun.webgui.model.ExtSource in project perun by CESNET.
the class GetGroupExtSources method setList.
public void setList(ArrayList<ExtSource> list) {
clearTable();
this.list.addAll(list);
for (ExtSource object : list) {
oracle.add(object.getName());
oracle.add(renameContent(object.getType()));
}
dataProvider.flush();
dataProvider.refresh();
}
use of cz.metacentrum.perun.webgui.model.ExtSource in project perun by CESNET.
the class GetExtSources method setList.
public void setList(ArrayList<ExtSource> list) {
clearTable();
if (!extSourceTypeFilter.isEmpty()) {
// filter only them
for (ExtSource object : list) {
if (!extSourceTypeFilter.contains(object.getType())) {
this.list.add(object);
oracle.add(object.getName());
oracle.add(renameContent(object.getType()));
}
}
} else {
this.list.addAll(list);
for (ExtSource object : list) {
oracle.add(object.getName());
oracle.add(renameContent(object.getType()));
}
}
dataProvider.flush();
dataProvider.refresh();
}
Aggregations