Interface ScriptManager

  • All Superinterfaces:
    io.vertigo.core.node.component.Component, io.vertigo.core.node.component.CoreComponent, io.vertigo.core.node.component.Manager
    All Known Implementing Classes:
    ScriptManagerImpl

    public interface ScriptManager
    extends io.vertigo.core.node.component.Manager
    Manages scripts. A script is composed of expressions. A script (and experssions) can be parameterized.
    Author:
    pchretien
    • Method Detail

      • parse

        void parse​(String script,
                   ScriptParserHandler scriptHandler,
                   ScriptSeparator separator)
        Parses the script with a specific handler. the grammar is defined by simple tags balises (separators).
        Parameters:
        script - the script to analyse
        scriptHandler - the hander
        separator - the allowed separators in the grammar.
      • evaluateScript

        String evaluateScript​(String script,
                              SeparatorType separatorType,
                              List<ExpressionParameter> parameters)
        Evaluates the script, transforms a script into a text.
        Parameters:
        script - the script
        separatorType - the type of separator
        parameters - the parameters
        Returns:
        the evaluated script as a simplet text
      • evaluateExpression

        <J> J evaluateExpression​(String expression,
                                 List<ExpressionParameter> parameters,
                                 Class<J> type)
        Evaluates an expression. Examples of expressions written in java - name - birthDate - age>20 - salary>5000 && age <30 - name + surName
        Parameters:
        expression - the expression
        parameters - the parameters
        type - the returned type
        Returns:
        the evaluated expression