@Override protected EndPointAnalysis makeEndPoint(Frame lifecycleFrame, int depth) { Operation op = lifecycleFrame.getOperation(); String endPointExample = op.get("event", String.class); return new EndPointAnalysis(ENDPOINT_NAME, ENDPOINT_LABEL, endPointExample, getOperationScore(op, depth), op); } }
@Override protected EndPointAnalysis makeEndPoint(Frame dispatchFrame, int depth) { Operation op=dispatchFrame.getOperation(); String label=op.getLabel(); EndPointName name=EndPointName.valueOf(label.replace('/', '_')); return new EndPointAnalysis(name, label, label, getOperationScore(op, depth), op); } }
@Override protected EndPointAnalysis makeEndPoint(Frame controllerFrame, int depth) { Operation controllerOp = controllerFrame.getOperation(); String examplePath = EndPointAnalysis.getHttpExampleRequest(controllerFrame); EndPointName endPointName = EndPointName.valueOf(controllerOp); String endPointLabel = controllerOp.getLabel(); return new EndPointAnalysis(endPointName, endPointLabel, examplePath, getOperationScore(controllerOp, depth), controllerOp); } }
@Override protected EndPointAnalysis makeEndPoint(Frame frame, int depth) { Operation op=frame.getOperation(); return new EndPointAnalysis(EndPointName.valueOf(op), op.getLabel(), op.getLabel(), getOperationScore(op, depth), op); }
@Override protected EndPointAnalysis makeEndPoint(Frame frame, int depth) { Operation op=frame.getOperation(); EndPointName endPointName=EndPointName.valueOf(op); String example=EndPointAnalysis.getHttpExampleRequest(frame); return new EndPointAnalysis(endPointName, op.getLabel(), example, getOperationScore(op, depth), op); } }
@Override protected EndPointAnalysis makeEndPoint(Frame si, int depth) { Operation op = si.getOperation(); String exampleRequest = op.get(SpringIntegrationDefinitions.SI_COMPONENT_TYPE_ATTR, String.class); String opLabel = op.getLabel(); EndPointName name = EndPointName.valueOf(opLabel); String label = name.getName(); return new EndPointAnalysis(name, label, exampleRequest, ANALYSIS_SCORE, op); } }
@Override protected EndPointAnalysis makeEndPoint(Frame grailsFrame, int depth) { Operation operation = grailsFrame.getOperation(); String resourceKey = makeResourceKey(operation.getSourceCodeLocation()); String resourceLabel = operation.getLabel(); String exampleRequest = EndPointAnalysis.getHttpExampleRequest(grailsFrame); return new EndPointAnalysis(EndPointName.valueOf(resourceKey), resourceLabel, exampleRequest, getOperationScore(operation, depth), operation); }
public EndPointAnalysis locateEndPoint(Trace trace) { Frame root = trace.getRootFrame(); if (root == null) { return null; } Operation rootOp = root.getOperation(); if (!rootOp.getType().equals(TYPE)) { return null; } EndPointName name = EndPointName.valueOf(rootOp.getSourceCodeLocation().getClassName() + "#" + rootOp.get("methodSignature")); String label = rootOp.getLabel(); String exampleRequest = ""; OperationList args = rootOp.get("arguments", OperationList.class); if (args.size() == 1) { exampleRequest = args.get(0, String.class); } int score = 0; return new EndPointAnalysis(root.getRange(), name, label, exampleRequest, score); } }
@Override protected EndPointAnalysis makeEndPoint(Frame httpFrame, int depth) { Operation op = httpFrame.getOperation(); OperationMap request = op.get("request", OperationMap.class); String servletName=(request == null) ? null : request.get("servletName", String.class); String endPointKey=sanitizeEndPointKey(servletName); String endPointLabel = "Servlet: " + servletName; String example=EndPointAnalysis.createHttpExampleRequest(request); if (StringUtil.isEmpty(example)) { example = op.getLabel(); } return new EndPointAnalysis(EndPointName.valueOf(endPointKey), endPointLabel, example, getOperationScore(op, depth), op); }
@Override protected EndPointAnalysis makeEndPoint(Frame blazeFrame, int depth) { Operation blazeOp = blazeFrame.getOperation(); String examplePath = getExamplePath(FrameUtil.getLastParentOfType(blazeFrame, OperationType.HTTP), blazeOp); String endPointLabel = "BlazeDS: " + blazeOp.getLabel(); // The logical thing would be for the endPointName to be equals to the endPointLabel (or operationLabel) // but when the op label contains a url (as in the case of HTTPProxyService) // the endPointName ends up containing special characters which interfere with displaying it in the UI // So - we have the operations themselves report what the endPointName should be // (which is the operation label minus the url if exists) String endPointNameString = blazeOp.get("endPointName", String.class); EndPointName endPointName=StringUtil.isEmpty(endPointNameString) ? EndPointName.valueOf(blazeOp) : EndPointName.valueOf(endPointNameString) ; return new EndPointAnalysis(endPointName, endPointLabel, examplePath, getOperationScore(blazeOp, depth), blazeOp); }