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