Interface GuideThemeService


  • public interface GuideThemeService
    The GuideThemeService interface declares the basic operations required for creating and updating themes.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getEmbeddingCode​(java.lang.String themeContentPath, java.lang.String formPath)
      Function to get the combined embed code(script tag or link tag) of all web font services, which needs to be included in html code for using fonts from any web font service.
      java.util.List<java.lang.String> getFontList​(java.lang.String themeContentPath)
      Generates a list of fonts that are available for the theme that is passed as parameter.
      boolean migrateTheme​(Resource themeResource)
      Update Theme Migration
      boolean updateThemeConfig​(java.lang.String themeContentPath, JSONObject configJson)
      Update Theme Configuration values
    • Method Detail

      • updateThemeConfig

        boolean updateThemeConfig​(java.lang.String themeContentPath,
                                  JSONObject configJson)
                           throws GuideException
        Update Theme Configuration values
        Parameters:
        themeContentPath - The repository path of theme asset till jcr:content node
        configJson - the Json object containing the theme configuration information
        Returns:
        true if configuration was updated successfully, else false.
        Throws:
        GuideException
      • migrateTheme

        boolean migrateTheme​(Resource themeResource)
                      throws GuideException
        Update Theme Migration
        Parameters:
        themeResource - Theme Resource
        Returns:
        true if configuration was updated successfully, else false.
        Throws:
        GuideException
      • getFontList

        java.util.List<java.lang.String> getFontList​(java.lang.String themeContentPath)
        Generates a list of fonts that are available for the theme that is passed as parameter. Includes all web fonts that are configured for the theme and default fonts that are available across all themes.
        Parameters:
        themeContentPath - The path to jcr:content of theme
        Returns:
        String[] of all font list
      • getEmbeddingCode

        java.lang.String getEmbeddingCode​(java.lang.String themeContentPath,
                                          java.lang.String formPath)
        Function to get the combined embed code(script tag or link tag) of all web font services, which needs to be included in html code for using fonts from any web font service.
        Parameters:
        themeContentPath - The path to jcr:content of theme for which web fonts have been configured.
        formPath - Path of form resource on which the theme is applied
        Returns:
        The code (script and link tags) to be included to in html for using all web font services.