Class MapController<E extends Map,​D extends MapDao<E>,​S extends MapService<E,​D>>


  • @Controller
    @RequestMapping("/maps")
    public class MapController<E extends Map,​D extends MapDao<E>,​S extends MapService<E,​D>>
    extends java.lang.Object
    Author:
    Johannes Weskamm, Kai Volland
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        MapController()
      Default constructor, which calls the type-constructor
      protected MapController​(java.lang.Class<E> type)
      Constructor that sets the concrete type for this controller.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> setLayersForMap​(java.lang.Integer mapModuleId, java.util.List<java.lang.Integer> layerIds)
      Set layers for map
      void setService​(S service)
      We have to use Qualifier to define the correct service here.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COULD_NOT_SET_ERROR_MSG

        public static final java.lang.String COULD_NOT_SET_ERROR_MSG
        See Also:
        Constant Field Values
    • Constructor Detail

      • MapController

        public MapController()
        Default constructor, which calls the type-constructor
      • MapController

        protected MapController​(java.lang.Class<E> type)
        Constructor that sets the concrete type for this controller. Subclasses MUST call this constructor.
    • Method Detail

      • setService

        @Autowired
        @Qualifier("mapService")
        public void setService​(S service)
        We have to use Qualifier to define the correct service here. Otherwise, spring can not decide which service has to be autowired here as there are multiple candidates.
      • setLayersForMap

        @RequestMapping(value="/setLayersForMap.action",
                        method=POST)
        @ResponseBody
        public java.util.Map<java.lang.String,​java.lang.Object> setLayersForMap​(@RequestParam("mapModuleId")
                                                                                      java.lang.Integer mapModuleId,
                                                                                      @RequestParam("layerIds")
                                                                                      java.util.List<java.lang.Integer> layerIds)
        Set layers for map
        Parameters:
        mapModuleId - The map module id
        layerIds - The list of layer ids
        Returns: