// Path: services-inventoryitem-api/src/main/java/io/plumery/inventoryitem/api/stream/StreamBroadcasterFactory.java
// public class StreamBroadcasterFactory {
//     @NotEmpty
//     @JsonProperty
//     private String bootstrap;
// 
//     public void setBootstrap(String bootstrap) {
//         this.bootstrap = bootstrap;
//     }
// 
//     public String getBootstrap() {
//         return bootstrap;
//     }
// 
//     public StreamBroadcaster build(Environment environment) {
//         StreamBroadcaster broadcaster =
//                 new KafkaTopicBroadcaster(environment.getName(),
//                         environment.getObjectMapper(),
//                         bootstrap);
// 
//         environment.lifecycle().manage(broadcaster);
// 
//         return broadcaster;
//     }
// }
// 
// Path: services-infrastructure-messaging/src/main/java/io/plumery/messaging/CommandDispatcherFactory.java
// public class CommandDispatcherFactory {
//     @NotEmpty
//     @JsonProperty
//     private String boostrap;
// 
//     public void setBoostrap(String boostrap) {
//         this.boostrap = boostrap;
//     }
// 
//     public String getBoostrap() {
//         return boostrap;
//     }
// 
//     public CommandDispatcher build(Environment environment) {
//         return new KafkaCommandDispatcher(boostrap, environment.getObjectMapper());
//     }
// }
// 
// Path: services-infrastructure-messaging/src/main/java/io/plumery/messaging/kafka/KafkaConfigurationFactory.java
// public class KafkaConfigurationFactory {
//     @NotEmpty
//     @JsonProperty
//     private String bootstrap;
// 
//     public void setBootstrap(String bootstrap) {
//         this.bootstrap = bootstrap;
//     }
// 
//     public String getBootstrap() {
//         return bootstrap;
//     }
// }


import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.Configuration;
import io.plumery.inventoryitem.api.stream.StreamBroadcasterFactory;
import io.plumery.messaging.CommandDispatcherFactory;
import io.plumery.messaging.kafka.KafkaConfigurationFactory;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
package io.plumery.inventoryitem.api;



public class InventoryItemApiConfiguration extends Configuration {
    @Valid
    @NotNull
    private KafkaConfigurationFactory kafkaConfigurationFactory;
    private CommandDispatcherFactory commandDispatcherFactory;
    private StreamBroadcasterFactory streamBroadcasterFactory;

    @JsonProperty("kafka")
    public void setKafkaConfigurationFactory(KafkaConfigurationFactory kafkaConfigurationFactory) {
        this.kafkaConfigurationFactory = kafkaConfigurationFactory;

        this.commandDispatcherFactory = new CommandDispatcherFactory();
        this.commandDispatcherFactory.setBoostrap(kafkaConfigurationFactory.getBootstrap());

        this.streamBroadcasterFactory = new StreamBroadcasterFactory();
        this.streamBroadcasterFactory.setBootstrap(kafkaConfigurationFactory.getBootstrap());
    }

    public CommandDispatcherFactory getCommandDispatcherFactory() {
        return commandDispatcherFactory;
    }

// Path: services-inventoryitem-api/src/main/java/io/plumery/inventoryitem/api/stream/StreamBroadcasterFactory.java
// public class StreamBroadcasterFactory {
//     @NotEmpty
//     @JsonProperty
//     private String bootstrap;
// 
//     public void setBootstrap(String bootstrap) {
//         this.bootstrap = bootstrap;
//     }
// 
//     public String getBootstrap() {
//         return bootstrap;
//     }
// 
//     public StreamBroadcaster build(Environment environment) {
//         StreamBroadcaster broadcaster =
//                 new KafkaTopicBroadcaster(environment.getName(),
//                         environment.getObjectMapper(),
//                         bootstrap);
// 
//         environment.lifecycle().manage(broadcaster);
// 
//         return broadcaster;
//     }
// }
// 
// Path: services-infrastructure-messaging/src/main/java/io/plumery/messaging/CommandDispatcherFactory.java
// public class CommandDispatcherFactory {
//     @NotEmpty
//     @JsonProperty
//     private String boostrap;
// 
//     public void setBoostrap(String boostrap) {
//         this.boostrap = boostrap;
//     }
// 
//     public String getBoostrap() {
//         return boostrap;
//     }
// 
//     public CommandDispatcher build(Environment environment) {
//         return new KafkaCommandDispatcher(boostrap, environment.getObjectMapper());
//     }
// }
// 
// Path: services-infrastructure-messaging/src/main/java/io/plumery/messaging/kafka/KafkaConfigurationFactory.java
// public class KafkaConfigurationFactory {
//     @NotEmpty
//     @JsonProperty
//     private String bootstrap;
// 
//     public void setBootstrap(String bootstrap) {
//         this.bootstrap = bootstrap;
//     }
// 
//     public String getBootstrap() {
//         return bootstrap;
//     }
// }


// Path: services-inventoryitem-api/src/main/java/io/plumery/inventoryitem/api/InventoryItemApiConfiguration.java
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.Configuration;
import io.plumery.inventoryitem.api.stream.StreamBroadcasterFactory;
import io.plumery.messaging.CommandDispatcherFactory;
import io.plumery.messaging.kafka.KafkaConfigurationFactory;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

package io.plumery.inventoryitem.api;



public class InventoryItemApiConfiguration extends Configuration {
    @Valid
    @NotNull
    private KafkaConfigurationFactory kafkaConfigurationFactory;
    private CommandDispatcherFactory commandDispatcherFactory;
    private StreamBroadcasterFactory streamBroadcasterFactory;

    @JsonProperty("kafka")
    public void setKafkaConfigurationFactory(KafkaConfigurationFactory kafkaConfigurationFactory) {
        this.kafkaConfigurationFactory = kafkaConfigurationFactory;

        this.commandDispatcherFactory = new CommandDispatcherFactory();
        this.commandDispatcherFactory.setBoostrap(kafkaConfigurationFactory.getBootstrap());

        this.streamBroadcasterFactory = new StreamBroadcasterFactory();
        this.streamBroadcasterFactory.setBootstrap(kafkaConfigurationFactory.getBootstrap());
    }

    public CommandDispatcherFactory getCommandDispatcherFactory() {
        return commandDispatcherFactory;
    }

    public StreamBroadcasterFactory getStreamBroadcasterFactory() {