Class AppManagerServiceImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      AppManagerServiceImpl​(AppFactory appFactory, org.molgenis.data.DataService dataService, org.molgenis.data.file.FileStore fileStore, com.google.gson.Gson gson, org.molgenis.data.plugin.model.PluginFactory pluginFactory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activateApp​(App app)
      Activate an App by App id
      AppConfig checkAndObtainConfig​(java.lang.String tempDir, java.lang.String configContent)
      Check the app-configuration and obtain the AppConfig if the configuration is valid
      void configureApp​(AppConfig appConfig, java.lang.String htmlTemplate)
      Configure app in database.
      void deactivateApp​(App app)
      Deactivate an App by App id
      void deleteApp​(java.lang.String id)
      Delete an existing App
      java.lang.String extractFileContent​(java.lang.String appDir, java.lang.String fileName)
      Get the UTF-8 file-content of a file served by an app
      AppResponse getAppByName​(java.lang.String appName)
      Retrieve an AppResponse based a unique URI
      java.util.List<AppResponse> getApps()
      Retrieve a list of AppResponses
      java.lang.String uploadApp​(java.io.InputStream zipData, java.lang.String zipFileName, java.lang.String formFieldName)
      Upload an app If zip fails to verify, throw an exception with the missing information
      • Methods inherited from class java.lang.Object

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

      • AppManagerServiceImpl

        public AppManagerServiceImpl​(AppFactory appFactory,
                                     org.molgenis.data.DataService dataService,
                                     org.molgenis.data.file.FileStore fileStore,
                                     com.google.gson.Gson gson,
                                     org.molgenis.data.plugin.model.PluginFactory pluginFactory)
    • Method Detail

      • deleteApp

        @Transactional
        public void deleteApp​(java.lang.String id)
        Description copied from interface: AppManagerService
        Delete an existing App
        Specified by:
        deleteApp in interface AppManagerService
        Parameters:
        id - The id of an App
      • uploadApp

        public java.lang.String uploadApp​(java.io.InputStream zipData,
                                          java.lang.String zipFileName,
                                          java.lang.String formFieldName)
                                   throws java.io.IOException
        Description copied from interface: AppManagerService
        Upload an app If zip fails to verify, throw an exception with the missing information
        Specified by:
        uploadApp in interface AppManagerService
        Parameters:
        zipData - steam with app data in zip from
        zipFileName - the name of the zip file
        formFieldName - the value of the name field in the form
        Returns:
        temporary directory for app
        Throws:
        java.io.IOException
      • checkAndObtainConfig

        public AppConfig checkAndObtainConfig​(java.lang.String tempDir,
                                              java.lang.String configContent)
                                       throws java.io.IOException
        Description copied from interface: AppManagerService
        Check the app-configuration and obtain the AppConfig if the configuration is valid
        Specified by:
        checkAndObtainConfig in interface AppManagerService
        Parameters:
        tempDir - temporary directory with uploadede app-content
        Returns:
        appConfig
        Throws:
        java.io.IOException
      • configureApp

        @Transactional
        public void configureApp​(AppConfig appConfig,
                                 java.lang.String htmlTemplate)
        Description copied from interface: AppManagerService
        Configure app in database.
        Specified by:
        configureApp in interface AppManagerService
        Parameters:
        appConfig - app configuration object
        htmlTemplate - HTML template based on the packaged index.html
      • extractFileContent

        public java.lang.String extractFileContent​(java.lang.String appDir,
                                                   java.lang.String fileName)
        Description copied from interface: AppManagerService
        Get the UTF-8 file-content of a file served by an app
        Specified by:
        extractFileContent in interface AppManagerService
        Parameters:
        appDir - app directory
        fileName - file name
        Returns:
        UTF-8 file-content