forked from box/mojito
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attached the job properties to the Job Type in the enum definition
- Loading branch information
1 parent
367138e
commit 312c4f2
Showing
4 changed files
with
44 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 14 additions & 6 deletions
20
webapp/src/main/java/com/box/l10n/mojito/service/scheduledjob/ScheduledJobType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
package com.box.l10n.mojito.service.scheduledjob; | ||
|
||
import com.box.l10n.mojito.service.scheduledjob.jobs.ScheduledThirdPartySync; | ||
import com.box.l10n.mojito.service.scheduledjob.jobs.ScheduledThirdPartySyncProperties; | ||
|
||
public enum ScheduledJobType { | ||
THIRD_PARTY_SYNC(ScheduledThirdPartySync.class.getName()); | ||
THIRD_PARTY_SYNC( | ||
ScheduledThirdPartySync.class.getName(), ScheduledThirdPartySyncProperties.class); | ||
|
||
final String className; | ||
final String jobClassName; | ||
final Class<? extends ScheduledJobProperties> propertiesClass; | ||
|
||
ScheduledJobType(String className) { | ||
this.className = className; | ||
ScheduledJobType(String jobClassName, Class<? extends ScheduledJobProperties> propertiesClass) { | ||
this.jobClassName = jobClassName; | ||
this.propertiesClass = propertiesClass; | ||
} | ||
|
||
public String getClassName() { | ||
return className; | ||
public String getJobClassName() { | ||
return jobClassName; | ||
} | ||
|
||
public Class<? extends ScheduledJobProperties> getPropertiesClass() { | ||
return propertiesClass; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters