public class Function extends AbstractOrganizableObject
Modifier and Type | Field and 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 |
attributes, NAME, VERSION
_id, customFields
Constructor and Description |
---|
Function() |
Modifier and Type | Method and 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 token
|
void |
setHtmlTemplate(String customTemplateContent)
Sets the HTML code to be used as template when editing the function in the plan editor
|
void |
setManaged(boolean managed) |
void |
setSchema(javax.json.JsonObject schema)
Sets the JSON schema to be used to validate the function's input at execution time
|
void |
setTokenSelectionCriteria(Map<String,String> tokenSelectionCriteria)
Defines additional selection criteria of agent token on which the function should be executed
|
void |
setUseCustomTemplate(boolean customTemplate) |
addAttribute, getAttribute, getAttributes, hasAttribute, setAttributes
addCustomField, computeCustomFieldIfAbsent, equals, getCustomField, getCustomField, getCustomFields, getId, hashCode, setCustomFields, setId
protected DynamicValue<Integer> callTimeout
protected javax.json.JsonObject schema
protected boolean executeLocally
protected boolean managed
protected boolean useCustomTemplate
protected String htmlTemplate
protected String description
public static final String APPLICATION
public void setTokenSelectionCriteria(Map<String,String> tokenSelectionCriteria)
tokenSelectionCriteria
- a map containing the additional selection criteria as key-value pairspublic boolean isExecuteLocally()
public void setExecuteLocally(boolean executeLocally)
executeLocally
- true if the function has to be executed on a local tokenpublic DynamicValue<Integer> getCallTimeout()
public void setCallTimeout(DynamicValue<Integer> callTimeout)
callTimeout
- the call timeout of the function in mspublic javax.json.JsonObject getSchema()
public void setSchema(javax.json.JsonObject schema)
schema
- the JSON schema of the function. See https://json-schema.org/ for more details concerning JSON schema.public boolean requiresLocalExecution()
public boolean isManaged()
public void setManaged(boolean managed)
public boolean isUseCustomTemplate()
public void setUseCustomTemplate(boolean customTemplate)
public String getHtmlTemplate()
public void setHtmlTemplate(String customTemplateContent)
customTemplateContent
- the HTML templatepublic String getDescription()
public void setDescription(String description)
Copyright © 2020. All rights reserved.