java.lang.Object
edu.university.ecs.lab.intermediate.merge.services.MergeService

public class MergeService extends Object
This class is used for creating new IR's from old IR + Delta and provides all functionality related to updating the old IR
  • Field Details

    • config

      private final Config config
    • microserviceSystem

      private final MicroserviceSystem microserviceSystem
    • systemChange

      private final SystemChange systemChange
    • outputPath

      private final String outputPath
  • Constructor Details

    • MergeService

      public MergeService(String intermediatePath, String deltaPath, String configPath, String outputPath)
  • Method Details

    • generateMergeIR

      public void generateMergeIR(String newCommitID)
      This method generates the new IR from the old IR + Delta file
    • addFile

      public void addFile(Delta delta)
      This method adds a JClass based on a Delta change
      Parameters:
      delta - the delta change for adding
    • removeFile

      public void removeFile(Delta delta)
      This method removes a JClass based on a Delta change Note it might not be found, so it will handle this gracefully
      Parameters:
      delta - the delta change for removal
    • updateMicroservices

      private void updateMicroservices()
      Method for updating MicroserviceSystem structure (microservices) based on pom.xml changes in Delta file
    • filterBuildDeltas

      private List<Delta> filterBuildDeltas()
      Filter's the delta files that deal with building project so either pom.xml or build.gradle
      Returns:
      a list of system changes that deal with build files that aren't modifications
    • getMicroserviceNameFromPath

      private String getMicroserviceNameFromPath(String path)