Package step.functions
Class Function
- java.lang.Object
-
- step.core.accessors.AbstractIdentifiableObject
-
- step.core.accessors.AbstractOrganizableObject
-
- step.functions.Function
-
- Direct Known Subclasses:
CompositeFunction
,GeneralScriptFunction
,JMeterFunction
,LocalPlanRunner.LocalFunction
,NodeFunction
public class Function extends AbstractOrganizableObject
This class encapsulates all the configuration parameters of functions (aka Keywords) which can also be defined on the configuration dialog of Keywords in the UI
-
-
Field Summary
Fields Modifier and Type Field Description static String
APPLICATION
protected DynamicValue<Integer>
callTimeout
protected String
description
protected boolean
executeLocally
protected String
htmlTemplate
protected boolean
managed
protected javax.json.JsonObject
schema
protected Map<String,String>
tokenSelectionCriteria
protected boolean
useCustomTemplate
-
Fields inherited from class step.core.accessors.AbstractOrganizableObject
attributes, NAME, VERSION
-
Fields inherited from class step.core.accessors.AbstractIdentifiableObject
_id, customFields
-
-
Constructor Summary
Constructors Constructor Description Function()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicValue<Integer>
getCallTimeout()
String
getDescription()
String
getHtmlTemplate()
javax.json.JsonObject
getSchema()
Map<String,String>
getTokenSelectionCriteria()
boolean
isExecuteLocally()
boolean
isManaged()
boolean
isUseCustomTemplate()
boolean
requiresLocalExecution()
void
setCallTimeout(DynamicValue<Integer> callTimeout)
void
setDescription(String description)
void
setExecuteLocally(boolean executeLocally)
Defines if the function has to be executed on a local tokenvoid
setHtmlTemplate(String customTemplateContent)
Sets the HTML code to be used as template when editing the function in the plan editorvoid
setManaged(boolean managed)
void
setSchema(javax.json.JsonObject schema)
Sets the JSON schema to be used to validate the function's input at execution timevoid
setTokenSelectionCriteria(Map<String,String> tokenSelectionCriteria)
Defines additional selection criteria of agent token on which the function should be executedvoid
setUseCustomTemplate(boolean customTemplate)
-
Methods inherited from class step.core.accessors.AbstractOrganizableObject
addAttribute, getAttributes, setAttributes
-
Methods inherited from class step.core.accessors.AbstractIdentifiableObject
addCustomField, computeCustomFieldIfAbsent, equals, getCustomField, getCustomField, getCustomFields, getId, hashCode, setCustomFields, setId
-
-
-
-
Field Detail
-
callTimeout
protected DynamicValue<Integer> callTimeout
-
schema
protected javax.json.JsonObject schema
-
executeLocally
protected boolean executeLocally
-
managed
protected boolean managed
-
useCustomTemplate
protected boolean useCustomTemplate
-
htmlTemplate
protected String htmlTemplate
-
description
protected String description
-
APPLICATION
public static final String APPLICATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
setTokenSelectionCriteria
public void setTokenSelectionCriteria(Map<String,String> tokenSelectionCriteria)
Defines additional selection criteria of agent token on which the function should be executed- Parameters:
tokenSelectionCriteria
- a map containing the additional selection criteria as key-value pairs
-
isExecuteLocally
public boolean isExecuteLocally()
- Returns:
- if the function has to be executed on a local token
-
setExecuteLocally
public void setExecuteLocally(boolean executeLocally)
Defines if the function has to be executed on a local token- Parameters:
executeLocally
-
-
getCallTimeout
public DynamicValue<Integer> getCallTimeout()
-
setCallTimeout
public void setCallTimeout(DynamicValue<Integer> callTimeout)
- Parameters:
callTimeout
- the call timeout of the function in ms
-
getSchema
public javax.json.JsonObject getSchema()
-
setSchema
public void setSchema(javax.json.JsonObject schema)
Sets the JSON schema to be used to validate the function's input at execution time- Parameters:
schema
- the JSON schema of the function. See https://json-schema.org/ for more details concerning JSON schema.
-
requiresLocalExecution
public boolean requiresLocalExecution()
-
isManaged
public boolean isManaged()
-
setManaged
public void setManaged(boolean managed)
-
isUseCustomTemplate
public boolean isUseCustomTemplate()
-
setUseCustomTemplate
public void setUseCustomTemplate(boolean customTemplate)
-
getHtmlTemplate
public String getHtmlTemplate()
-
setHtmlTemplate
public void setHtmlTemplate(String customTemplateContent)
Sets the HTML code to be used as template when editing the function in the plan editor- Parameters:
schema
- the JSON schema of the function. See https://json-schema.org/ for more details concerning JSON schema.
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
-