throws BusinessException { List<InvocationSequenceData> result = invocationDataAccessService.getInvocationSequenceOverview(agentId, limit, fromDate, toDate, latestReadId + 1, businessTrxId, applicationId, alertId, OVERVIEW_COMPARATOR);
/** * Reloads the data from the service. */ private void loadDataFromService() { List<InvocationSequenceData> invocData; if (!autoUpdate) { if (template.getMethodIdent() != IdDefinition.ID_NOT_USED) { invocData = dataAccessService.getInvocationSequenceOverview(template.getPlatformIdent(), template.getMethodIdent(), limit, fromDate, toDate, resultComparator); } else { invocData = dataAccessService.getInvocationSequenceOverview(template.getPlatformIdent(), limit, fromDate, toDate, resultComparator); } } else { if (template.getMethodIdent() != IdDefinition.ID_NOT_USED) { invocData = dataAccessService.getInvocationSequenceOverview(template.getPlatformIdent(), template.getMethodIdent(), limit, resultComparator); } else { invocData = dataAccessService.getInvocationSequenceOverview(template.getPlatformIdent(), limit, resultComparator); } } // why this? so only update with new data if returned collection is not empty, i would say // with every update, if it is empty, then there is nothing to display // then i also done need the clearInvocationFlag // I changed here, .clear() is now out of if clause invocationSequenceData.clear(); if (!invocData.isEmpty()) { invocationSequenceData.addAll(invocData); } }
/** * {@inheritDoc} */ @Override public void doRefresh(IProgressMonitor monitor, IRootEditor rootEditor) { monitor.beginTask("Updating Invocation Overview", IProgressMonitor.UNKNOWN); monitor.subTask("Retrieving the Invocation Overview from the CMR"); getInvocationSequenceData().clear(); List<InvocationSequenceData> invocData; try { invocData = getDataAccessService().getInvocationSequenceOverview(alert.getId(), getLimit(), getResultComparator()); if (!invocData.isEmpty()) { monitor.subTask("Displaying the Invocation Overview"); getInvocationSequenceData().addAll(invocData); } } catch (BusinessException e) { InspectIT.getDefault().createErrorDialog("Failed loading invocation sequences for alert '" + alert + "'", e, -1); } monitor.done(); } }
/** * {@inheritDoc} */ @Override public void doRefresh(IProgressMonitor monitor, IRootEditor rootEditor) { monitor.beginTask("Updating Invocation Overview", IProgressMonitor.UNKNOWN); monitor.subTask("Retrieving the Invocation Overview from the CMR"); List<InvocationSequenceData> invocData; Set<Long> invocationIdsSet = new HashSet<>(); for (InvocationAwareData invocationAwareData : invocationAwareDataList) { if (null != invocationAwareData.getInvocationParentsIdSet()) { invocationIdsSet.addAll(invocationAwareData.getInvocationParentsIdSet()); } } long platformIdent = getInputDefinition().getIdDefinition().getPlatformId(); invocData = getDataAccessService().getInvocationSequenceOverview(platformIdent, invocationIdsSet, getLimit(), getResultComparator()); getInvocationSequenceData().clear(); if (!invocData.isEmpty()) { monitor.subTask("Displaying the Invocation Overview"); getInvocationSequenceData().addAll(invocData); } monitor.done(); }