Class AbstractScriptingStyleFactory
- java.lang.Object
-
- lumis.portal.serviceinterface.style.impl.scripting.AbstractScriptingStyleFactory
-
- All Implemented Interfaces:
IStyleFactory
- Direct Known Subclasses:
AbstractJavascriptStyleFactory
,GroovyStyleFactory
public abstract class AbstractScriptingStyleFactory extends java.lang.Object implements IStyleFactory
Abstract scripting style factory.- Since:
- 8.1.0
- Version:
- $Revision: 25303 $ $Date: 2022-10-22 22:48:02 -0300 (Sat, 22 Oct 2022) $
-
-
Constructor Summary
Constructors Constructor Description AbstractScriptingStyleFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IStyle
createCachedStyle(java.lang.String stylePath, java.util.List<ITheme> themes)
Creates a cached version of the requested style.protected IStyle
createCompiledStyle(javax.script.CompiledScript compiledScript)
Creates a new instance of a style with the given compiled script.IStyle
createDynamicStyle(java.lang.String styleString, java.lang.String stylePath, java.util.List<ITheme> themes)
Creates a dynamic version of the requested style using the given style text.IStyle
createDynamicStyle(java.lang.String stylePath, java.util.List<ITheme> themes)
Creates a dynamic version of the requested style.protected IStyle
createStyle(java.lang.String style, javax.script.ScriptEngine engine)
Creates a new instance of a style with the given script and engine.abstract javax.script.ScriptEngine
getScriptEngine()
Returns the script engine to be used.protected abstract IScriptingStyleTemplate
getTemplate()
Returns thestyle template
to be used.
-
-
-
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 interfaceIStyleFactory
- 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 interfaceIStyleFactory
- 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 interfaceIStyleFactory
- 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
-
getTemplate
protected abstract IScriptingStyleTemplate getTemplate()
Returns thestyle template
to be used.- Returns:
- the
style template
to be used. - Since:
- 8.1.0
-
-