Class UiScriptConfiguration
- java.lang.Object
-
- org.topbraidlive.app.framework.api.configuration.AbstractConfiguration<UiScriptConfiguration>
-
- org.topbraidlive.app.framework.api.configuration.UiScriptConfiguration
-
public final class UiScriptConfiguration extends AbstractConfiguration<UiScriptConfiguration>
Configuration returned by an app to indicate it exposes a user interface (UI) script.The fields are public and nullable in order to be compatible with JSON-B.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UiScriptConfiguration.Builder
-
Constructor Summary
Constructors Constructor Description UiScriptConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UiScriptConfiguration.Builder
builder()
boolean
equals(Object o)
int
hashCode()
UiScriptConfiguration
validate()
Validate the configuration.-
Methods inherited from class org.topbraidlive.app.framework.api.configuration.AbstractConfiguration
validateNotNull, validateStringListNotBlank, validateStringNotBlank
-
-
-
-
Field Detail
-
id
public String id
Required short identifier for the script. Must follow identifier rules ([a-zA-Z_][a-zA-Z0-9_]*).
-
label
public String label
Required display label of the script, such as "Example script".
-
src
public String src
Optional absolute or relative URL to use as the script src. If not specified it will be inferred from the app base URL and the script id. For an script "example" on app base URL "http://localhost:8081/app-example", the inferred URL would be "http://localhost:8081/app-example/ui-script/example". For apps deployed to the same servlet container as the EDG server, it can be useful to specify a relative src such as "/app-example/ui-script/example". Then the src is independent of the host and port.
-
-
Method Detail
-
builder
public static UiScriptConfiguration.Builder builder()
-
validate
public final UiScriptConfiguration validate() throws InvalidConfigurationException
Description copied from class:AbstractConfiguration
Validate the configuration.- Specified by:
validate
in classAbstractConfiguration<UiScriptConfiguration>
- Returns:
- this
- Throws:
InvalidConfigurationException
- if the configuration is invalid
-
-