Class Function
java.lang.Object
com.appiancorp.suiteapi.expression.Function
- All Implemented Interfaces:
Serializable
,Comparable<Function>
This class represents a function in the Expression Editor.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFunctionParameter
(FunctionParameter parameter) Adds a parameter to the function's parameters.int
boolean
Gets the name of the parent category for the functionGets the description of the functionReturns the domain of this function.Gets the path to the external resource containing the description of the function.Gets a name with both domain and name in it but only ifgetDomain()
is not null or empty.Gets the parameters for the functiongetName()
Gets the unique name of the functionReturn the outputTypename of the function.int
hashCode()
boolean
Getstrue
orfalse
depending on whether the function should be hidden from autosuggestboolean
Getstrue
orfalse
depending on whether the function can have translatable parametersboolean
Getstrue
orfalse
depending on whether the function can have unlimited parametersvoid
setCategoryName
(String name) Sets the name of the parent category for the functionvoid
setDescription
(String description) Sets the description of the functionvoid
Sets the domain of this function.void
setExternalDescription
(String externalDescription) Sets the path to the external resource containing the description of the function.void
setFunctionParameters
(FunctionParameter[] parameters) Sets the parameters for the functionvoid
setHiddenFromAutosuggest
(boolean hiddenFromAutosuggest) Setstrue
orfalse
depending on whether the function should be hidden from autosuggestvoid
setI18nKey
(String i18nKey) void
Sets the unique name of the functionvoid
setOutputSystemTypename
(String outputSystemTypename) Set the outputTypename of the function.void
setOutputType
(String outputType) void
setTranslatableParameters
(boolean translatableParameters) Setstrue
orfalse
depending on whether the function can have translatable parametersvoid
setUnlimitedParameters
(boolean parameters) Setstrue
orfalse
depending on whether the function can have unlimited parameterstoString()
-
Constructor Details
-
Function
public Function() -
Function
-
Function
-
-
Method Details
-
getCategoryName
Gets the name of the parent category for the function- Returns:
- String name of parent category
-
setCategoryName
Sets the name of the parent category for the function- Parameters:
name
- String name of parent category
-
getDescription
Gets the description of the function- Returns:
- String description of function
-
setDescription
Sets the description of the function- Parameters:
description
- String description of function
-
getExternalDescription
Gets the path to the external resource containing the description of the function. The path must be relative to the root of the servlet context and begin with a '/'.An example of a valid path is
/components/expeditor/functions/text.jsp
- Returns:
- path to the resource
-
setExternalDescription
Sets the path to the external resource containing the description of the function. The path must be relative to the root of the servlet context and begin with a '/'.An example of a valid path is
/components/expeditor/functions/text.jsp
- Parameters:
externalDescription
- path to the resource
-
getFunctionParameters
Gets the parameters for the function- Returns:
- an array of
FunctionParameter
objects representing the parameters for the function - See Also:
-
setFunctionParameters
Sets the parameters for the function- Parameters:
parameters
- an array ofFunctionParameter
objects representing the parameters to set for the function- See Also:
-
addFunctionParameter
Adds a parameter to the function's parameters.- Parameters:
parameter
- The parameter to add.
-
getName
Gets the unique name of the function- Returns:
- Unique String name of function
-
getFullName
Gets a name with both domain and name in it but only ifgetDomain()
is not null or empty. Otherwise, this returns the same asgetName()
returns. -
setName
Sets the unique name of the function- Parameters:
name
- Unique String name of function
-
getDomain
Returns the domain of this function. The domain qualifies the name of the function. The syntax is domain!name. Domain examples are "fn", "pv", "a", etc. -
setDomain
Sets the domain of this function. This value cannot be updated on the server. -
isUnlimitedParameters
public boolean isUnlimitedParameters()Getstrue
orfalse
depending on whether the function can have unlimited parameters- Returns:
true
orfalse
if function can have unlimited parameters or not
-
setUnlimitedParameters
public void setUnlimitedParameters(boolean parameters) Setstrue
orfalse
depending on whether the function can have unlimited parameters- Parameters:
parameters
-true
orfalse
if function can have unlimited parameters or not
-
getOutputType
-
setOutputType
-
getI18nKey
-
setI18nKey
-
isHiddenFromAutosuggest
public boolean isHiddenFromAutosuggest()Getstrue
orfalse
depending on whether the function should be hidden from autosuggest -
setHiddenFromAutosuggest
public void setHiddenFromAutosuggest(boolean hiddenFromAutosuggest) Setstrue
orfalse
depending on whether the function should be hidden from autosuggest -
isTranslatableParameters
public boolean isTranslatableParameters()Getstrue
orfalse
depending on whether the function can have translatable parameters- Returns:
true
orfalse
if function can have translatable parameters or not
-
setTranslatableParameters
public void setTranslatableParameters(boolean translatableParameters) Setstrue
orfalse
depending on whether the function can have translatable parameters- Parameters:
parameters
-true
orfalse
if function can have translatable parameters or not
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Function>
-
toString
-
getOutputSystemTypename
Return the outputTypename of the function.- Returns:
- the outputTypename of the function
-
setOutputSystemTypename
Set the outputTypename of the function. This attribute is not required and it is mutually exclusive with outputType. Use the outputTypename instead of the outputType if the output type is not a built-in system type like Integer or String. Setting the outputTypeName triggers retrieving the actual type from the outputTypename and setting the outputType attribute.- Parameters:
outputTypename
-- See Also:
-