1
1
package it .gov .pagopa .pu .fileshare .service .ingestion ;
2
2
3
3
import it .gov .pagopa .pu .fileshare .config .FoldersPathsConfig ;
4
- import it .gov .pagopa .pu .fileshare .connector .processexecutions .client . IngestionFlowFileClient ;
4
+ import it .gov .pagopa .pu .fileshare .connector .processexecutions .IngestionFlowFileService ;
5
5
import it .gov .pagopa .pu .fileshare .dto .FileResourceDTO ;
6
6
import it .gov .pagopa .pu .fileshare .dto .generated .FileOrigin ;
7
7
import it .gov .pagopa .pu .fileshare .dto .generated .IngestionFlowFileType ;
28
28
29
29
@ Slf4j
30
30
@ Service
31
- public class IngestionFlowFileServiceImpl implements IngestionFlowFileService {
31
+ public class IngestionFlowFileFacadeServiceImpl implements IngestionFlowFileFacadeService {
32
32
private final UserAuthorizationService userAuthorizationService ;
33
33
private final FileService fileService ;
34
34
private final FileStorerService fileStorerService ;
35
35
private final FoldersPathsConfig foldersPathsConfig ;
36
- private final IngestionFlowFileClient ingestionFlowFileClient ;
36
+ private final IngestionFlowFileService ingestionFlowFileService ;
37
37
private final IngestionFlowFileDTOMapper ingestionFlowFileDTOMapper ;
38
38
private final String validIngestionFlowFileExt ;
39
39
private final String archivedSubFolder ;
40
40
41
- public IngestionFlowFileServiceImpl (
41
+ public IngestionFlowFileFacadeServiceImpl (
42
42
UserAuthorizationService userAuthorizationService ,
43
43
FileService fileService ,
44
44
FileStorerService fileStorerService ,
45
45
FoldersPathsConfig foldersPathsConfig ,
46
- IngestionFlowFileClient ingestionFlowFileClient ,
46
+ IngestionFlowFileService ingestionFlowFileService ,
47
47
IngestionFlowFileDTOMapper ingestionFlowFileDTOMapper ,
48
48
@ Value ("${uploads.ingestion-flow-file.valid-extension}" ) String validIngestionFlowFileExt ,
49
- @ Value ("${folders.process-target-sub-folders.archive}" ) String archivedSubFolder ) {
49
+ @ Value ("${folders.process-target-sub-folders.archive}" ) String archivedSubFolder
50
+ ) {
50
51
this .userAuthorizationService = userAuthorizationService ;
51
52
this .fileService = fileService ;
52
53
this .fileStorerService = fileStorerService ;
53
54
this .foldersPathsConfig = foldersPathsConfig ;
54
- this .ingestionFlowFileClient = ingestionFlowFileClient ;
55
+ this .ingestionFlowFileService = ingestionFlowFileService ;
55
56
this .ingestionFlowFileDTOMapper = ingestionFlowFileDTOMapper ;
56
57
this .validIngestionFlowFileExt = validIngestionFlowFileExt ;
57
58
this .archivedSubFolder = archivedSubFolder ;
@@ -73,7 +74,7 @@ public Long uploadIngestionFlowFile(Long organizationId, IngestionFlowFileType i
73
74
String filePath = fileStorerService .saveToSharedFolder (organizationId , ingestionFlowFile ,
74
75
ingestionFlowFilePath , fileName );
75
76
76
- return ingestionFlowFileClient .createIngestionFlowFile (
77
+ return ingestionFlowFileService .createIngestionFlowFile (
77
78
ingestionFlowFileDTOMapper .mapToIngestionFlowFileDTO (ingestionFlowFile ,
78
79
ingestionFlowFileType , fileOrigin , organizationId , filePath )
79
80
, accessToken );
@@ -83,7 +84,7 @@ public Long uploadIngestionFlowFile(Long organizationId, IngestionFlowFileType i
83
84
public FileResourceDTO downloadIngestionFlowFile (Long organizationId , Long ingestionFlowFileId , UserInfo user , String accessToken ) {
84
85
userAuthorizationService .checkUserAuthorization (organizationId , user , accessToken );
85
86
86
- IngestionFlowFile ingestionFlowFile = ingestionFlowFileClient .getIngestionFlowFile (ingestionFlowFileId , accessToken );
87
+ IngestionFlowFile ingestionFlowFile = ingestionFlowFileService .getIngestionFlowFile (ingestionFlowFileId , accessToken );
87
88
88
89
Path filePath = getFilePath (ingestionFlowFile );
89
90
0 commit comments