java.lang.Object
edu.university.ecs.lab.detection.architecture.models.AbstractAR
edu.university.ecs.lab.detection.architecture.models.AR24
All Implemented Interfaces:
JsonSerializable

public class AR24 extends AbstractAR
Architectural Rule 24 Class: No Health Checks Found
  • Field Details

  • Constructor Details

    • AR24

      public AR24()
  • Method Details

    • getName

      public String getName()
      Description copied from class: AbstractAR
      Get the name of the Architectural Rule
      Specified by:
      getName in class AbstractAR
      Returns:
      string name of the Architectural Rule
    • getDescription

      public String getDescription()
      Description copied from class: AbstractAR
      Get the description of the Architectural Rule
      Specified by:
      getDescription in class AbstractAR
      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 class AbstractAR
      Returns:
      double weight of the Architectural Rule
    • getType

      public String getType()
      Description copied from class: AbstractAR
      Get the new commitID
      Specified by:
      getType in class AbstractAR
      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 class AbstractAR
      Returns:
      JSON object meta data of the Architectural Rule
    • scan

      public static List<AR24> scan(Delta delta, MicroserviceSystem oldSystem, MicroserviceSystem newSystem)
      Scan and compare old microservice system and new microservice system to check for health check configuration
      Parameters:
      delta - change between old commit and new microservice systems
      oldSystem - old commit of microservice system
      newSystem - new commit of microservice system
      Returns:
    • checkHealthcheck

      public static AR24 checkHealthcheck(Delta delta, ConfigFile configFile, MicroserviceSystem oldSystem, MicroserviceSystem newSystem)
      Checks if both circuit breaker and rate limiter health checks are enabled in the YAML configuration.
      Parameters:
      delta - change between old commit and new microservice systems
      configFile - The YAML file to check.
      oldSystem - old commit of microservice system
      newSystem - new commit of microservice system
      Returns:
      AR24 object if no health check configuration is found, null otherwise
    • containsHealthCheck

      private static boolean containsHealthCheck(com.google.gson.JsonObject data)
      Checks if the given JSON object contains the necessary configurations for health checks. Specifically, it verifies if both circuit breaker and rate limiter health checks are enabled and if the health indicators are registered for both circuit breakers and rate limiters.
      Parameters:
      data - The JsonObject representing the configuration data to check.
      Returns:
      true if the necessary health check configurations are present and enabled, false otherwise.