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 #25

Merged
merged 34 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
66397eb
Feat - CDE 196 déterminer à quel moment le fichier de log est généré :
EryneKL Aug 28, 2023
164c94a
Feat - CDE 196 déterminer à quel moment le fichier de log est généré :
EryneKL Aug 28, 2023
6439565
Feat - CDE 196 déterminer à quel moment le fichier de log est genere :
EryneKL Sep 6, 2023
b4d39f3
Merge remote-tracking branch 'origin/develop' into CDE-196-determiner…
EryneKL Sep 6, 2023
c0940e4
Feat - CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log :
EryneKL Sep 7, 2023
85533b7
Feat - CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log :
EryneKL Sep 8, 2023
35d5e0d
Feat - CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log :
EryneKL Sep 12, 2023
5c7e80f
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 4, 2023
112a2d8
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 4, 2023
2a28594
Merge remote-tracking branch 'origin/develop' into CDE-195-creer-cons…
EryneKL Oct 4, 2023
22a9b83
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 5, 2023
fe9b67e
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 9, 2023
95c80a9
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 10, 2023
002557b
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 10, 2023
598981f
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 10, 2023
52858dd
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 11, 2023
d983ee7
Merge remote-tracking branch 'origin/develop' into CDE-195-creer-cons…
EryneKL Oct 11, 2023
7090616
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 11, 2023
35795db
FEAT : CDE-195-creer-consumer-pour-generer-les-2-fichiers-de-log
EryneKL Oct 13, 2023
a710dba
CDE157 Check si package existe
SamuelQuetin Oct 23, 2023
4541644
Merge remote-tracking branch 'origin/develop' into CDE-195-creer-cons…
Oct 24, 2023
949ca21
Ajout ExecutionReport
SamuelQuetin Oct 25, 2023
3bdaf17
Merge remote-tracking branch 'origin/CDE-195-creer-consumer-pour-gene…
Oct 26, 2023
b74ad60
CDE-249 : FIX : correction entités suite à modification bdd Bacon
pierre-maraval Oct 26, 2023
e27e186
Merge pull request #22 from abes-esr/CDE-249-modifier-les-entites-dan…
SamuelQuetin Oct 26, 2023
2547f38
Merge remote-tracking branch 'origin/develop' into CDE-195-creer-cons…
Oct 26, 2023
211cd5c
message erreur
Oct 26, 2023
6659835
Merge remote-tracking branch 'origin/develop' into CDE-157-chargement…
Oct 26, 2023
1c592e2
fix after merge
Oct 26, 2023
8017d16
Merge pull request #23 from abes-esr/CDE-195-creer-consumer-pour-gene…
jvk88511334 Oct 26, 2023
24ed81a
ajout LigneKbart repo et
SamuelQuetin Oct 27, 2023
d14a5ca
Merge branch 'develop' into CDE-157-chargement-dun-package-dans-bacon…
SamuelQuetin Oct 27, 2023
6ed30d4
Merge pull request #24 from abes-esr/CDE-157-chargement-dun-package-d…
jvk88511334 Oct 27, 2023
d13e55e
Fix fichier log
SamuelQuetin Oct 27, 2023
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
100 changes: 86 additions & 14 deletions src/main/java/fr/abes/LigneKbartConnect.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

@org.apache.avro.specific.AvroGenerated
public class LigneKbartConnect extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = -4747621436631233106L;
private static final long serialVersionUID = -6107934252124705352L;


public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"LigneKbartConnect\",\"namespace\":\"fr.abes\",\"fields\":[{\"name\":\"PUBLICATION_TITLE\",\"type\":[\"null\",\"string\"]},{\"name\":\"PRINT_IDENTIFIER\",\"type\":[\"null\",\"string\"]},{\"name\":\"ONLINE_IDENTIFIER\",\"type\":[\"null\",\"string\"]},{\"name\":\"DATE_FIRST_ISSUE_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"NUM_FIRST_VOL_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"NUM_FIRST_ISSUE_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"DATE_LAST_ISSUE_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"NUM_LAST_VOL_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"NUM_LAST_ISSUE_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"TITLE_URL\",\"type\":[\"null\",\"string\"]},{\"name\":\"FIRST_AUTHOR\",\"type\":[\"null\",\"string\"]},{\"name\":\"TITLE_ID\",\"type\":[\"null\",\"string\"]},{\"name\":\"EMBARGO_INFO\",\"type\":[\"null\",\"string\"]},{\"name\":\"COVERAGE_DEPTH\",\"type\":[\"null\",\"string\"]},{\"name\":\"NOTES\",\"type\":[\"null\",\"string\"]},{\"name\":\"PUBLISHER_NAME\",\"type\":[\"null\",\"string\"]},{\"name\":\"PUBLICATION_TYPE\",\"type\":[\"null\",\"string\"]},{\"name\":\"DATE_MONOGRAPH_PUBLISHED_PRINT\",\"type\":[\"null\",\"string\"]},{\"name\":\"DATE_MONOGRAPH_PUBLISHED_ONLIN\",\"type\":[\"null\",\"string\"]},{\"name\":\"MONOGRAPH_VOLUME\",\"type\":[\"null\",\"string\"]},{\"name\":\"MONOGRAPH_EDITION\",\"type\":[\"null\",\"string\"]},{\"name\":\"FIRST_EDITOR\",\"type\":[\"null\",\"string\"]},{\"name\":\"PARENT_PUBLICATION_TITLE_ID\",\"type\":[\"null\",\"string\"]},{\"name\":\"PRECEDING_PUBLICATION_TITLE_ID\",\"type\":[\"null\",\"string\"]},{\"name\":\"ACCESS_TYPE\",\"type\":[\"null\",\"string\"]},{\"name\":\"PROVIDER_PACKAGE_PACKAGE\",\"type\":\"string\"},{\"name\":\"PROVIDER_PACKAGE_DATE_P\",\"type\":{\"type\":\"int\",\"logicalType\":\"date\"}},{\"name\":\"PROVIDER_PACKAGE_IDT_PROVIDER\",\"type\":\"int\"},{\"name\":\"BEST_PPN\",\"type\":[\"null\",\"string\"]}]}");
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"LigneKbartConnect\",\"namespace\":\"fr.abes\",\"fields\":[{\"name\":\"PUBLICATION_TITLE\",\"type\":[\"null\",\"string\"]},{\"name\":\"PRINT_IDENTIFIER\",\"type\":[\"null\",\"string\"]},{\"name\":\"ONLINE_IDENTIFIER\",\"type\":[\"null\",\"string\"]},{\"name\":\"DATE_FIRST_ISSUE_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"NUM_FIRST_VOL_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"NUM_FIRST_ISSUE_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"DATE_LAST_ISSUE_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"NUM_LAST_VOL_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"NUM_LAST_ISSUE_ONLINE\",\"type\":[\"null\",\"string\"]},{\"name\":\"TITLE_URL\",\"type\":[\"null\",\"string\"]},{\"name\":\"FIRST_AUTHOR\",\"type\":[\"null\",\"string\"]},{\"name\":\"TITLE_ID\",\"type\":[\"null\",\"string\"]},{\"name\":\"EMBARGO_INFO\",\"type\":[\"null\",\"string\"]},{\"name\":\"COVERAGE_DEPTH\",\"type\":[\"null\",\"string\"]},{\"name\":\"NOTES\",\"type\":[\"null\",\"string\"]},{\"name\":\"PUBLISHER_NAME\",\"type\":[\"null\",\"string\"]},{\"name\":\"PUBLICATION_TYPE\",\"type\":[\"null\",\"string\"]},{\"name\":\"DATE_MONOGRAPH_PUBLISHED_PRINT\",\"type\":[\"null\",\"string\"]},{\"name\":\"DATE_MONOGRAPH_PUBLISHED_ONLIN\",\"type\":[\"null\",\"string\"]},{\"name\":\"MONOGRAPH_VOLUME\",\"type\":[\"null\",\"string\"]},{\"name\":\"MONOGRAPH_EDITION\",\"type\":[\"null\",\"string\"]},{\"name\":\"FIRST_EDITOR\",\"type\":[\"null\",\"string\"]},{\"name\":\"PARENT_PUBLICATION_TITLE_ID\",\"type\":[\"null\",\"string\"]},{\"name\":\"PRECEDING_PUBLICATION_TITLE_ID\",\"type\":[\"null\",\"string\"]},{\"name\":\"ACCESS_TYPE\",\"type\":[\"null\",\"string\"]},{\"name\":\"PROVIDER_PACKAGE_PACKAGE\",\"type\":\"string\"},{\"name\":\"PROVIDER_PACKAGE_DATE_P\",\"type\":{\"type\":\"int\",\"logicalType\":\"date\"}},{\"name\":\"PROVIDER_PACKAGE_IDT_PROVIDER\",\"type\":\"int\"},{\"name\":\"ID_PROVIDER_PACKAGE\",\"type\":\"int\"},{\"name\":\"BEST_PPN\",\"type\":[\"null\",\"string\"]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }

private static final SpecificData MODEL$ = new SpecificData();
Expand Down Expand Up @@ -104,6 +104,7 @@ public static LigneKbartConnect fromByteBuffer(
private java.lang.CharSequence PROVIDER_PACKAGE_PACKAGE;
private java.time.LocalDate PROVIDER_PACKAGE_DATE_P;
private int PROVIDER_PACKAGE_IDT_PROVIDER;
private int ID_PROVIDER_PACKAGE;
private java.lang.CharSequence BEST_PPN;

/**
Expand Down Expand Up @@ -143,9 +144,10 @@ public LigneKbartConnect() {}
* @param PROVIDER_PACKAGE_PACKAGE The new value for PROVIDER_PACKAGE_PACKAGE
* @param PROVIDER_PACKAGE_DATE_P The new value for PROVIDER_PACKAGE_DATE_P
* @param PROVIDER_PACKAGE_IDT_PROVIDER The new value for PROVIDER_PACKAGE_IDT_PROVIDER
* @param ID_PROVIDER_PACKAGE The new value for ID_PROVIDER_PACKAGE
* @param BEST_PPN The new value for BEST_PPN
*/
public LigneKbartConnect(java.lang.CharSequence PUBLICATION_TITLE, java.lang.CharSequence PRINT_IDENTIFIER, java.lang.CharSequence ONLINE_IDENTIFIER, java.lang.CharSequence DATE_FIRST_ISSUE_ONLINE, java.lang.CharSequence NUM_FIRST_VOL_ONLINE, java.lang.CharSequence NUM_FIRST_ISSUE_ONLINE, java.lang.CharSequence DATE_LAST_ISSUE_ONLINE, java.lang.CharSequence NUM_LAST_VOL_ONLINE, java.lang.CharSequence NUM_LAST_ISSUE_ONLINE, java.lang.CharSequence TITLE_URL, java.lang.CharSequence FIRST_AUTHOR, java.lang.CharSequence TITLE_ID, java.lang.CharSequence EMBARGO_INFO, java.lang.CharSequence COVERAGE_DEPTH, java.lang.CharSequence NOTES, java.lang.CharSequence PUBLISHER_NAME, java.lang.CharSequence PUBLICATION_TYPE, java.lang.CharSequence DATE_MONOGRAPH_PUBLISHED_PRINT, java.lang.CharSequence DATE_MONOGRAPH_PUBLISHED_ONLIN, java.lang.CharSequence MONOGRAPH_VOLUME, java.lang.CharSequence MONOGRAPH_EDITION, java.lang.CharSequence FIRST_EDITOR, java.lang.CharSequence PARENT_PUBLICATION_TITLE_ID, java.lang.CharSequence PRECEDING_PUBLICATION_TITLE_ID, java.lang.CharSequence ACCESS_TYPE, java.lang.CharSequence PROVIDER_PACKAGE_PACKAGE, java.time.LocalDate PROVIDER_PACKAGE_DATE_P, java.lang.Integer PROVIDER_PACKAGE_IDT_PROVIDER, java.lang.CharSequence BEST_PPN) {
public LigneKbartConnect(java.lang.CharSequence PUBLICATION_TITLE, java.lang.CharSequence PRINT_IDENTIFIER, java.lang.CharSequence ONLINE_IDENTIFIER, java.lang.CharSequence DATE_FIRST_ISSUE_ONLINE, java.lang.CharSequence NUM_FIRST_VOL_ONLINE, java.lang.CharSequence NUM_FIRST_ISSUE_ONLINE, java.lang.CharSequence DATE_LAST_ISSUE_ONLINE, java.lang.CharSequence NUM_LAST_VOL_ONLINE, java.lang.CharSequence NUM_LAST_ISSUE_ONLINE, java.lang.CharSequence TITLE_URL, java.lang.CharSequence FIRST_AUTHOR, java.lang.CharSequence TITLE_ID, java.lang.CharSequence EMBARGO_INFO, java.lang.CharSequence COVERAGE_DEPTH, java.lang.CharSequence NOTES, java.lang.CharSequence PUBLISHER_NAME, java.lang.CharSequence PUBLICATION_TYPE, java.lang.CharSequence DATE_MONOGRAPH_PUBLISHED_PRINT, java.lang.CharSequence DATE_MONOGRAPH_PUBLISHED_ONLIN, java.lang.CharSequence MONOGRAPH_VOLUME, java.lang.CharSequence MONOGRAPH_EDITION, java.lang.CharSequence FIRST_EDITOR, java.lang.CharSequence PARENT_PUBLICATION_TITLE_ID, java.lang.CharSequence PRECEDING_PUBLICATION_TITLE_ID, java.lang.CharSequence ACCESS_TYPE, java.lang.CharSequence PROVIDER_PACKAGE_PACKAGE, java.time.LocalDate PROVIDER_PACKAGE_DATE_P, java.lang.Integer PROVIDER_PACKAGE_IDT_PROVIDER, java.lang.Integer ID_PROVIDER_PACKAGE, java.lang.CharSequence BEST_PPN) {
this.PUBLICATION_TITLE = PUBLICATION_TITLE;
this.PRINT_IDENTIFIER = PRINT_IDENTIFIER;
this.ONLINE_IDENTIFIER = ONLINE_IDENTIFIER;
Expand Down Expand Up @@ -174,6 +176,7 @@ public LigneKbartConnect(java.lang.CharSequence PUBLICATION_TITLE, java.lang.Cha
this.PROVIDER_PACKAGE_PACKAGE = PROVIDER_PACKAGE_PACKAGE;
this.PROVIDER_PACKAGE_DATE_P = PROVIDER_PACKAGE_DATE_P;
this.PROVIDER_PACKAGE_IDT_PROVIDER = PROVIDER_PACKAGE_IDT_PROVIDER;
this.ID_PROVIDER_PACKAGE = ID_PROVIDER_PACKAGE;
this.BEST_PPN = BEST_PPN;
}

Expand Down Expand Up @@ -215,7 +218,8 @@ public java.lang.Object get(int field$) {
case 25: return PROVIDER_PACKAGE_PACKAGE;
case 26: return PROVIDER_PACKAGE_DATE_P;
case 27: return PROVIDER_PACKAGE_IDT_PROVIDER;
case 28: return BEST_PPN;
case 28: return ID_PROVIDER_PACKAGE;
case 29: return BEST_PPN;
default: throw new IndexOutOfBoundsException("Invalid index: " + field$);
}
}
Expand Down Expand Up @@ -251,6 +255,7 @@ public java.lang.Object get(int field$) {
new org.apache.avro.data.TimeConversions.DateConversion(),
null,
null,
null,
null
};

Expand Down Expand Up @@ -292,7 +297,8 @@ public void put(int field$, java.lang.Object value$) {
case 25: PROVIDER_PACKAGE_PACKAGE = (java.lang.CharSequence)value$; break;
case 26: PROVIDER_PACKAGE_DATE_P = (java.time.LocalDate)value$; break;
case 27: PROVIDER_PACKAGE_IDT_PROVIDER = (java.lang.Integer)value$; break;
case 28: BEST_PPN = (java.lang.CharSequence)value$; break;
case 28: ID_PROVIDER_PACKAGE = (java.lang.Integer)value$; break;
case 29: BEST_PPN = (java.lang.CharSequence)value$; break;
default: throw new IndexOutOfBoundsException("Invalid index: " + field$);
}
}
Expand Down Expand Up @@ -773,6 +779,23 @@ public void setPROVIDERPACKAGEIDTPROVIDER(int value) {
this.PROVIDER_PACKAGE_IDT_PROVIDER = value;
}

/**
* Gets the value of the 'ID_PROVIDER_PACKAGE' field.
* @return The value of the 'ID_PROVIDER_PACKAGE' field.
*/
public int getIDPROVIDERPACKAGE() {
return ID_PROVIDER_PACKAGE;
}


/**
* Sets the value of the 'ID_PROVIDER_PACKAGE' field.
* @param value the value to set.
*/
public void setIDPROVIDERPACKAGE(int value) {
this.ID_PROVIDER_PACKAGE = value;
}

/**
* Gets the value of the 'BEST_PPN' field.
* @return The value of the 'BEST_PPN' field.
Expand Down Expand Up @@ -859,6 +882,7 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild
private java.lang.CharSequence PROVIDER_PACKAGE_PACKAGE;
private java.time.LocalDate PROVIDER_PACKAGE_DATE_P;
private int PROVIDER_PACKAGE_IDT_PROVIDER;
private int ID_PROVIDER_PACKAGE;
private java.lang.CharSequence BEST_PPN;

/** Creates a new Builder */
Expand Down Expand Up @@ -984,10 +1008,14 @@ private Builder(fr.abes.LigneKbartConnect.Builder other) {
this.PROVIDER_PACKAGE_IDT_PROVIDER = data().deepCopy(fields()[27].schema(), other.PROVIDER_PACKAGE_IDT_PROVIDER);
fieldSetFlags()[27] = other.fieldSetFlags()[27];
}
if (isValidValue(fields()[28], other.BEST_PPN)) {
this.BEST_PPN = data().deepCopy(fields()[28].schema(), other.BEST_PPN);
if (isValidValue(fields()[28], other.ID_PROVIDER_PACKAGE)) {
this.ID_PROVIDER_PACKAGE = data().deepCopy(fields()[28].schema(), other.ID_PROVIDER_PACKAGE);
fieldSetFlags()[28] = other.fieldSetFlags()[28];
}
if (isValidValue(fields()[29], other.BEST_PPN)) {
this.BEST_PPN = data().deepCopy(fields()[29].schema(), other.BEST_PPN);
fieldSetFlags()[29] = other.fieldSetFlags()[29];
}
}

/**
Expand Down Expand Up @@ -1108,10 +1136,14 @@ private Builder(fr.abes.LigneKbartConnect other) {
this.PROVIDER_PACKAGE_IDT_PROVIDER = data().deepCopy(fields()[27].schema(), other.PROVIDER_PACKAGE_IDT_PROVIDER);
fieldSetFlags()[27] = true;
}
if (isValidValue(fields()[28], other.BEST_PPN)) {
this.BEST_PPN = data().deepCopy(fields()[28].schema(), other.BEST_PPN);
if (isValidValue(fields()[28], other.ID_PROVIDER_PACKAGE)) {
this.ID_PROVIDER_PACKAGE = data().deepCopy(fields()[28].schema(), other.ID_PROVIDER_PACKAGE);
fieldSetFlags()[28] = true;
}
if (isValidValue(fields()[29], other.BEST_PPN)) {
this.BEST_PPN = data().deepCopy(fields()[29].schema(), other.BEST_PPN);
fieldSetFlags()[29] = true;
}
}

/**
Expand Down Expand Up @@ -2232,6 +2264,45 @@ public fr.abes.LigneKbartConnect.Builder clearPROVIDERPACKAGEIDTPROVIDER() {
return this;
}

/**
* Gets the value of the 'ID_PROVIDER_PACKAGE' field.
* @return The value.
*/
public int getIDPROVIDERPACKAGE() {
return ID_PROVIDER_PACKAGE;
}


/**
* Sets the value of the 'ID_PROVIDER_PACKAGE' field.
* @param value The value of 'ID_PROVIDER_PACKAGE'.
* @return This builder.
*/
public fr.abes.LigneKbartConnect.Builder setIDPROVIDERPACKAGE(int value) {
validate(fields()[28], value);
this.ID_PROVIDER_PACKAGE = value;
fieldSetFlags()[28] = true;
return this;
}

/**
* Checks whether the 'ID_PROVIDER_PACKAGE' field has been set.
* @return True if the 'ID_PROVIDER_PACKAGE' field has been set, false otherwise.
*/
public boolean hasIDPROVIDERPACKAGE() {
return fieldSetFlags()[28];
}


/**
* Clears the value of the 'ID_PROVIDER_PACKAGE' field.
* @return This builder.
*/
public fr.abes.LigneKbartConnect.Builder clearIDPROVIDERPACKAGE() {
fieldSetFlags()[28] = false;
return this;
}

/**
* Gets the value of the 'BEST_PPN' field.
* @return The value.
Expand All @@ -2247,9 +2318,9 @@ public java.lang.CharSequence getBESTPPN() {
* @return This builder.
*/
public fr.abes.LigneKbartConnect.Builder setBESTPPN(java.lang.CharSequence value) {
validate(fields()[28], value);
validate(fields()[29], value);
this.BEST_PPN = value;
fieldSetFlags()[28] = true;
fieldSetFlags()[29] = true;
return this;
}

Expand All @@ -2258,7 +2329,7 @@ public fr.abes.LigneKbartConnect.Builder setBESTPPN(java.lang.CharSequence value
* @return True if the 'BEST_PPN' field has been set, false otherwise.
*/
public boolean hasBESTPPN() {
return fieldSetFlags()[28];
return fieldSetFlags()[29];
}


Expand All @@ -2268,7 +2339,7 @@ public boolean hasBESTPPN() {
*/
public fr.abes.LigneKbartConnect.Builder clearBESTPPN() {
BEST_PPN = null;
fieldSetFlags()[28] = false;
fieldSetFlags()[29] = false;
return this;
}

Expand Down Expand Up @@ -2305,7 +2376,8 @@ public LigneKbartConnect build() {
record.PROVIDER_PACKAGE_PACKAGE = fieldSetFlags()[25] ? this.PROVIDER_PACKAGE_PACKAGE : (java.lang.CharSequence) defaultValue(fields()[25]);
record.PROVIDER_PACKAGE_DATE_P = fieldSetFlags()[26] ? this.PROVIDER_PACKAGE_DATE_P : (java.time.LocalDate) defaultValue(fields()[26]);
record.PROVIDER_PACKAGE_IDT_PROVIDER = fieldSetFlags()[27] ? this.PROVIDER_PACKAGE_IDT_PROVIDER : (java.lang.Integer) defaultValue(fields()[27]);
record.BEST_PPN = fieldSetFlags()[28] ? this.BEST_PPN : (java.lang.CharSequence) defaultValue(fields()[28]);
record.ID_PROVIDER_PACKAGE = fieldSetFlags()[28] ? this.ID_PROVIDER_PACKAGE : (java.lang.Integer) defaultValue(fields()[28]);
record.BEST_PPN = fieldSetFlags()[29] ? this.BEST_PPN : (java.lang.CharSequence) defaultValue(fields()[29]);
return record;
} catch (org.apache.avro.AvroMissingFieldException e) {
throw e;
Expand Down
47 changes: 38 additions & 9 deletions src/main/java/fr/abes/bestppn/configuration/KafkaConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import io.confluent.kafka.serializers.KafkaAvroSerializer;
import io.confluent.kafka.serializers.KafkaAvroSerializerConfig;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.common.serialization.StringDeserializer;
import org.apache.kafka.common.serialization.StringSerializer;
Expand Down Expand Up @@ -60,7 +59,7 @@ public ConsumerFactory<String, String> consumerKbartFactory() {
}

@Bean
public Map<String, Object> producerConfigs() {
public Map<String, Object> producerConfigsWithTransaction() {
Map<String, Object> props = new HashMap<>();
props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapAddress);
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
Expand All @@ -72,22 +71,52 @@ public Map<String, Object> producerConfigs() {
}

@Bean
public ProducerFactory<String, LigneKbartConnect> producerFactory() {
DefaultKafkaProducerFactory<String, LigneKbartConnect> factory = new DefaultKafkaProducerFactory<>(producerConfigs());
factory.setTransactionIdPrefix(transactionIdPrefix);
public Map<String, Object> producerConfigs() {
Map<String, Object> props = new HashMap<>();
props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapAddress);
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, KafkaAvroSerializer.class);
props.put(KafkaAvroSerializerConfig.SCHEMA_REGISTRY_URL_CONFIG, registryUrl);
props.put(KafkaAvroSerializerConfig.AUTO_REGISTER_SCHEMAS, autoRegisterSchema);
return props;
}

@Bean
public ProducerFactory<String, LigneKbartConnect> producerFactoryLigneKbartConnectWithTransaction() {
DefaultKafkaProducerFactory<String, LigneKbartConnect> factory = new DefaultKafkaProducerFactory<>(producerConfigsWithTransaction());
factory.setTransactionIdPrefix(transactionIdPrefix+"connect-");
return factory;
}
@Bean
public ProducerFactory<String, LigneKbartImprime> producerFactoryLigneKbartImprimeWithTransaction() {
DefaultKafkaProducerFactory<String, LigneKbartImprime> factory = new DefaultKafkaProducerFactory<>(producerConfigsWithTransaction());
factory.setTransactionIdPrefix(transactionIdPrefix+"print-");
return factory;
}

@Bean
public KafkaTransactionManager<String, LigneKbartConnect> kafkaTransactionManager(){
return new KafkaTransactionManager<>(producerFactory());
public ProducerFactory<String, String> producerFactory() {
DefaultKafkaProducerFactory<String, String> factory = new DefaultKafkaProducerFactory<>(producerConfigs());
return factory;
}

@Bean
public KafkaTransactionManager<String, LigneKbartConnect> kafkaTransactionManagerKbartConnect(){
return new KafkaTransactionManager<>(producerFactoryLigneKbartConnectWithTransaction());
}
@Bean
public KafkaTransactionManager<String, LigneKbartImprime> kafkaTransactionManagerKbartImprime(){
return new KafkaTransactionManager<>(producerFactoryLigneKbartImprimeWithTransaction());
}

@Bean
public KafkaTemplate<String, LigneKbartConnect> kafkaTemplateConnect(final ProducerFactory producerFactory) { return new KafkaTemplate<>(producerFactory);}
public KafkaTemplate<String, LigneKbartConnect> kafkaTemplateConnect(final ProducerFactory producerFactoryLigneKbartConnectWithTransaction) { return new KafkaTemplate<>(producerFactoryLigneKbartConnectWithTransaction);}

@Bean
public KafkaTemplate<String, LigneKbartImprime> kafkaTemplateImprime(final ProducerFactory producerFactory) { return new KafkaTemplate<>(producerFactory);}
public KafkaTemplate<String, LigneKbartImprime> kafkaTemplateImprime(final ProducerFactory producerFactoryLigneKbartImprimeWithTransaction) { return new KafkaTemplate<>(producerFactoryLigneKbartImprimeWithTransaction);}

@Bean
public KafkaTemplate<String, String> kafkatemplateEndoftraitement(final ProducerFactory producerFactory) {
return new KafkaTemplate<>(producerFactory);
}
}
2 changes: 2 additions & 0 deletions src/main/java/fr/abes/bestppn/dto/kafka/LigneKbartDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ public class LigneKbartDto {
private Date providerPackageDateP;
@JsonProperty("provider_package_idt_provider")
private Integer providerPackageIdtProvider;
@JsonProperty("id_provider_package")
private Integer idProviderPackage;


@JsonIgnore
Expand Down
Loading
Loading