Class AR4
java.lang.Object
edu.university.ecs.lab.detection.architecture.models.AbstractAR
edu.university.ecs.lab.detection.architecture.models.AR4
- All Implemented Interfaces:
JsonSerializable
Architectural Rule 4 Class: Floating endpoint
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
findMatch
(Endpoint endpoint, MicroserviceSystem newSystem) Check for modified/deleted endpoint in new systemGet the description of the Architectural RulegetEndpointsWithNoCalls
(MicroserviceSystem newSystem) This method generates a list of endpoints that have no rest callscom.google.gson.JsonObject
Get the meta data of the Architectural RulegetName()
Get the name of the Architectural RulegetRemovedRestCalls
(Delta delta, JClass oldClass) This method collects rest calls that were modified and are no longer present in the new system.getType()
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 identify last call removalscan2
(MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Scan and compare old microservice system and new microservice system to identify last call removalMethods inherited from class edu.university.ecs.lab.detection.architecture.models.AbstractAR
getNewCommitID, getOldCommitID, toJsonObject
-
Field Details
-
TYPE
Architectural rule 4 details- See Also:
-
NAME
- See Also:
-
DESC
- See Also:
-
oldCommitID
-
newCommitID
-
metaData
protected com.google.gson.JsonObject metaData
-
-
Constructor Details
-
AR4
public AR4()
-
-
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
-
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<AR4> scan(Delta delta, MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Scan and compare old microservice system and new microservice system to identify last call removal- Parameters:
delta
- change between old commit and new microservice systemsoldSystem
- old commit of microservice systemnewSystem
- new commit of microservice system- Returns:
- list of endpoints that were once called but are no longer called
-
getRemovedRestCalls
This method collects rest calls that were modified and are no longer present in the new system.- Parameters:
delta
- delta change associatedoldClass
- the delta changed class from the oldSystem- Returns:
- a set of rest calls
-
getEndpointsWithNoCalls
This method generates a list of endpoints that have no rest calls- Parameters:
newSystem
- the new system to check for endpoints- Returns:
- a list of endpoints
-
getType
Description copied from class:AbstractAR
Get the new commitID- Specified by:
getType
in classAbstractAR
- Returns:
- string new commitID
-
scan2
Scan and compare old microservice system and new microservice system to identify last call removal- Parameters:
oldSystem
- old commit of microservice systemnewSystem
- new commit of microservice system- Returns:
- list of endpoints that have no calls in new commit
-
findMatch
Check for modified/deleted endpoint in new system- Parameters:
endpoint
- to find in new systemnewSystem
- commit to search in for endpoint- Returns:
- true if a REST call is found to match the endpoint, false otherwise
-