Class DataExplorerController


  • @Controller
    @RequestMapping("/plugin/dataexplorer")
    public class DataExplorerController
    extends org.molgenis.web.PluginController
    Controller class for the data explorer.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ID  
      static java.lang.String MOD_DATA  
      static java.lang.String MOD_ENTITIESREPORT  
      static java.lang.String NAVIGATOR  
      static java.lang.String URI  
      static java.lang.String VIEW_NAME  
      • Fields inherited from class org.molgenis.web.PluginController

        PLUGIN_URI_PREFIX
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void download​(java.lang.String dataRequestStr, javax.servlet.http.HttpServletResponse response)  
      java.lang.String getDownloadFilename​(java.lang.String entityTypeId, java.time.LocalDateTime localDateTime, DataRequest.DownloadType downloadType)  
      java.lang.String getModule​(java.lang.String moduleId, java.lang.String entityTypeId, org.springframework.ui.Model model)  
      ModulesConfigResponse getModules​(java.lang.String entityTypeId)
      Returns modules configuration for this entity based on current user permissions.
      java.util.List<NavigatorLink> getNavigatorLinks​(java.lang.String entityTypeId)  
      java.lang.String init​(java.lang.String selectedEntityName, java.lang.String selectedEntityId, org.springframework.ui.Model model)
      Show the explorer page
      boolean showCopy​(java.lang.String entityTypeId)  
      java.lang.String viewEntityDetails​(java.lang.String entityTypeId, java.lang.String entityId, org.springframework.ui.Model model)
      Builds a model containing one entity and returns the entityReport ftl view
      java.lang.String viewEntityDetailsById​(java.lang.String entityTypeId, java.lang.String entityId, org.springframework.ui.Model model)
      Builds a model containing one entity and returns standalone report ftl view
      • Methods inherited from class org.molgenis.web.PluginController

        getId, getPluginSettings, getUri
      • Methods inherited from class java.lang.Object

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

      • DataExplorerController

        public DataExplorerController()
    • Method Detail

      • init

        @Transactional(readOnly=true)
        @GetMapping
        public java.lang.String init​(@RequestParam(value="entity",required=false)
                                     java.lang.String selectedEntityName,
                                     @RequestParam(value="entityId",required=false)
                                     java.lang.String selectedEntityId,
                                     org.springframework.ui.Model model)
        Show the explorer page
        Returns:
        the view name
      • getModule

        @GetMapping("/module/{moduleId}")
        public java.lang.String getModule​(@PathVariable("moduleId")
                                          java.lang.String moduleId,
                                          @RequestParam("entity")
                                          java.lang.String entityTypeId,
                                          org.springframework.ui.Model model)
      • showCopy

        @GetMapping("/copy")
        @ResponseBody
        public boolean showCopy​(@RequestParam("entity")
                                java.lang.String entityTypeId)
      • getModules

        @GetMapping("/modules")
        @ResponseBody
        public ModulesConfigResponse getModules​(@RequestParam("entity")
                                                java.lang.String entityTypeId)
        Returns modules configuration for this entity based on current user permissions.
      • getNavigatorLinks

        @GetMapping("/navigatorLinks")
        @ResponseBody
        public java.util.List<NavigatorLink> getNavigatorLinks​(@RequestParam("entity")
                                                               java.lang.String entityTypeId)
      • download

        @PostMapping("/download")
        public void download​(@RequestParam("dataRequest")
                             java.lang.String dataRequestStr,
                             javax.servlet.http.HttpServletResponse response)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getDownloadFilename

        public java.lang.String getDownloadFilename​(java.lang.String entityTypeId,
                                                    java.time.LocalDateTime localDateTime,
                                                    DataRequest.DownloadType downloadType)
      • viewEntityDetails

        @PostMapping("/details")
        public java.lang.String viewEntityDetails​(@RequestParam("entityTypeId")
                                                  java.lang.String entityTypeId,
                                                  @RequestParam("entityId")
                                                  java.lang.String entityId,
                                                  org.springframework.ui.Model model)
        Builds a model containing one entity and returns the entityReport ftl view
        Returns:
        entity report view
        Throws:
        java.lang.Exception - if an entity name or id is not found
      • viewEntityDetailsById

        @GetMapping("/details/{entityTypeId}/{entityId}")
        public java.lang.String viewEntityDetailsById​(@PathVariable("entityTypeId")
                                                      java.lang.String entityTypeId,
                                                      @PathVariable("entityId")
                                                      java.lang.String entityId,
                                                      org.springframework.ui.Model model)
        Builds a model containing one entity and returns standalone report ftl view
        Returns:
        standalone report view
        Throws:
        java.lang.Exception - if an entity name or id is not found
        org.molgenis.data.MolgenisDataAccessException - if an EntityType does not exist