Resolved conflicts of PR GEPAFINBE-6139 (Reviewed Evaluation Process)
This commit is contained in:
@@ -15,26 +15,27 @@ public class S3PathConfig {
|
||||
@Autowired
|
||||
S3ConfigRepository s3ConfigRepository;
|
||||
|
||||
public String generateDocumentPath(DocumentSourceTypeEnum type, Long callId, Long applicationId,Long amendmentId) {
|
||||
public String generateDocumentPath(DocumentSourceTypeEnum type, Long callId, Long applicationId,Long amendmentId,Long communicationId) {
|
||||
|
||||
S3ConfigEntity config = getDocumentPath(type);
|
||||
return config.getParentFolder() + "/" + buildS3Path(config.getPath(), callId, applicationId,amendmentId);
|
||||
return config.getParentFolder() + "/" + buildS3Path(config.getPath(), callId, applicationId,amendmentId,communicationId);
|
||||
}
|
||||
public String generateDocumentPathForOther(DocOtherSourceTypeEnum type, Long callId, Long applicationId,Long amendmentId) {
|
||||
public String generateDocumentPathForOther(DocOtherSourceTypeEnum type, Long callId, Long applicationId,Long amendmentId,Long communicationId) {
|
||||
|
||||
S3ConfigEntity config = getDocumentPathForOther(type);
|
||||
return config.getParentFolder() + "/" + buildS3Path(config.getPath(), callId, applicationId,amendmentId);
|
||||
return config.getParentFolder() + "/" + buildS3Path(config.getPath(), callId, applicationId,amendmentId,communicationId);
|
||||
}
|
||||
public String generateDocumentPathForDelegationAndSignedDocument(DocOtherSourceTypeEnum type) {
|
||||
|
||||
S3ConfigEntity config = getDocumentPathForOther(type);
|
||||
return config.getParentFolder() + "/" + config.getPath();
|
||||
}
|
||||
private String buildS3Path(String pathTemplate, Long callId, Long applicationId, Long amendmentId) {
|
||||
private String buildS3Path(String pathTemplate, Long callId, Long applicationId, Long amendmentId,Long communicationId) {
|
||||
return pathTemplate
|
||||
.replace("{call_id}", callId != null && callId != 0L ? "call_" + callId : "")
|
||||
.replace("{application_id}", applicationId != null && applicationId != 0L ? "application_" + applicationId : "")
|
||||
.replace("{amendment_id}", amendmentId != null && amendmentId != 0L ? "amendment_" + amendmentId : "");
|
||||
.replace("{amendment_id}", amendmentId != null && amendmentId != 0L ? "amendment_" + amendmentId : "")
|
||||
.replace("{communication_id}", communicationId != null && communicationId != 0L ? "communication_" + communicationId : "");
|
||||
}
|
||||
|
||||
private S3ConfigEntity getDocumentPath(DocumentSourceTypeEnum type) {
|
||||
|
||||
Reference in New Issue
Block a user