/** * @since 1.14 */ public default String build(final ComponentType componentType) { return this.build(componentType.getPackage(), componentType.getName()); }
@Override protected IVertex addVertex(final DeployedOperation deployedOperation) { final OperationType operation = deployedOperation.getAssemblyOperation().getOperationType(); final ComponentType component = operation.getComponentType(); final int componentId = this.identifierRegistry.getIdentifier(component); final IVertex componentVertex = this.graph.addVertexIfAbsent(componentId); componentVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.COMPONENT_TYPE); componentVertex.setPropertyIfAbsent(PropertyKeys.NAME, component.getName()); componentVertex.setPropertyIfAbsent(PropertyKeys.PACKAGE_NAME, component.getPackage()); this.responseTimeDecorator.decorate(componentVertex, component); return componentVertex; }
private void testExtraction(final String packageName, final String name) { // NOPMD (assert for other tests) final ComponentType componentType = this.buildComponentTypeByNames(packageName, name); this.signatureExtractor.extract(componentType); final String extractedPackage = componentType.getPackage(); final String extractedName = componentType.getName(); Assert.assertEquals(packageName, extractedPackage); Assert.assertEquals(name, extractedName); }
@Override protected IVertex addVertex(final DeployedOperation deployedOperation) { final AssemblyOperation operation = deployedOperation.getAssemblyOperation(); final AssemblyComponent component = operation.getAssemblyComponent(); final int componentId = this.identifierRegistry.getIdentifier(component); final IVertex componentVertex = this.graph.addVertexIfAbsent(componentId); componentVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.ASSEMBLY_COMPONENT); componentVertex.setPropertyIfAbsent(PropertyKeys.NAME, component.getComponentType().getName()); componentVertex.setPropertyIfAbsent(PropertyKeys.PACKAGE_NAME, component.getComponentType().getPackage()); this.responseTimeDecorator.decorate(componentVertex, component); return componentVertex; }
@Override protected IVertex addVertex(final DeployedOperation deployedOperation) { final DeployedOperation operation = deployedOperation; final DeployedComponent component = operation.getComponent(); final DeploymentContext context = component.getDeploymentContext(); final int contextId = this.identifierRegistry.getIdentifier(context); final IVertex contextVertex = this.graph.addVertexIfAbsent(contextId); contextVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.DEPLOYMENT_CONTEXT); contextVertex.setPropertyIfAbsent(PropertyKeys.NAME, context.getName()); final IGraph contextSubgraph = contextVertex.addChildGraphIfAbsent(); final int componentId = this.identifierRegistry.getIdentifier(component); final IVertex componentVertex = contextSubgraph.addVertexIfAbsent(componentId); componentVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.DEPLOYED_COMPONENT); componentVertex.setPropertyIfAbsent(PropertyKeys.NAME, component.getAssemblyComponent().getComponentType().getName()); componentVertex.setPropertyIfAbsent(PropertyKeys.PACKAGE_NAME, component.getAssemblyComponent().getComponentType().getPackage()); this.responseTimeDecorator.decorate(componentVertex, component); return componentVertex; }
@Override protected IVertex addVertex(final DeployedOperation deployedOperation) { final OperationType operation = deployedOperation.getAssemblyOperation().getOperationType(); final ComponentType component = operation.getComponentType(); final int componentId = this.identifierRegistry.getIdentifier(component); final IVertex componentVertex = this.graph.addVertexIfAbsent(componentId); componentVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.COMPONENT_TYPE); componentVertex.setPropertyIfAbsent(PropertyKeys.NAME, component.getName()); componentVertex.setPropertyIfAbsent(PropertyKeys.PACKAGE_NAME, component.getPackage()); final IGraph componentSubgraph = componentVertex.addChildGraphIfAbsent(); final int operationId = this.identifierRegistry.getIdentifier(operation); final IVertex operationVertex = componentSubgraph.addVertexIfAbsent(operationId); operationVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.OPERATION_TYPE); operationVertex.setPropertyIfAbsent(PropertyKeys.NAME, operation.getName()); operationVertex.setPropertyIfAbsent(PropertyKeys.RETURN_TYPE, operation.getReturnType()); operationVertex.setPropertyIfAbsent(PropertyKeys.MODIFIERS, operation.getModifiers()); operationVertex.setPropertyIfAbsent(PropertyKeys.PARAMETER_TYPES, operation.getParameterTypes()); this.responseTimeDecorator.decorate(operationVertex, operation); return operationVertex; }
private IVertex addVertex(final OperationCall operationCall) { final int vertexId = this.objectIdentifierRegistry.getIdentifier(operationCall); final IVertex vertex = this.graph.addVertex(vertexId); final OperationType operationType = operationCall.getOperation().getAssemblyOperation().getOperationType(); final ComponentType componentType = operationType.getComponentType(); final DeploymentContext deploymentContext = operationCall.getOperation().getComponent().getDeploymentContext(); vertex.setProperty("name", operationType.getName()); vertex.setProperty("returnType", operationType.getReturnType()); vertex.setProperty("modifiers", operationType.getModifiers()); vertex.setProperty("parameterTypes", operationType.getParameterTypes()); vertex.setProperty("component", componentType.getName()); vertex.setProperty("package", componentType.getPackage()); vertex.setProperty("deploymentContext", deploymentContext.getName()); vertex.setProperty("stackDepth", operationCall.getStackDepth()); // ... maybe further parameters return vertex; }
@Override protected IVertex addVertex(final DeployedOperation deployedOperation) { final DeployedOperation operation = deployedOperation; final DeployedComponent component = operation.getComponent(); final DeploymentContext context = component.getDeploymentContext(); final int contextId = this.identifierRegistry.getIdentifier(context); final IVertex contextVertex = this.graph.addVertexIfAbsent(contextId); contextVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.DEPLOYMENT_CONTEXT); contextVertex.setPropertyIfAbsent(PropertyKeys.NAME, context.getName()); final IGraph contextSubgraph = contextVertex.addChildGraphIfAbsent(); contextSubgraph.setName(context.getName()); final int componentId = this.identifierRegistry.getIdentifier(component); final IVertex componentVertex = contextSubgraph.addVertexIfAbsent(componentId); componentVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.DEPLOYED_COMPONENT); componentVertex.setPropertyIfAbsent(PropertyKeys.NAME, component.getAssemblyComponent().getComponentType().getName()); componentVertex.setPropertyIfAbsent(PropertyKeys.PACKAGE_NAME, component.getAssemblyComponent().getComponentType().getPackage()); final IGraph componentSubgraph = componentVertex.addChildGraphIfAbsent(); componentSubgraph.setName(component.getAssemblyComponent().getComponentType().getName()); final int operationId = this.identifierRegistry.getIdentifier(operation); final IVertex operationVertex = componentSubgraph.addVertexIfAbsent(operationId); operationVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.DEPLOYED_OPERATION); operationVertex.setPropertyIfAbsent(PropertyKeys.NAME, operation.getAssemblyOperation().getOperationType().getName()); operationVertex.setPropertyIfAbsent(PropertyKeys.RETURN_TYPE, operation.getAssemblyOperation().getOperationType().getReturnType()); operationVertex.setPropertyIfAbsent(PropertyKeys.MODIFIERS, operation.getAssemblyOperation().getOperationType().getModifiers()); operationVertex.setPropertyIfAbsent(PropertyKeys.PARAMETER_TYPES, operation.getAssemblyOperation().getOperationType().getParameterTypes()); this.responseTimeDecorator.decorate(operationVertex, operation); return operationVertex; }
@Override protected IVertex addVertex(final DeployedOperation deployedOperation) { final AssemblyOperation operation = deployedOperation.getAssemblyOperation(); final AssemblyComponent component = operation.getAssemblyComponent(); final int componentId = this.identifierRegistry.getIdentifier(component); final IVertex componentVertex = this.graph.addVertexIfAbsent(componentId); componentVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.ASSEMBLY_COMPONENT); componentVertex.setPropertyIfAbsent(PropertyKeys.NAME, component.getComponentType().getName()); componentVertex.setPropertyIfAbsent(PropertyKeys.PACKAGE_NAME, component.getComponentType().getPackage()); final IGraph componentSubgraph = componentVertex.addChildGraphIfAbsent(); final int operationId = this.identifierRegistry.getIdentifier(operation); final IVertex operationVertex = componentSubgraph.addVertexIfAbsent(operationId); operationVertex.setPropertyIfAbsent(PropertyKeys.TYPE, VertexType.ASSEMBLY_OPERATION); operationVertex.setPropertyIfAbsent(PropertyKeys.NAME, operation.getOperationType().getName()); operationVertex.setPropertyIfAbsent(PropertyKeys.RETURN_TYPE, operation.getOperationType().getReturnType()); operationVertex.setPropertyIfAbsent(PropertyKeys.MODIFIERS, operation.getOperationType().getModifiers()); operationVertex.setPropertyIfAbsent(PropertyKeys.PARAMETER_TYPES, operation.getOperationType().getParameterTypes()); this.responseTimeDecorator.decorate(operationVertex, operation); return operationVertex; }