-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEAT : CDE-310 ajouter logs dans retour du ws best ppn :
- renommage de la classe PpnWithLogsDto.java en PpnWithErrorsDto.java
- Loading branch information
Showing
5 changed files
with
51 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
package fr.abes.bestppn.dto; | ||
|
||
import fr.abes.bestppn.utils.TYPE_SUPPORT; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public abstract class PpnDto { | ||
|
||
private String ppn; | ||
|
||
private TYPE_SUPPORT typeSupport; | ||
|
||
public PpnDto(String ppn, TYPE_SUPPORT typeSupport) { | ||
this.ppn = ppn; | ||
this.typeSupport = typeSupport; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package fr.abes.bestppn.dto; | ||
|
||
import fr.abes.bestppn.utils.TYPE_SUPPORT; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
public class PpnWithErrorsDto extends PpnDto { | ||
|
||
private List<String> errors; | ||
|
||
public PpnWithErrorsDto(String ppn, TYPE_SUPPORT typeSupport, List<String> errors){ | ||
super(ppn, typeSupport); | ||
this.errors = errors; | ||
} | ||
|
||
public void addError(String error) { | ||
this.errors.add(error); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
16 changes: 12 additions & 4 deletions
16
src/main/java/fr/abes/bestppn/dto/kafka/PpnWithDestinationDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
package fr.abes.bestppn.dto.kafka; | ||
|
||
import fr.abes.bestppn.dto.PpnDto; | ||
import fr.abes.bestppn.utils.DESTINATION_TOPIC; | ||
import fr.abes.bestppn.utils.TYPE_SUPPORT; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Data | ||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
public class PpnWithDestinationDto { | ||
private String ppn; | ||
public class PpnWithDestinationDto extends PpnDto { | ||
private DESTINATION_TOPIC destination; | ||
|
||
public PpnWithDestinationDto(String ppn, TYPE_SUPPORT typeSupport, DESTINATION_TOPIC destination) { | ||
super(ppn, typeSupport); | ||
this.destination = destination; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters