Class AppConfiguration
- java.lang.Object
-
- org.topbraidlive.app.framework.api.configuration.AbstractConfiguration<AppConfiguration>
-
- org.topbraidlive.app.framework.api.configuration.AppConfiguration
-
public final class AppConfiguration extends AbstractConfiguration<AppConfiguration>
Configuration returned by an app indicating how it extends EDG.The fields are public, mutable, and nullable and there's a public nullary constructor in order to be compatible with JSON-B.
Use the builder instead of assigning the fields directly.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AppConfiguration.Builder
-
Field Summary
Fields Modifier and Type Field Description static String
API_VERSION
String
apiVersion
Required string indicating the version of the API (including this configuration) the app supports.String
baseUrl
Optional absolute or relative base URL.List<ExporterConfiguration>
exporters
Optional list of importers exposed by the app.String
id
Required short identifier for the application.List<ImporterConfiguration>
importers
Optional list of importers exposed by the app.List<JobConfiguration>
jobs
Optional list of jobs exposed by the app.String
label
Required display label of the app, such as "Example app".List<ManagerConfiguration>
managers
Optional list of managers exposed by the app.List<UiScriptConfiguration>
uiScripts
Optional list of user interface scripts exposed by the app.List<WorkflowRuleConfiguration>
workflowRules
Optional list of workflow rules exposed by the app.
-
Constructor Summary
Constructors Constructor Description AppConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AppConfiguration.Builder
builder()
boolean
equals(Object o)
int
hashCode()
AppConfiguration
validate()
Validate the configuration.-
Methods inherited from class org.topbraidlive.app.framework.api.configuration.AbstractConfiguration
validateNotNull, validateStringListNotBlank, validateStringNotBlank
-
-
-
-
Field Detail
-
API_VERSION
public static final String API_VERSION
- See Also:
- Constant Field Values
-
apiVersion
public String apiVersion
Required string indicating the version of the API (including this configuration) the app supports.This version follows semantic version (https://semver.org/) conventions. It is checked to ensure major version compatibility between the proxy and an app.
The API is versioned separately from the framework in order to adapt the API at a different pace. The framework version matches the current EDG server version.
-
baseUrl
public String baseUrl
Optional absolute or relative base URL. If not specified (null) it defaults to the URL used to retrieve /configuration e.g., http://localhost:8080/app-example/configuration. The base URL is used to infer other URLs in the app if they are not explicitly specified. For example, an importer "example" and a (relative) app base URL "/app-example" would have a default URL of "/app-example/importer/example". For apps deployed to the same servlet container as the EDG server, it can be useful to specify a relative baseUrl such as "/app-example". Then the baseUrl is independent of the host and port. The string can be empty.
-
exporters
public List<ExporterConfiguration> exporters
Optional list of importers exposed by the app.
-
id
public String id
Required short identifier for the application. Must follow identifier rules ([a-zA-Z_][a-zA-Z0-9_]*).
-
importers
public List<ImporterConfiguration> importers
Optional list of importers exposed by the app.
-
jobs
public List<JobConfiguration> jobs
Optional list of jobs exposed by the app.
-
label
public String label
Required display label of the app, such as "Example app".
-
managers
public List<ManagerConfiguration> managers
Optional list of managers exposed by the app.
-
uiScripts
public List<UiScriptConfiguration> uiScripts
Optional list of user interface scripts exposed by the app.
-
workflowRules
public List<WorkflowRuleConfiguration> workflowRules
Optional list of workflow rules exposed by the app.
-
-
Method Detail
-
builder
public static AppConfiguration.Builder builder()
-
validate
public final AppConfiguration validate() throws InvalidConfigurationException
Description copied from class:AbstractConfiguration
Validate the configuration.- Specified by:
validate
in classAbstractConfiguration<AppConfiguration>
- Returns:
- this
- Throws:
InvalidConfigurationException
- if the configuration is invalid
-
-