Interface AppManagerService

    • Method Detail

      • activateApp

        void activateApp​(App app)
        Activate an App by App id
        Parameters:
        app - The App
      • deactivateApp

        void deactivateApp​(App app)
        Deactivate an App by App id
        Parameters:
        app - The App
      • uploadApp

        String uploadApp​(InputStream zipData,
                         String zipFileName,
                         String formFieldName)
                  throws IOException
        Upload an app If zip fails to verify, throw an exception with the missing information
        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:
        IOException
        InvalidAppArchiveException - if the zipData cannot be unzipped
      • checkAndObtainConfig

        AppConfig checkAndObtainConfig​(String tempDir,
                                       String configContent)
                                throws IOException
        Check the app-configuration and obtain the AppConfig if the configuration is valid
        Parameters:
        tempDir - temporary directory with uploadede app-content
        Returns:
        appConfig
        Throws:
        IOException
      • configureApp

        void configureApp​(AppConfig appConfig,
                          String htmlTemplate)
        Configure app in database.
        Parameters:
        appConfig - app configuration object
        htmlTemplate - HTML template based on the packaged index.html
      • extractFileContent

        String extractFileContent​(String appDir,
                                  String fileName)
        Get the UTF-8 file-content of a file served by an app
        Parameters:
        appDir - app directory
        fileName - file name
        Returns:
        UTF-8 file-content