add get-re-status
This commit is contained in:
@@ -131,4 +131,10 @@ public class TestController {
|
||||
public ResponseEntity<Object> getParseStatus(@RequestParam String id){
|
||||
return parserModuleService.getJavaParseStatusDetails(id);
|
||||
}
|
||||
|
||||
@GetMapping("/get-re-status")
|
||||
public ResponseEntity<Object> getRevStatus(@RequestParam String id){
|
||||
return reModuleService.getJavaRevStatusDetails(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Service
|
||||
public class REModuleService {
|
||||
@@ -45,4 +44,15 @@ public class REModuleService {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public ResponseEntity<Object> getJavaRevStatusDetails(String repositoryEntityId){
|
||||
KSGitInfo ksGitInfo = ksGitInfoRepository.findById(repositoryEntityId).get();
|
||||
String revProcessId = ksGitInfo.getRevEngineeringStatuses().stream()
|
||||
.filter(statuses -> "Java".equalsIgnoreCase(statuses.getType()))
|
||||
.findFirst().get().getRevProcessId();
|
||||
|
||||
return javaREModule.getProcessStatus(revProcessId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user