-
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.
REFACTOR : changement requête ws dat2ppn vers base Oracle :
- Suppression caractères spéciaux et mots réservés des paramètres en entrée - gestion des cas null pour générer la requête
- Loading branch information
1 parent
12bef20
commit abdf110
Showing
9 changed files
with
98 additions
and
91 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
12 changes: 0 additions & 12 deletions
12
src/main/java/fr/abes/sudoc/configuration/BaseXMLOracleConfig.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
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
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,31 @@ | ||
package fr.abes.sudoc.service; | ||
|
||
import fr.abes.sudoc.component.BaseXmlFunctionsCaller; | ||
import fr.abes.sudoc.exception.IllegalPpnException; | ||
import fr.abes.sudoc.utils.Utilitaire; | ||
import org.springframework.jdbc.UncategorizedSQLException; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
@Service | ||
public class DatService { | ||
private final BaseXmlFunctionsCaller caller; | ||
|
||
public DatService(BaseXmlFunctionsCaller caller) { | ||
this.caller = caller; | ||
} | ||
|
||
public List<String> getPpnFromDat(Integer date, String auteur, String titre) throws IllegalPpnException, IOException { | ||
try { | ||
List<String> result = caller.datToPpn(date, Utilitaire.formatString(auteur), Utilitaire.formatString(titre)); | ||
if (result.isEmpty()) | ||
throw new IllegalPpnException("Aucune notice ne correspond à la recherche sur " + date + " , " + auteur + " , " + titre); | ||
return result; | ||
} catch (UncategorizedSQLException ex) { | ||
throw new IOException("Incident technique lors de l'accès à la base de données"); | ||
} | ||
} | ||
|
||
} |
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
This file was deleted.
Oops, something went wrong.
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
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
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