-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequestService.java
More file actions
35 lines (29 loc) · 1.36 KB
/
RequestService.java
File metadata and controls
35 lines (29 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package de.tum.cit.aet.dataProcessing.service;
import de.tum.cit.aet.repositoryProcessing.dto.TeamRepositoryDTO;
import de.tum.cit.aet.repositoryProcessing.service.RepositoryFetchingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Slf4j
public class RequestService {
private final RepositoryFetchingService repositoryFetchingService;
@Autowired
public RequestService(RepositoryFetchingService repositoryFetchingService) {
this.repositoryFetchingService = repositoryFetchingService;
}
/**
* Fetches and clones all repositories from Artemis using dynamic credentials.
*
* @param serverUrl The Artemis server URL
* @param jwtToken The JWT token
* @param username The username (optional, for fallback)
* @param password The password (optional, for fallback)
* @return List of TeamRepositoryDTO containing repository information
*/
public List<TeamRepositoryDTO> fetchAndCloneRepositories(String serverUrl, String jwtToken, String username, String password) {
log.info("RequestService: Initiating repository fetch and clone process (Dynamic Auth)");
return repositoryFetchingService.fetchAndCloneRepositories(serverUrl, jwtToken, username, password);
}
}