Class CityProductionStorage


  • @Service
    @Lazy
    @DependentInitialisation(MapInitializedBean.class)
    public class CityProductionStorage
    extends java.lang.Object
    This is a map of the production stores for all city owned workshops.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2016 Created on May 14, 2016
    • Field Detail

      • map

        @Autowired
        private IMap map
      • context

        @Autowired
        private org.springframework.context.ApplicationContext context
    • Constructor Detail

      • CityProductionStorage

        public CityProductionStorage()
    • Method Detail

      • init

        @PostConstruct
        private void init()
      • add

        public void add​(ICity city)
        Create the production storage for an additional city.
        Parameters:
        city - for which to add a production storage
      • getStorage

        public ProductionStorage getStorage​(ICity city)
        Retrieve the ProductionStorage for the city.
        Parameters:
        city - for which to retrieve the production storage
        Returns:
        production storage for the city.