Skip to content

Commit

Permalink
FEAT : CDE-310 ajouter logs dans retour du ws best ppn :
Browse files Browse the repository at this point in the history
     - création de la classe PpnDto.java
     - création de la classe PpnWithLogsDto.java
     - modification de la classe PpnWithTypeDto.java en extends PpnDto
     - ajout d'un paramètre "logs" dans le contrôleur BestPpnController.java
  • Loading branch information
EryneKL committed Dec 8, 2023
1 parent 1178fbb commit 2a50899
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public String bestPpn(@RequestParam(name = "provider") String provider, @Request
@RequestParam(name = "publication_type") String publicationType, @RequestParam(name = "online_identifier", required = false) String onlineIdentifier,
@RequestParam(name = "print_identifier", required = false) String printIdentifier, @RequestParam(name = "titleUrl", required = false) String titleUrl,
@RequestParam(name = "date_monograph_published_online", required = false) String dateMonographPublishedOnline, @RequestParam(name = "date_monograph_published_print", required = false) String dateMonographPublishedPrint,
@RequestParam(name = "first_author", required = false) String firstAuthor, @RequestParam(name = "force", required = false) Boolean force) throws IOException {
@RequestParam(name = "first_author", required = false) String firstAuthor, @RequestParam(name = "force", required = false) Boolean force,
@RequestParam(name = "logs", required = false) Boolean logs) throws IOException {
try {
LigneKbartDto ligneKbartDto = new LigneKbartDto();
ligneKbartDto.setPublicationType(publicationType);
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/fr/abes/bestppn/dto/PpnDto.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package fr.abes.bestppn.dto;

import fr.abes.bestppn.utils.TYPE_SUPPORT;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public abstract class PpnDto {

private String ppn;

private TYPE_SUPPORT typeSupport;

}
16 changes: 16 additions & 0 deletions src/main/java/fr/abes/bestppn/dto/PpnWithLogsDto.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package fr.abes.bestppn.dto;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
public class PpnWithLogsDto extends PpnDto {

private List<String> logs;

public PpnWithLogsDto(){

}
}
3 changes: 2 additions & 1 deletion src/main/java/fr/abes/bestppn/dto/wscall/PpnWithTypeDto.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package fr.abes.bestppn.dto.wscall;

import fr.abes.bestppn.dto.PpnDto;
import fr.abes.bestppn.utils.TYPE_DOCUMENT;
import fr.abes.bestppn.utils.TYPE_SUPPORT;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class PpnWithTypeDto {
public class PpnWithTypeDto extends PpnDto {
private String ppn;
private TYPE_SUPPORT typeSupport;

Expand Down

0 comments on commit 2a50899

Please sign in to comment.