Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge develop dans main #16

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>itembackoffice</artifactId>
<groupId>fr.abes.item</groupId>
<version>2.4.5</version>
<version>2.4.6-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down
8 changes: 0 additions & 8 deletions batch/src/main/java/fr/abes/item/traitement/ProxyRetry.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import fr.abes.item.traitement.model.LigneFichierDtoRecouv;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.Level;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.retry.annotation.Backoff;
Expand Down Expand Up @@ -75,13 +74,6 @@ public void saveExemplaire(DemandeModif demande, LigneFichierDtoModif ligneFichi
//modification de la exemplaire d'exemplaire
Exemplaire noticeTraitee = getService().getDemandeModif().getNoticeTraitee(demande, exemplaire, (LigneFichierModif) ligneFichierDtoMapper.getLigneFichierEntity(ligneFichierDtoModif));
getService().getTraitement().saveExemplaire(noticeTraitee.toString(), ligneFichierDtoModif.getEpn());
} catch (CBSException ex) {
//en cas d'erreur CBS de type Fatal (erreur qui ne devrait pas se produire) on se déconnecte / reconnecte et on renvoie l'exception
if (ex.getCodeErreur().equals(Level.FATAL)) {
this.disconnect();
this.authenticate("M" + demande.getRcr());
}
throw ex;
} catch (IOException ex) {
log.error("Erreur de communication avec le CBS sur demande modif " + demande.getId() + " / ligne fichier n°" + ligneFichierDtoModif.getNumLigneFichier() + " / epn : " + ligneFichierDtoModif.getEpn());
//si un pb de communication avec le CBS est détecté, on se reconnecte, et on renvoie l'exception pour que le retry retente la méthode
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>itembackoffice</artifactId>
<groupId>fr.abes.item</groupId>
<version>2.4.5</version>
<version>2.4.6-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import fr.abes.item.service.ITraitementService;
import fr.abes.item.utilitaire.Utilitaires;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.Level;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
Expand All @@ -26,6 +26,7 @@

@Slf4j
@Service
@NoArgsConstructor
public class TraitementService implements ITraitementService {

@Value("${sudoc.serveur}")
Expand All @@ -41,12 +42,10 @@ public class TraitementService implements ITraitementService {
@Getter
private DaoProvider dao;

public TraitementService() {
cbs = new ProcessCBS();
}

@Override
public void authenticate(String login) throws CBSException, IOException {
this.cbs = new ProcessCBS();
this.cbs.authenticate(serveurSudoc, portSudoc, login, Constant.PASSSUDOC);
}

Expand All @@ -70,7 +69,7 @@ public String getNoticeFromEPN(String epn) throws CBSException, IOException {
return Constants.STR_1F + resu2.substring(resu2.indexOf("e" + numEx)) + Constants.STR_0D + Constants.STR_1E;
} else {
log.error(epn + " pas trouvé");
throw new CBSException(Level.FATAL, Constant.ERR_FILE_NOTICE_EPN_NUMBER);
throw new IOException(Constant.ERR_FILE_NOTICE_EPN_NUMBER);
}
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>fr.abes.item</groupId>
<artifactId>itembackoffice</artifactId>
<version>2.4.5</version>
<version>2.4.6-SNAPSHOT</version>
<modules>
<module>core</module>
<module>web</module>
Expand Down
2 changes: 1 addition & 1 deletion web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>itembackoffice</artifactId>
<groupId>fr.abes.item</groupId>
<version>2.4.5</version>
<version>2.4.6-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down
Loading