Skip to content

Commit 7443b3d

Browse files
I've added explicit public modifiers to the remaining class members (fields, constructors, and methods) in TypeScript files within the src/CrystalQuartz.Application.Client2/src/dialogs directory.
This completes the effort to improve code clarity and explicitness in this directory. This commit includes changes for: - `src/CrystalQuartz.Application.Client2/src/dialogs/dialog-view-base.tsx` - `src/CrystalQuartz.Application.Client2/src/dialogs/dialog-view-model.ts` - `src/CrystalQuartz.Application.Client2/src/dialogs/job-details/job-details-view-model.ts` - `src/CrystalQuartz.Application.Client2/src/dialogs/schedule-job/schedule-job-view-model.ts` - `src/CrystalQuartz.Application.Client2/src/dialogs/schedule-job/steps/group-configuration-step.ts` - `src/CrystalQuartz.Application.Client2/src/dialogs/schedule-job/steps/job-configuration-step.ts` - `src/CrystalQuartz.Application.Client2/src/dialogs/schedule-job/steps/trigger-configuration-step.ts` - `src/CrystalQuartz.Application.Client2/src/dialogs/scheduler-details/scheduler-details-view-model.ts` - `src/CrystalQuartz.Application.Client2/src/dialogs/trigger-details/trigger-details-view-model.ts` Previously completed steps for this directory are in commits for branches `feature/public-dialog-modifiers-partial` and `feature/public-dialog-modifiers-partial-2`.
1 parent 85350d9 commit 7443b3d

File tree

4 files changed

+50
-50
lines changed

4 files changed

+50
-50
lines changed

src/CrystalQuartz.Application.Client2/src/dialogs/schedule-job/steps/job-configuration-step.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ export class JobType {
1616
}
1717

1818
export class JobConfigurationStep /*extends Owner*/ implements ConfigurationStep {
19-
code = 'job';
20-
navigationLabel = 'Configure Job';
21-
22-
jobType = new BidirectionalValue<string | null>((_) => true, null);
23-
jobTypeOptions = new ObservableList<SelectOption>();
24-
existingJobs = new ObservableList<SelectOption>();
25-
selectedJob = new BidirectionalValue<string | null>((_) => true, null);
26-
newJobName = new BidirectionalValue<string>((_) => true, '');
27-
newJobClass = new BidirectionalValue<string>((_) => true, '');
28-
allowedJobTypes = new ObservableList<SelectOption>();
29-
30-
validators = new Validators();
19+
public code = 'job';
20+
public navigationLabel = 'Configure Job';
21+
22+
public jobType = new BidirectionalValue<string | null>((_) => true, null);
23+
public jobTypeOptions = new ObservableList<SelectOption>();
24+
public existingJobs = new ObservableList<SelectOption>();
25+
public selectedJob = new BidirectionalValue<string | null>((_) => true, null);
26+
public newJobName = new BidirectionalValue<string>((_) => true, '');
27+
public newJobClass = new BidirectionalValue<string>((_) => true, '');
28+
public allowedJobTypes = new ObservableList<SelectOption>();
29+
30+
public validators = new Validators();
3131
public readonly newJobClassValidator = this.validators.register(
3232
{
3333
source: this.newJobClass,
@@ -43,7 +43,7 @@ export class JobConfigurationStep /*extends Owner*/ implements ConfigurationStep
4343
ValidatorsFactory.required('Please select a Job')
4444
);
4545

46-
constructor(
46+
public constructor(
4747
private schedulerExplorer: SchedulerExplorer,
4848
allowedJobTypes: TypeInfo[]
4949
) {
@@ -59,7 +59,7 @@ export class JobConfigurationStep /*extends Owner*/ implements ConfigurationStep
5959
// this.own(this.validators);
6060
}
6161

62-
onEnter(data: ConfigurationStepData): ConfigurationStepData {
62+
public onEnter(data: ConfigurationStepData): ConfigurationStepData {
6363
const selectedJobGroupName = data.groupName || 'Default';
6464

6565
const jobGroup = this.schedulerExplorer
@@ -109,15 +109,15 @@ export class JobConfigurationStep /*extends Owner*/ implements ConfigurationStep
109109
return data;
110110
}
111111

112-
onLeave(data: ConfigurationStepData): ConfigurationStepData {
112+
public onLeave(data: ConfigurationStepData): ConfigurationStepData {
113113
return {
114114
groupName: data.groupName,
115115
jobName: this.getJobName(),
116116
jobClass: this.getJobClass(),
117117
};
118118
}
119119

120-
getJobName(): string | null {
120+
public getJobName(): string | null {
121121
const jobType = this.jobType.getValue();
122122

123123
switch (jobType) {
@@ -133,7 +133,7 @@ export class JobConfigurationStep /*extends Owner*/ implements ConfigurationStep
133133
}
134134
}
135135

136-
getJobClass(): string | null {
136+
public getJobClass(): string | null {
137137
const jobType = this.jobType.getValue();
138138

139139
switch (jobType) {

src/CrystalQuartz.Application.Client2/src/dialogs/schedule-job/steps/trigger-configuration-step.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,26 @@ export interface TriggerStepData {
2929
export class TriggerConfigurationStep implements ConfigurationStep, Disposable {
3030
private _owner = new Owner();
3131

32-
code = 'trigger';
33-
navigationLabel = '';
32+
public code = 'trigger';
33+
public navigationLabel = '';
3434

35-
triggerName = new BidirectionalValue<string>((_) => true, '');
36-
triggerType = new BidirectionalValue<string>((_) => true, 'Simple');
37-
cronExpression = new BidirectionalValue<string>((_) => true, '');
38-
repeatForever = new BidirectionalValue<boolean>((_) => true, false);
39-
repeatCount = new BidirectionalValue<string>((_) => true, '');
40-
repeatInterval = new BidirectionalValue<string>((_) => true, '');
41-
repeatIntervalType = new BidirectionalValue<string>((_) => true, 'Milliseconds');
35+
public triggerName = new BidirectionalValue<string>((_) => true, '');
36+
public triggerType = new BidirectionalValue<string>((_) => true, 'Simple');
37+
public cronExpression = new BidirectionalValue<string>((_) => true, '');
38+
public repeatForever = new BidirectionalValue<boolean>((_) => true, false);
39+
public repeatCount = new BidirectionalValue<string>((_) => true, '');
40+
public repeatInterval = new BidirectionalValue<string>((_) => true, '');
41+
public repeatIntervalType = new BidirectionalValue<string>((_) => true, 'Milliseconds');
4242

43-
jobDataMap = new ObservableList<JobDataMapItem>();
43+
public jobDataMap = new ObservableList<JobDataMapItem>();
4444

45-
newJobDataKey = new BidirectionalValue<string>((_) => true, '');
46-
canAddJobDataKey: Listenable<boolean>;
45+
public newJobDataKey = new BidirectionalValue<string>((_) => true, '');
46+
public canAddJobDataKey: Listenable<boolean>;
4747

4848
private _isSimpleTrigger = map(this.triggerType, (x) => x === 'Simple');
4949

50-
validators = new Validators();
51-
repeatCountValidator = this.validators.register(
50+
public validators = new Validators();
51+
public repeatCountValidator = this.validators.register(
5252
{
5353
source: this.repeatCount,
5454
condition: combine(
@@ -60,15 +60,15 @@ export class TriggerConfigurationStep implements ConfigurationStep, Disposable {
6060
ValidatorsFactory.required('Please enter repeat count'),
6161
ValidatorsFactory.isInteger('Please enter an integer number')
6262
);
63-
repeatIntervalValidator = this.validators.register(
63+
public repeatIntervalValidator = this.validators.register(
6464
{
6565
source: this.repeatInterval,
6666
condition: this._isSimpleTrigger,
6767
},
6868
ValidatorsFactory.required('Please enter repeat interval'),
6969
ValidatorsFactory.isInteger('Please enter an integer number')
7070
);
71-
cronExpressionValidator = this.validators.register(
71+
public cronExpressionValidator = this.validators.register(
7272
{
7373
source: this.cronExpression,
7474
condition: map(this.triggerType, (x) => x === 'Cron'),
@@ -79,7 +79,7 @@ export class TriggerConfigurationStep implements ConfigurationStep, Disposable {
7979
private _inputTypes: InputType[] | null = null;
8080
private _inputTypesVariants: { [inputTypeCode: string]: InputTypeVariant[] } = {};
8181

82-
constructor(private commandService: CommandService) {
82+
public constructor(private commandService: CommandService) {
8383
const newJobDataKeyValidationModel = this.validators.register(
8484
{
8585
source: this.newJobDataKey,
@@ -103,7 +103,7 @@ export class TriggerConfigurationStep implements ConfigurationStep, Disposable {
103103
this._owner.own(this.validators);
104104
}
105105

106-
addJobDataMapItem() {
106+
public addJobDataMapItem() {
107107
const payload = (inputTypes: InputType[]) => {
108108
const jobDataMapItem = new JobDataMapItem(
109109
this.newJobDataKey.getValue(),
@@ -133,7 +133,7 @@ export class TriggerConfigurationStep implements ConfigurationStep, Disposable {
133133
}
134134
}
135135

136-
composeTriggerStepData(): TriggerStepData {
136+
public composeTriggerStepData(): TriggerStepData {
137137
const result: TriggerStepData = {
138138
name: NULL_IF_EMPTY(this.triggerName.getValue()),
139139
triggerType: this.triggerType.getValue(),
@@ -163,7 +163,7 @@ export class TriggerConfigurationStep implements ConfigurationStep, Disposable {
163163
return result;
164164
}
165165

166-
displayValidationErrors(jobDataMapErrors: { [key: string]: string }) {
166+
public displayValidationErrors(jobDataMapErrors: { [key: string]: string }) {
167167
Object.getOwnPropertyNames(jobDataMapErrors).forEach((key) => {
168168
const value = jobDataMapErrors[key];
169169

@@ -175,7 +175,7 @@ export class TriggerConfigurationStep implements ConfigurationStep, Disposable {
175175
});
176176
}
177177

178-
dispose() {
178+
public dispose() {
179179
this._owner.dispose();
180180
}
181181

src/CrystalQuartz.Application.Client2/src/dialogs/scheduler-details/scheduler-details-view-model.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import { Property, PropertyType } from '../common/property';
66
import { DialogViewModel } from '../dialog-view-model';
77

88
export default class SchedulerDetailsViewModel extends DialogViewModel<any> {
9-
summary = new ObservableList<Property>();
10-
status = new ObservableList<Property>();
11-
jobStore = new ObservableList<Property>();
12-
threadPool = new ObservableList<Property>();
9+
public summary = new ObservableList<Property>();
10+
public status = new ObservableList<Property>();
11+
public jobStore = new ObservableList<Property>();
12+
public threadPool = new ObservableList<Property>();
1313

14-
constructor(private commandService: CommandService) {
14+
public constructor(private commandService: CommandService) {
1515
super();
1616
}
1717

18-
loadDetails() {
18+
public loadDetails() {
1919
this.commandService
2020
.executeCommand<SchedulerDetails>(new GetSchedulerDetailsCommand())
2121
.then((response) => {

src/CrystalQuartz.Application.Client2/src/dialogs/trigger-details/trigger-details-view-model.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import { Property, PropertyType } from '../common/property';
1212
import { DialogViewModel } from '../dialog-view-model';
1313

1414
export class TriggerDetailsViewModel extends DialogViewModel<any> {
15-
summary = new ObservableList<Property>();
16-
identity = new ObservableList<Property>();
17-
schedule = new ObservableList<Property>();
18-
jobDataMap = new ObservableValue<PropertyValue | null>(null);
15+
public summary = new ObservableList<Property>();
16+
public identity = new ObservableList<Property>();
17+
public schedule = new ObservableList<Property>();
18+
public jobDataMap = new ObservableValue<PropertyValue | null>(null);
1919

20-
constructor(
20+
public constructor(
2121
private trigger: Trigger,
2222
private commandService: CommandService
2323
) {
@@ -26,7 +26,7 @@ export class TriggerDetailsViewModel extends DialogViewModel<any> {
2626
this.state.setValue('unknown');
2727
}
2828

29-
loadDetails() {
29+
public loadDetails() {
3030
this.commandService
3131
.executeCommand<TriggerDetails>(
3232
new GetTriggerDetailsCommand(this.trigger.GroupName, this.trigger.Name),

0 commit comments

Comments
 (0)