Class AbstractScriptingStyleFactory

    • Constructor Detail

      • AbstractScriptingStyleFactory

        public AbstractScriptingStyleFactory()
    • Method Detail

      • getScriptEngine

        public abstract javax.script.ScriptEngine getScriptEngine()
        Returns the script engine to be used.
        Returns:
        the script engine to be used.
        Since:
        8.1.0
      • createCachedStyle

        public IStyle createCachedStyle​(java.lang.String stylePath,
                                        java.util.List<ITheme> themes)
                                 throws PortalException
        Description copied from interface: IStyleFactory
        Creates a cached version of the requested style.
        Specified by:
        createCachedStyle in interface IStyleFactory
        Parameters:
        stylePath - the style path.
        themes - the current applied themes.
        Returns:
        a cached version of the requested style.
        Throws:
        PortalException
      • createDynamicStyle

        public IStyle createDynamicStyle​(java.lang.String stylePath,
                                         java.util.List<ITheme> themes)
                                  throws PortalException
        Description copied from interface: IStyleFactory
        Creates a dynamic version of the requested style.
        Specified by:
        createDynamicStyle in interface IStyleFactory
        Parameters:
        stylePath - the style path.
        themes - the current applied themes.
        Returns:
        a dynamic version of the requested style.
        Throws:
        PortalException
      • createDynamicStyle

        public IStyle createDynamicStyle​(java.lang.String styleString,
                                         java.lang.String stylePath,
                                         java.util.List<ITheme> themes)
                                  throws PortalException
        Description copied from interface: IStyleFactory
        Creates a dynamic version of the requested style using the given style text.
        Specified by:
        createDynamicStyle in interface IStyleFactory
        Parameters:
        styleString - the style text.
        stylePath - the style path.
        themes - the current applied themes.
        Returns:
        a dynamic version of the requested style using the given style text.
        Throws:
        PortalException
      • createCompiledStyle

        protected IStyle createCompiledStyle​(javax.script.CompiledScript compiledScript)
        Creates a new instance of a style with the given compiled script.
        Parameters:
        compiledScript - the compiled script.
        Returns:
        a new instance of a style with the given compiled script.
        Since:
        8.1.0
      • createStyle

        protected IStyle createStyle​(java.lang.String style,
                                     javax.script.ScriptEngine engine)
        Creates a new instance of a style with the given script and engine.
        Parameters:
        style - the style script.
        engine - the script engine to be used.
        Returns:
        a new instance of a style with the given compiled script.
        Since:
        8.1.0