// should probably use the ApplicationRegistryService at some point, but our statistics are not in sync with
// this
return portalContext.execute(new PortalContext.Request<Set<String>>() {
@Override
public Set<String> within(PortalContainer container) throws Exception {
ApplicationStatisticService service = getComponent(ApplicationStatisticService.class, container);
if (service == null)
return Collections.emptySet();
return new LinkedHashSet<String>(Arrays.asList(service.getApplicationList()));
}
});
} catch (Exception e) {
getLogger().error("Exception retrieving list of applications for runtime portal resource.", e);
return Collections.emptySet();