Class UserNameMacroProcessor

java.lang.Object
wt.query.report.UserNameMacroProcessor
All Implemented Interfaces:
Serializable, MacroExpressionProcessor

public class UserNameMacroProcessor extends Object implements MacroExpressionProcessor, Serializable
This class implements a macro processor for returning the name of the current session Principal.

Supported API: true

Extendable: true
See Also:
  • Method Details

    • buildExpression

      public ColumnExpression buildExpression(Element a_element, Map a_parameterMap) throws QMLException
      Returns the current user name as a ContantExpression. This method is called during report query execution. The information related to the macro's context are not used.

      Supported API: true
      Specified by:
      buildExpression in interface MacroExpressionProcessor
      Parameters:
      a_element - A DOM tree element associated with the QML query context where this macro is used.
      a_parameterMap - Map of parameters associated with the query that is being executed.
      Returns:
      ColumnExpression value to be used in a QuerySpec
      Throws:
      QMLException
    • getValue

      public Object getValue() throws WTException
      Returns the current user name. This method is called when rendering pre-specified values on the report input user interface.

      Supported API: true
      Specified by:
      getValue in interface MacroExpressionProcessor
      Returns:
      Object value to be used to populate a field in the UI
      Throws:
      WTException