Class Microservice
java.lang.Object
edu.university.ecs.lab.common.models.ir.Microservice
- All Implemented Interfaces:
JsonSerializable
Represents the overarching structure of a microservice system. It is composed of classes which
hold all information in that class.
-
Field Summary
Modifier and TypeFieldDescriptionController classes belonging to the microservice.Entity classes belonging to the microservice.Feign client classes belonging to the microservice.private final Set<ConfigFile>
Static files belonging to the microservice.private String
The name of the service (ex: "ts-assurance-service")private String
The path to the folder that represents the microserviceRepository classes belonging to the microservice.Service classes to the microservice. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Update's the microservice name of the JClass and add's it to the appropriate SetThis method returns all files of a microservice, it is the aggregate of getClasses() and getFiles()This method returns all classes of the microservice in a new setThis method returns all endpoints of a microserviceThis method returns all method calls of a microserviceThis method returns all methods of a microserviceThis method returns all rest calls of a microservicevoid
removeJClass
(String path) This method removes a JClass from the microservice by looking up it's pathvoid
removeProjectFile
(String filePath) This method removes a ProjectFile from the microservice by looking up it's pathprivate static com.google.gson.JsonArray
toJsonArray
(Iterable<com.google.gson.JsonObject> list) com.google.gson.JsonObject
-
Field Details
-
name
The name of the service (ex: "ts-assurance-service") -
path
The path to the folder that represents the microservice -
controllers
Controller classes belonging to the microservice. -
services
Service classes to the microservice. -
repositories
Repository classes belonging to the microservice. -
entities
Entity classes belonging to the microservice. -
feignClients
Feign client classes belonging to the microservice. -
files
Static files belonging to the microservice.
-
-
Constructor Details
-
Microservice
-
-
Method Details
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()- Specified by:
toJsonObject
in interfaceJsonSerializable
- Returns:
- a JsonObject representing this
-
toJsonArray
- Returns:
-
addJClass
Update's the microservice name of the JClass and add's it to the appropriate Set- Parameters:
jClass
- the JClass to add
-
removeJClass
This method removes a JClass from the microservice by looking up it's path- Parameters:
path
- the path to search for removal
-
removeProjectFile
This method removes a ProjectFile from the microservice by looking up it's path- Parameters:
filePath
- the path to search for
-
getClasses
This method returns all classes of the microservice in a new set- Returns:
- the set of all JClasses
-
getAllFiles
This method returns all files of a microservice, it is the aggregate of getClasses() and getFiles()- Returns:
- the set of all classes and files
-
getRestCalls
This method returns all rest calls of a microservice- Returns:
- the list of all rest calls
-
getEndpoints
This method returns all endpoints of a microservice- Returns:
- the set of all endpoints
-
getMethodCalls
This method returns all method calls of a microservice- Returns:
- the set of all method calls
-
getMethods
This method returns all methods of a microservice- Returns:
- the set of all methods
-