/** * Indicates whether the name of the business transaction shell be extracted dynamically from * the measurement data. * * @return true, if dynamic extraction shell be used. */ public boolean dynamicNameExtractionActive() { return null != getNameExtractionExpression(); }
/** * Extracts the business transaction name dynamically from the {@link InvocationSequenceData} by * recursively iterating over the invocation sequence. * * @param invocSequence * {@link InvocationSequenceData} to extract the business transaction from. * @param cachedDataService * {@link ICachedDataService} instance for retrieving method names, etc. * @param depth * current recursion depth. THis is used stop the recursion at a specified maximum * search depth. * @return extracted name */ private String extractNameDynamically(InvocationSequenceData invocSequence, ICachedDataService cachedDataService, int depth) { String name = getNameExtractionExpression().extractName(invocSequence, cachedDataService); if ((null == name) && (null != invocSequence.getNestedSequences())) { if ((getNameExtractionExpression().getMaxSearchDepth() < 0) || (depth < getNameExtractionExpression().getMaxSearchDepth())) { for (InvocationSequenceData child : invocSequence.getNestedSequences()) { name = extractNameDynamically(child, cachedDataService, depth + 1); if (null != name) { return name; } } } } return name; }
reset(); validationManager.reset(); NameExtractionExpression nameExtractionExpression = businessTransaction.getNameExtractionExpression(); if (null != nameExtractionExpression) { extractNameCheckbox.setSelection(true);
/** * {@inheritDoc} */ @Override protected StyledString getStyledText(Object element, int index) { if (element instanceof BusinessTransactionDefinition) { BusinessTransactionDefinition bTxDef = (BusinessTransactionDefinition) element; switch (index) { case 0: return new StyledString(bTxDef.getBusinessTransactionDefinitionName()); case 1: if (bTxDef.dynamicNameExtractionActive()) { StyledString result = new StyledString("Pattern: "); result.append(new StyledString(bTxDef.getNameExtractionExpression().getTargetNamePattern(), StyledString.QUALIFIER_STYLER)); return result; } else { return new StyledString(bTxDef.getBusinessTransactionDefinitionName()); } case 2: return EMPTY; case 3: return new StyledString((bTxDef.getDescription() != null) ? bTxDef.getDescription() : ""); default: return EMPTY; } } return EMPTY; }