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
package org.wso2.carbon.game.producer; | |
import org.wso2.carbon.game.producer.model.Champion; | |
import java.util.List; | |
public interface GameProducer { | |
void createChampion(String championName); |
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
package org.wso2.carbon.game.producer; | |
import org.wso2.carbon.game.producer.model.Champion; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.logging.Logger; | |
public class GameProducerImpl implements GameProducer { |
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
package org.wso2.carbon.game.producer.internal; | |
import org.osgi.framework.BundleContext; | |
import org.osgi.service.component.ComponentContext; | |
import org.osgi.service.component.annotations.Activate; | |
import org.osgi.service.component.annotations.Component; | |
import org.osgi.service.component.annotations.Deactivate; | |
import org.wso2.carbon.game.producer.GameProducer; | |
import org.wso2.carbon.game.producer.GameProducerImpl; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<parent> | |
<artifactId>game-manager</artifactId> | |
<groupId>org.wso2.carbon</groupId> | |
<version>1.0-SNAPSHOT</version> | |
</parent> | |
<modelVersion>4.0.0</modelVersion> |
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
package org.wso2.carbon.game.consumer; | |
import org.wso2.carbon.game.consumer.internal.GameConsumerDataHolder; | |
public class GameConsumer { | |
public void getChampionCreated(String championName) { | |
GameConsumerDataHolder.getInstance().getGameProducer().createChampion(championName); | |
} |
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
package org.wso2.carbon.game.consumer.internal; | |
import org.osgi.service.component.ComponentContext; | |
import org.osgi.service.component.annotations.Activate; | |
import org.osgi.service.component.annotations.Component; | |
import org.osgi.service.component.annotations.Reference; | |
import org.osgi.service.component.annotations.ReferenceCardinality; | |
import org.osgi.service.component.annotations.ReferencePolicy; | |
import org.wso2.carbon.game.consumer.GameConsumer; | |
import org.wso2.carbon.game.producer.GameProducer; |
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
package org.wso2.carbon.game.consumer.internal; | |
import org.wso2.carbon.game.producer.GameProducer; | |
import java.util.logging.Logger; | |
public class GameConsumerDataHolder { | |
private static final Logger LOGGER = Logger.getLogger(GameConsumerDataHolder.class.getName()); | |
private static GameConsumerDataHolder instance = new GameConsumerDataHolder(); | |
private GameProducer gameProducer; |
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
package com.explore.california; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
@SpringBootApplication | |
public class CaliforniaApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(CaliforniaApplication.class, args); |
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
package com.explore.california.model; | |
import javax.persistence.*; | |
import java.util.Objects; | |
@Entity | |
public class Tour { | |
@Id |
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
package com.explore.california.model; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.Id; | |
import java.util.Objects; | |
@Entity | |
public class TourPackage { |