// Path: identity-service/src/main/java/eu/nimble/core/infrastructure/identity/config/KafkaConfig.java
// public static class AuthorizedCompanyUpdate {
//     private String companyId;
//     private String accessToken;
// 
//     public AuthorizedCompanyUpdate() {
//     }
// 
//     public AuthorizedCompanyUpdate(String companyId, String accessToken) {
//         this.companyId = companyId;
//         this.accessToken = accessToken;
//     }
// 
//     public String getCompanyId() {
//         return companyId;
//     }
// 
//     public void setCompanyId(String companyID) {
//         this.companyId = companyID;
//     }
// 
//     public String getAccessToken() {
//         return accessToken;
//     }
// 
//     public void setAccessToken(String accessToken) {
//         this.accessToken = accessToken;
//     }
// }


import eu.nimble.core.infrastructure.identity.config.KafkaConfig.AuthorizedCompanyUpdate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;
package eu.nimble.core.infrastructure.identity.messaging;


/**
 * Created by Johannes Innerbichler on 27.09.18.
 */

@Component
public class KafkaSender {

    @Value("${nimble.kafka.topics.companyUpdates}")
    private String companyUpdatesTopic;

    @Value("${nimble.kafka.topics.ratingsUpdates}")
    private String ratingsUpdatesTopic;

    @Autowired
// Path: identity-service/src/main/java/eu/nimble/core/infrastructure/identity/config/KafkaConfig.java
// public static class AuthorizedCompanyUpdate {
//     private String companyId;
//     private String accessToken;
// 
//     public AuthorizedCompanyUpdate() {
//     }
// 
//     public AuthorizedCompanyUpdate(String companyId, String accessToken) {
//         this.companyId = companyId;
//         this.accessToken = accessToken;
//     }
// 
//     public String getCompanyId() {
//         return companyId;
//     }
// 
//     public void setCompanyId(String companyID) {
//         this.companyId = companyID;
//     }
// 
//     public String getAccessToken() {
//         return accessToken;
//     }
// 
//     public void setAccessToken(String accessToken) {
//         this.accessToken = accessToken;
//     }
// }


// Path: identity-service/src/main/java/eu/nimble/core/infrastructure/identity/messaging/KafkaSender.java
import eu.nimble.core.infrastructure.identity.config.KafkaConfig.AuthorizedCompanyUpdate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

package eu.nimble.core.infrastructure.identity.messaging;


/**
 * Created by Johannes Innerbichler on 27.09.18.
 */

@Component
public class KafkaSender {

    @Value("${nimble.kafka.topics.companyUpdates}")
    private String companyUpdatesTopic;

    @Value("${nimble.kafka.topics.ratingsUpdates}")
    private String ratingsUpdatesTopic;

    @Autowired
    private KafkaTemplate<String, AuthorizedCompanyUpdate> kafkaTemplate;