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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFunctionParameter(FunctionParameter parameter) Adds a parameter to the function's parameters.intbooleanGets 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.inthashCode()booleanGetstrueorfalsedepending on whether the function should be hidden from autosuggestbooleanGetstrueorfalsedepending on whether the function should display documentationbooleanGetstrueorfalsedepending on whether the function can have translatable parametersbooleanGetstrueorfalsedepending on whether the function can have unlimited parametersvoidsetCategoryName(String name) Sets the name of the parent category for the functionvoidsetDescription(String description) Sets the description of the functionvoidSets the domain of this function.voidsetExternalDescription(String externalDescription) Sets the path to the external resource containing the description of the function.voidsetFunctionParameters(FunctionParameter[] parameters) Sets the parameters for the functionvoidsetHiddenFromAutosuggest(boolean hiddenFromAutosuggest) Setstrueorfalsedepending on whether the function should be hidden from autosuggestvoidsetHiddenFromDocumentation(boolean hiddenFromDocumentation) Setstrueorfalsedepending on whether the function should display documentationvoidsetI18nKey(String i18nKey) voidSets the unique name of the functionvoidsetOutputSystemTypename(String outputSystemTypename) Set the outputTypename of the function.voidsetOutputType(String outputType) voidsetTranslatableParameters(boolean translatableParameters) Setstrueorfalsedepending on whether the function can have translatable parametersvoidsetUnlimitedParameters(boolean parameters) Setstrueorfalsedepending 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
FunctionParameterobjects representing the parameters for the function - See Also:
-
setFunctionParameters
Sets the parameters for the function- Parameters:
parameters- an array ofFunctionParameterobjects 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()Getstrueorfalsedepending on whether the function can have unlimited parameters- Returns:
trueorfalseif function can have unlimited parameters or not
-
setUnlimitedParameters
public void setUnlimitedParameters(boolean parameters) Setstrueorfalsedepending on whether the function can have unlimited parameters- Parameters:
parameters-trueorfalseif function can have unlimited parameters or not
-
getOutputType
-
setOutputType
-
getI18nKey
-
setI18nKey
-
isHiddenFromAutosuggest
public boolean isHiddenFromAutosuggest()Getstrueorfalsedepending on whether the function should be hidden from autosuggest -
setHiddenFromAutosuggest
public void setHiddenFromAutosuggest(boolean hiddenFromAutosuggest) Setstrueorfalsedepending on whether the function should be hidden from autosuggest -
isTranslatableParameters
public boolean isTranslatableParameters()Getstrueorfalsedepending on whether the function can have translatable parameters- Returns:
trueorfalseif function can have translatable parameters or not
-
setTranslatableParameters
public void setTranslatableParameters(boolean translatableParameters) Setstrueorfalsedepending on whether the function can have translatable parameters- Parameters:
parameters-trueorfalseif function can have translatable parameters or not
-
isHiddenFromDocumentation
public boolean isHiddenFromDocumentation()Getstrueorfalsedepending on whether the function should display documentation -
setHiddenFromDocumentation
public void setHiddenFromDocumentation(boolean hiddenFromDocumentation) Setstrueorfalsedepending on whether the function should display documentation -
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin 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:
-