Class AR23
java.lang.Object
edu.university.ecs.lab.detection.architecture.models.AbstractAR
edu.university.ecs.lab.detection.architecture.models.AR23
- All Implemented Interfaces:
JsonSerializable
Architectureal Rule 23 Class: No API Gateway Found
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AR23
checkforApiGateway
(Delta delta, ConfigFile configFile, MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Checks if the YAML file contains configuration indicating an API Gateway.private static boolean
containsApiGatewayConfiguration
(com.google.gson.JsonObject data) Checks if JSON object contains API gateway configuration detailsGet the description of the Architectural Rulecom.google.gson.JsonObject
Get the meta data of the Architectural RulegetName()
Get the name of the Architectural RulegetType()
Get the new commitIDdouble
Get the weight of the Architectural Rulescan
(Delta delta, MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Scan and compare old microservice system and new microservice system to check for API gatewayMethods inherited from class edu.university.ecs.lab.detection.architecture.models.AbstractAR
getNewCommitID, getOldCommitID, toJsonObject
-
Field Details
-
TYPE
Architectural rule 23 details- See Also:
-
NAME
- See Also:
-
DESC
- See Also:
-
CONFIDENCE
-
oldCommitID
-
newCommitID
-
metaData
protected com.google.gson.JsonObject metaData
-
-
Constructor Details
-
AR23
public AR23()
-
-
Method Details
-
getName
Description copied from class:AbstractAR
Get the name of the Architectural Rule- Specified by:
getName
in classAbstractAR
- Returns:
- string name of the Architectural Rule
-
getDescription
Description copied from class:AbstractAR
Get the description of the Architectural Rule- Specified by:
getDescription
in classAbstractAR
- Returns:
- string description of the Architectural Rule
-
getWeight
public double getWeight()Description copied from class:AbstractAR
Get the weight of the Architectural Rule- Specified by:
getWeight
in classAbstractAR
- Returns:
- double weight of the Architectural Rule
-
getType
Description copied from class:AbstractAR
Get the new commitID- Specified by:
getType
in classAbstractAR
- Returns:
- string new commitID
-
getMetaData
public com.google.gson.JsonObject getMetaData()Description copied from class:AbstractAR
Get the meta data of the Architectural Rule- Specified by:
getMetaData
in classAbstractAR
- Returns:
- JSON object meta data of the Architectural Rule
-
scan
public static List<AR23> scan(Delta delta, MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Scan and compare old microservice system and new microservice system to check for API gateway- Parameters:
delta
- change between old commit and new microservice systemsoldSystem
- old commit of microservice systemnewSystem
- new commit of microservice system- Returns:
- list with single AR23 object is no API gateway found, empty list otherwise
-
checkforApiGateway
public static AR23 checkforApiGateway(Delta delta, ConfigFile configFile, MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Checks if the YAML file contains configuration indicating an API Gateway.- Parameters:
delta
- change between old commit and new microservice systemsconfigFile
- The YAML file to check.oldSystem
- old commit of microservice systemnewSystem
- new commit of microservice system- Returns:
- AR23 object for no API gateway, otherwise null
-
containsApiGatewayConfiguration
private static boolean containsApiGatewayConfiguration(com.google.gson.JsonObject data) Checks if JSON object contains API gateway configuration details- Parameters:
data
- JSON object to check- Returns:
- true if API gateway configuration is found, false otherwise
-