in src/main/java/org/apache/openwhisk/intellij/explorer/toolwindow/ui/WhiskExplorerWindowForm.java [432:456]
private List<WhiskEndpoint> getEntities(WhiskPackageService whiskPackageService, WhiskActionService
whiskActionService, WhiskTriggerService whiskTriggerService, List<WhiskEndpoint> whiskEndpoints) {
List<WhiskEndpoint> newWhiskEndpoints = new ArrayList<>();
for (WhiskEndpoint ep : whiskEndpoints) {
List<WhiskNamespace> newNamespaces = new ArrayList<>();
for (WhiskNamespace ns : ep.getNamespaces()) {
try {
WhiskAuth auth = new WhiskAuth(ns.getAuth(), ep.getApihost());
// get pkg, action
ns.setPackages(whiskPackageService.getWhiskPackages(auth));
ns.setActions(whiskActionService.getWhiskActions(auth));
ns.setTriggers(whiskTriggerService.getWhiskTriggers(auth));
newNamespaces.add(ns);
} catch (IOException e) {
final String msg = ns.getPath() + " entities cannot be loaded.";
LOG.error(msg, e);
NOTIFIER.notify(project, msg, NotificationType.ERROR);
}
}
ep.setNamespaces(newNamespaces);
newWhiskEndpoints.add(ep);
}
return newWhiskEndpoints;
}