woltlab-compiler
Version:
A compiler for WoltLab-Package Archives and WoltLab-Package Components
109 lines • 3.06 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("util");
const Localization_1 = require("../Globalization/Localization");
/**
* Represents a cron-job.
*/
class CronJob {
/**
* Initializes a new instance of the `CronJob` class.
*/
constructor(options) {
/**
* The description of the cron-job.
*/
this.description = new Localization_1.Localization();
/**
* A value indicating whether the cron-job can be disabled.
*/
this.allowDisable = false;
/**
* A value indicating whether the cron-job can be edited.
*/
this.allowEdit = false;
/**
* A set of options of which at least one must be enabled in order to execute the cron-job.
*/
this.options = [];
if (!util_1.isNullOrUndefined(options.Name)) {
this.Name = options.Name;
}
this.ClassName = options.ClassName;
if (!util_1.isNullOrUndefined(options.Description)) {
this.Description.Data = options.Description;
}
if (!util_1.isNullOrUndefined(options.AllowDisable)) {
this.AllowDisable = options.AllowDisable;
}
if (!util_1.isNullOrUndefined(options.AllowEdit)) {
this.AllowEdit = options.AllowEdit;
}
if (!util_1.isNullOrUndefined(options.Options)) {
this.Options = options.Options;
}
this.Period = options.Period;
}
/**
* Gets or sets the name of the cron-job.
*/
get Name() {
return this.name;
}
set Name(value) {
this.name = value;
}
/**
* Gets or sets the class-name of the cron-job.
*/
get ClassName() {
return this.className;
}
set ClassName(value) {
this.className = value;
}
/**
* Gets the description of the cron-job.
*/
get Description() {
return this.description;
}
/**
* Gets or sets a value indicating whether the cron-job can be disabled.
*/
get AllowDisable() {
return this.allowDisable;
}
set AllowDisable(value) {
this.allowDisable = value;
}
/**
* Gets or sets a value indicating whether the cron-job can be edited.
*/
get AllowEdit() {
return this.allowEdit;
}
set AllowEdit(value) {
this.allowEdit = value;
}
/**
* Gets or sets a set of options of which at least one must be enabled in order to execute the cron-job.
*/
get Options() {
return this.options;
}
set Options(value) {
this.options = value;
}
/**
* Gets or sets the period to execute the cron-job.
*/
get Period() {
return this.period;
}
set Period(value) {
this.period = value;
}
}
exports.CronJob = CronJob;
//# sourceMappingURL=CronJob.js.map