Class FunctionRequest

java.lang.Object
com.appiancorp.suiteapi.expression.FunctionRequest
All Implemented Interfaces:
Serializable

public class FunctionRequest extends Object implements Serializable

This class encapsulates a request by a user for a function to be evaluated.

See Also:
  • Field Details

    • FROM_EXECUTION

      public static final Long FROM_EXECUTION
    • FROM_DESIGN

      public static final Long FROM_DESIGN
  • Constructor Details

    • FunctionRequest

      public FunctionRequest()
  • Method Details

    • getExpressionId

      public Long getExpressionId()
      Gets the unique id of expression needed so asynchronous calls can be made
      Returns:
      Unique id of expression being evaluated by Java
    • setExpressionId

      public void setExpressionId(Long id_)
      Sets the unique id of expression needed so asynchronous calls can be made
      Parameters:
      id_ - Unique id of expression
    • getFunction

      public String getFunction()
      Gets the function name will be lower cased, as Interface is case insensitive
      Returns:
      String function name
    • setFunction

      public void setFunction(String function_)
      Sets the function name will be lower cased, as Interface is case insensitive
      Parameters:
      function_ - Function name
    • getDomain

      public String getDomain()
      Gets the domain that will be used to look up the function. Can be null or empty string, in which case, the fn! domain should be assumed
      Returns:
      String domain to use
    • setDomain

      public void setDomain(String domain)
      Sets the domain that will be used to look up the function. Not setting this method, or setting a null or empty string will result in the fn! domain being assumed.
      Parameters:
      domain - String domain
    • getFunctionNameWithDomain

      @Transient public String getFunctionNameWithDomain()
      Gets the function name together with the domain. The wildcard domain "all" will be ommitted from the result.
      Returns:
      the String representation of the function name together with the domain in the standard domain!function format
    • getFunctionParameters

      public NamedTypedValue[] getFunctionParameters()
      Gets parameters that will be arguments to Java function
      Returns:
      function parameters with type and value
    • setFunctionParameters

      public void setFunctionParameters(NamedTypedValue[] parameters_)
      Sets parameters that will be arguments to Java function
      Parameters:
      parameters_ - function parameters with type and value
    • getOriginServerType

      public Long getOriginServerType()
      Gets the type of server that the function request came from.
      Returns:
      ServerType that the request came from.
    • setOriginServerType

      public void setOriginServerType(Long originServerType_)
      Sets the type of server that the function request came from.
      Parameters:
      originServerType_ - type of server that request came from.
    • toFunctionString

      public static String toFunctionString(String _function, NamedTypedValue[] _functionParameters)
    • toFunctionString

      public static String toFunctionString(String domain, String _function, NamedTypedValue[] _functionParameters)
      Creates an Appian expression for the specified function and parameters
      Parameters:
      domain - the domain of the function
      _function - the name of the function
      _functionParameters - - An array of function parameters
      Returns:
      a String representation of the a function call in the expressions language
    • toString

      public String toString()
      Returns the String representation of the Function Request object. This will specify the function's Expression ID, context, function name and parameters.
      Overrides:
      toString in class Object
      Returns:
      String the String representation of the object