Skip to content
ChaunceyJ edited this page Jan 8, 2020 · 8 revisions

Detailed Design (详细设计规约)

Process Flow Design (过程流设计)

用例:上传 json 文件

uploadYaml

用例:添加新系统

uploadYaml

用例:查看实体/关系信息

uploadYaml

用例:查看kpi分析

uploadYaml

Class Design (类设计)

Package Diagram

package

class

File Upload Module

cla_upload

FileController

controller

public class FileController

The uploading file controller in the system.

Fields

Modifier and Type Field Description
private Neo4jController neo4jController neo4j database controller

Methods

postType

public Map<String, Object> postType(HttpServletRequest request, HttpServletResponse response, @RequestParam("name") String name)

Deal the system ontology file.

returns

Map<String, Object>

parameters

HttpServletRequest request, HttpServletResponse response,String name

postSystem

public Map<String, Object> postSystem(HttpServletRequest request, HttpServletResponse response, String name,String type)

Deal system instance file.

returns

Map<String, Object>

parameters

HttpServletRequest request, HttpServletResponse response, String name,String type


Neo4jController

package

neo4jcontroller

public class Neo4jController

The neo4j database controller in the system.

Fields

Modifier and Type Field Description
private NodeDAO nodeDAO Node data access object
private RelationDAO relationDAO Relation data access object

Methods

sendEvent

public void sendEvent(String type,String time,String situation,String timeout,String command,String id)

add event node and then build the relationship between the event and the inject target node.

returns

void

parameters

String type,String time,String situation,String timeout,String command,String id

fileupdate

public String fileupdate(HttpServletRequest request,HttpServletResponse response, MultipartFile file, String system)

update system file.

returns

file access path

parameters

HttpServletRequest request,HttpServletResponse response, MultipartFile file, String system

Methods

importTtl

public void importTtl(String typePath, String systemPath)

import ttl file

returns

void

parameters

String typePath, String systemPath

addServiceNode

public int addServiceNode(String label, String port, String name, String nameSpace, String targetPort)

Add service node.

returns

node ID

parameters

String label, String port, String name, String nameSpace, String targetPort

addSystemNode

public int addSystemNode(String name)

Add system node.

returns

node ID

parameters

String name

addYamlRelation

public HashMap<String, Object> addYamlRelation(int deploymentID, int containnerID, int serviceID, int systemID)

Add relation of node included in yaml file.

returns

information of relation

parameters

int deploymentID, int containnerID, int serviceID, int systemID

addMetricNode

*public HashMap addMetricNode(String type, String podName, String metricName, String dataName, String relationName) *

Add metric node.

returns

node information

parameters

String type, String podName, String metricName, String dataName, String relationName

addMetricRelation

public HashMap<String, Object> addMetricRelation(int sourceID, int targetID, String relationship)

Add metric relation.

returns

relation information

parameters

int sourceID, int targetID, String relationship

addDataSetNode

public Boolean addDataSetNode(String filePath, String name, String system)

Add data set node.

returns

node information

parameters

String filePath, String name, String system

addServiceRelation

public Boolean addServiceRelation(String name, ArrayList<String> arrList)

Add service relation.

returns

relation information

parameters

String name, ArrayList<String> arrList

getLabel

public HashMap<String, List<HasMap<String, Object>>> getLable(String label)

Get.

returns

All nodes which have the same label and their relations.

parameters

String label

csvOperationData

public HashMap<String, ArrayList> csvOperationData(String filePath)

Get operation data time serial diagram needs.

returns

All operation data.

parameters

String filePath

podToMetric

public Boolean podToMetric(String type, int ID, String podName)

add pod to metric relation.

returns

success/fail

parameters

String type, int ID, String podName

metricToDataset

public Boolean metricToDataset(int ID, String dataBaseName, String, resultName)

add metric to dataset relation.

returns

success/fail

parameters

int ID, String dataBaseName, String, resultName


Relation Input Module

iputre

InputRelController

controller

public class InputRelController

The relation input controller in the system.

Fields

Modifier and Type Field Description
private Neo4jController neo4jController neo4j database controller

Methods

addMetric

public HashMap addMetric(String type, String podName, String metricName, String datasetName, String relationName)

Add the metric node.

returns

The information of the newly added metric node.

parameters

String type, String podName, String metricName, String datasetName, String relationName


View Information Module

view

ViewController

controller

public class ViewController

The information view controller in the system.

Fields

Modifier and Type Field Description
private Neo4jController neo4jController neo4j database controller

Methods

getEntitiesAndRelations

public HashMap<String, List<HasMap<String, Object>>> getEntitiesAndRelations(String entityName)

Get all nodes which have the same label.

returns

All nodes which have the same label and their relations.

parameters

String entityName

addMetric

public HashMap<String, List<HasMap<String, List>>> getOperationData(String datasetName)

Get operation data time serial diagram needs.

returns

All operation data.

parameters

String datasetName


Neo4jDAO

dao

DAO

public class Neo4jDAO

The relation access object in the system.

Methods

getNodeAndLink

  • public Map getNodeAndLink(String systemName)*

parameters

String systemName

get all nodes and links in the neo4j database that related to the provided system node.


Clone this wiki locally