Interface ScriptContext

All Superinterfaces:
BaseContext, SpecialistsBroker
All Known Subinterfaces:
ClientScriptContext, Content2ScriptContext, GenerationContext, GenerationScriptContext, GuiScriptContext, ProjectScriptContext, ScheduleContext, WorkflowScriptContext

public interface ScriptContext extends BaseContext
Common properties:
------------------
isWebClient (java.lang.Boolean) - since 4.2.404 - indicates whether this script context is executed in webclient or not.
(Note: This property has been deprecated with 5.0.12, use #isEnv(Env.WEBEDIT) instead)
Since:
2.3.10
  • Method Details

    • getConnection

      Connection getConnection()
      Return the Connection for the script context
      Returns:
      The Connection for the script context
      Since:
      3.1.170
    • getProperty

      @Nullable Object getProperty(String name)
      Returns the property specified by the given name or null if no property exists with the given name
      Returns:
      the property with the given name or null
      Since:
      2.3.10
    • setProperty

      void setProperty(String name, Object value)
      Creates a property entry for the given value identified by the given name. The created property will be available via getProperty(String) during the lifetime of this context.
      Parameters:
      name - the name of the property
      value - the value of the property
      Since:
      2.3.10
      See Also:
    • removeProperty

      void removeProperty(String name)
      Removes the property with the given name.
      Parameters:
      name - the of the property to be removed
      Since:
      2.3.10
    • getProperties

      String[] getProperties()
      Returns an array of property names existing in this context.
      Since:
      2.3.10
    • logDebug

      void logDebug(String message)
      Log a message with DEBUG level
      Specified by:
      logDebug in interface BaseContext
      Parameters:
      message - The message that is to be logged
      Since:
      3.1.158
    • logInfo

      void logInfo(String message)
      Log a message with INFO level
      Specified by:
      logInfo in interface BaseContext
      Parameters:
      message - The message that is to be logged
      Since:
      3.0.1
    • logWarning

      void logWarning(String message)
      Log a message with WARNING level
      Specified by:
      logWarning in interface BaseContext
      Parameters:
      message - The message that is to be logged
      Since:
      3.0.1
    • logError

      void logError(String message)
      Log a message with ERROR level
      Specified by:
      logError in interface BaseContext
      Parameters:
      message - The message that is to be logged
      Since:
      3.0.1
    • logError

      void logError(String message, Throwable ex)
      Log a message with ERROR level and the error that caused it.
      Specified by:
      logError in interface BaseContext
      Parameters:
      message - The message that is to be logged
      ex - The Throwable that caused the error
      Since:
      3.0.155