Class MicroserviceSystem
java.lang.Object
edu.university.ecs.lab.common.models.MicroserviceSystem
- All Implemented Interfaces:
JsonSerializable
Represents the intermediate structure of a microservice system.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adopt
(Microservice microservice) Given a new or modified microservice, we must adopt awaiting orphans based on their file paths containing the microservices (folder) pathfindMicroserviceByName
(String name) Returns the microservice that matches the passed namevoid
orphanize
(Microservice microservice) Given an existing microservice, if it must now be orphanized then all JClasses belonging to that service will be added to the system's pool of orphans for later usecom.google.gson.JsonObject
Construct a JSON object representing the given ms system name, version, and microservice data map.
-
Field Details
-
INITIAL_VERSION
- See Also:
-
-
Constructor Details
-
MicroserviceSystem
public MicroserviceSystem()
-
-
Method Details
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()Construct a JSON object representing the given ms system name, version, and microservice data map.- Specified by:
toJsonObject
in interfaceJsonSerializable
- Returns:
- the constructed JSON object
-
findMicroserviceByName
Returns the microservice that matches the passed name- Parameters:
name
- the name to search for- Returns:
- microservice whose name matches or null if not found
-
orphanize
Given an existing microservice, if it must now be orphanized then all JClasses belonging to that service will be added to the system's pool of orphans for later use- Parameters:
microservice
- the microservice to orphanize
-
adopt
Given a new or modified microservice, we must adopt awaiting orphans based on their file paths containing the microservices (folder) path- Parameters:
microservice
- the microservice adopting orphans
-