Class JavaScriptBuilderElementBuilder
- java.lang.Object
-
- fiftyone.pipeline.javascriptbuilder.flowelements.JavaScriptBuilderElementBuilder
-
public class JavaScriptBuilderElementBuilder extends Object
Builder for theJavaScriptBuilderElement
-
-
Constructor Summary
Constructors Constructor Description JavaScriptBuilderElementBuilder(org.slf4j.ILoggerFactory loggerFactory)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaScriptBuilderElementbuild()Build theJavaScriptBuilderElementJavaScriptBuilderElementBuildersetContextRoot(String contextRoot)Set the evidence value for the context rootJavaScriptBuilderElementBuildersetEnableCookies(boolean enableCookies)Set whether the client JavaScript stores results of client side processing in cookies.JavaScriptBuilderElementBuildersetEndpoint(String endpoint)Set the endpoint which will be queried on the host.JavaScriptBuilderElementBuildersetHost(String host)Set the host that the client JavaScript should query for updates.JavaScriptBuilderElementBuildersetObjectName(String objName)The default name of the object instantiated by the client JavaScript.JavaScriptBuilderElementBuildersetProtocol(String protocol)The protocol that the client JavaScript will use when querying for updates.
-
-
-
Method Detail
-
setHost
@DefaultValue("The host from the request") public JavaScriptBuilderElementBuilder setHost(String host)Set the host that the client JavaScript should query for updates.By default, the host from the request will be used.
- Parameters:
host- the hostname- Returns:
- this builder
-
setEndpoint
@DefaultValue("Empty string") public JavaScriptBuilderElementBuilder setEndpoint(String endpoint)Set the endpoint which will be queried on the host. e.g /api/v4/jsonBy default, this value is an empty string
- Parameters:
endpoint- the endpoint- Returns:
- this builder
-
setContextRoot
@DefaultValue("Value from evidence server.contextroot") public JavaScriptBuilderElementBuilder setContextRoot(String contextRoot)Set the evidence value for the context rootDefault is value from evidence "server.contextroot"
- Parameters:
contextRoot-- Returns:
- this builder
-
setProtocol
@DefaultValue("The protocol from the request") public JavaScriptBuilderElementBuilder setProtocol(String protocol)The protocol that the client JavaScript will use when querying for updates.By default, the protocol from the request will be used.
- Parameters:
protocol- The protocol to use (http / https)- Returns:
- this builder
-
setObjectName
@DefaultValue("fod") public JavaScriptBuilderElementBuilder setObjectName(String objName)The default name of the object instantiated by the client JavaScript.Default is "fod"
- Parameters:
objName- the object name to use- Returns:
- this builder
-
setEnableCookies
@DefaultValue(booleanValue=true) public JavaScriptBuilderElementBuilder setEnableCookies(boolean enableCookies)
Set whether the client JavaScript stores results of client side processing in cookies.Default is true
- Parameters:
enableCookies- should enable cookies?- Returns:
- this builder
-
build
public JavaScriptBuilderElement build()
Build theJavaScriptBuilderElement- Returns:
- new
JavaScriptBuilderElementinstance
-
-