Skip to content

Commit

Permalink
fix: solve sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelDemey committed Dec 9, 2024
1 parent 1c42830 commit 069c7fc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public interface ConceptsCollectionService {

String getCollectionMembersByID(String id) throws RmesException;

ResponseEntity<?> getCollectionExportODT(String id, String accept, ConceptsCollectionsResources.Language lg, boolean withConcepts, HttpServletResponse response) throws RmesException;
ResponseEntity getCollectionExportODT(String id, String accept, ConceptsCollectionsResources.Language lg, boolean withConcepts, HttpServletResponse response) throws RmesException;

ResponseEntity<?> getCollectionExportODS(String id, String accept, boolean withConcepts, HttpServletResponse response) throws RmesException;
ResponseEntity getCollectionExportODS(String id, String accept, boolean withConcepts, HttpServletResponse response) throws RmesException;

void exportZipCollection(String id, String accept, HttpServletResponse response, ConceptsCollectionsResources.Language lg, String type, boolean withConcepts) throws RmesException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface ConceptsService {

void setConceptsValidation(String body) throws RmesException ;

ResponseEntity<?> exportConcept(String id, String acceptHeader) throws RmesException;
ResponseEntity exportConcept(String id, String acceptHeader) throws RmesException;

void exportZipConcept(String id, String acceptHeader, HttpServletResponse response, ConceptsCollectionsResources.Language lg, String type, boolean withConcepts) throws RmesException;

Expand All @@ -49,7 +49,7 @@ public interface ConceptsService {

void setCollectionsValidation(String body) throws RmesException ;

ResponseEntity<?> getCollectionExport(String id, String acceptHeader) throws RmesException ;
ResponseEntity getCollectionExport(String id, String acceptHeader) throws RmesException ;

String getRelatedConcepts(String id) throws RmesException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ public class StampAuthorizationChecker extends StampsRestrictionServiceImpl {
private static final Logger logger = LoggerFactory.getLogger(StampAuthorizationChecker.class);
public static final String CHECKING_AUTHORIZATION_ERROR_MESSAGE = "Error while checking authorization for user with stamp {} to modify or delete {}";
public static final String ERROR_AUTHORIZATION = "Error while checking authorization for user with stamp {} to modify {}";
private final String baseInternalUri;

@Autowired
public StampAuthorizationChecker(RepositoryGestion repoGestion, AuthorizeMethodDecider authorizeMethodDecider, UserProvider userProvider, @Value("${fr.insee.rmes.bauhaus.sesame.gestion.baseInternalURI}") String baseInternalUri) {
public StampAuthorizationChecker(RepositoryGestion repoGestion, AuthorizeMethodDecider authorizeMethodDecider, UserProvider userProvider) {
super(repoGestion, authorizeMethodDecider, userProvider);
this.baseInternalUri = baseInternalUri;
}

public boolean isSeriesManagerWithStamp(String seriesId, Stamp stamp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public ResponseEntity<?> getCollectionExportODT(String id, String accept, Concep

String fileName = getFileNameForExport(collection, lg);
if(conceptsIds.isEmpty()){
return collectionExport.exportAsResponseODT(fileName, xmlContent,true,true,true, lg);
return collectionExport.exportAsResponseODT(fileName, xmlContent,true, lg);
}

Map<String, InputStream> concepts = conceptsService.getConceptsExportIS(conceptsIds, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public ResponseEntity<Resource> exportAsResponse(String fileName, Map<String, St
}


public ResponseEntity<Resource> exportAsResponseODT(String fileName, Map<String, String> xmlContent, boolean lg1, boolean lg2, boolean includeEmptyFields, ConceptsCollectionsResources.Language lg) throws RmesException {
public ResponseEntity<Resource> exportAsResponseODT(String fileName, Map<String, String> xmlContent, boolean includeEmptyFields, ConceptsCollectionsResources.Language lg) throws RmesException {
String parametersXML = XsltUtils.buildParams(true, true, includeEmptyFields, Constants.COLLECTION);
xmlContent.put(Constants.PARAMETERS_FILE, parametersXML);
String xmlPattern = lg == ConceptsCollectionsResources.Language.lg1 ? xmlPatternFR : xmlPatternEN;
Expand Down

0 comments on commit 069c7fc

Please sign in to comment.