Class JobConfiguration
- java.lang.Object
-
- org.topbraidlive.app.framework.api.configuration.AbstractConfiguration<JobConfiguration>
-
- org.topbraidlive.app.framework.api.configuration.JobConfiguration
-
public final class JobConfiguration extends AbstractConfiguration<JobConfiguration>
Configuration returned by an app to indicate it exposes a job.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
JobConfiguration.Builder
-
Field Summary
Fields Modifier and Type Field Description String
cronSchedule
Required cron expression for the job, such as "0 00 4 ? * * *" for 4 AM daily.String
id
Required short identifier for the job.String
label
Required display label of the job, such as "Example job".String
url
Optional absolute or relative URL to request to execute the job.
-
Constructor Summary
Constructors Constructor Description JobConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JobConfiguration.Builder
builder()
boolean
equals(Object o)
int
hashCode()
JobConfiguration
validate()
Validate the configuration.-
Methods inherited from class org.topbraidlive.app.framework.api.configuration.AbstractConfiguration
validateNotNull, validateStringListNotBlank, validateStringNotBlank
-
-
-
-
Field Detail
-
cronSchedule
public String cronSchedule
Required cron expression for the job, such as "0 00 4 ? * * *" for 4 AM daily. See the Quartz documentation on cron triggers for the format.
-
id
public String id
Required short identifier for the job. Must follow identifier rules ([a-zA-Z_][a-zA-Z0-9_]*).
-
label
public String label
Required display label of the job, such as "Example job".
-
url
public String url
Optional absolute or relative URL to request to execute the job. If not specified it will be inferred from the app base URL and the job id. For a job "example" on app base URL "http://localhost:8081/app-example", the inferred URL would be "http://localhost:8081/app-example/job/example". For apps deployed to the same servlet container as the EDG server, it can be useful to specify a relative url such as "/app-example/job/example". Then the url is independent of the host and port.
-
-
Method Detail
-
builder
public static JobConfiguration.Builder builder()
-
validate
public final JobConfiguration validate() throws InvalidConfigurationException
Description copied from class:AbstractConfiguration
Validate the configuration.- Specified by:
validate
in classAbstractConfiguration<JobConfiguration>
- Returns:
- this
- Throws:
InvalidConfigurationException
- if the configuration is invalid
-
-