-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($Quartz): api for creating Quartz configuration
- Loading branch information
1 parent
ffef868
commit 0f4f5aa
Showing
11 changed files
with
123 additions
and
23 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
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
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
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
54 changes: 54 additions & 0 deletions
54
.../jmsoftware/maf/springcloudstarter/quartz/entity/CreateQuartzJobConfigurationPayload.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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.jmsoftware.maf.springcloudstarter.quartz.entity; | ||
|
||
import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; | ||
import lombok.Data; | ||
import lombok.val; | ||
import org.hibernate.validator.constraints.Length; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* <h1>CreateQuartzJobConfigurationPayload</h1> | ||
* <p> | ||
* Change description here. | ||
* | ||
* @author Johnny Miller (鍾俊), email: johnnysviva@outlook.com, 10/1/21 10:29 PM | ||
**/ | ||
@Data | ||
public class CreateQuartzJobConfigurationPayload { | ||
@NotBlank | ||
@Length(max = 50) | ||
private String name; | ||
@NotBlank | ||
@Length(max = 200) | ||
private String group; | ||
@NotBlank | ||
@Length(max = 500) | ||
private String invokeTarget; | ||
@NotBlank | ||
@Length(max = 50) | ||
private String cronExpression; | ||
@NotNull | ||
private Byte misfirePolicy; | ||
@NotNull | ||
private Byte concurrent; | ||
@NotBlank | ||
@Length(max = 1000) | ||
private String description; | ||
@NotNull | ||
private Byte status; | ||
|
||
public QuartzJobConfiguration asQuartzJobConfiguration() { | ||
val quartzJobConfiguration = new QuartzJobConfiguration(); | ||
quartzJobConfiguration.setName(this.name); | ||
quartzJobConfiguration.setGroup(this.group); | ||
quartzJobConfiguration.setInvokeTarget(this.invokeTarget); | ||
quartzJobConfiguration.setCronExpression(this.cronExpression); | ||
quartzJobConfiguration.setMisfirePolicy(this.misfirePolicy); | ||
quartzJobConfiguration.setConcurrent(this.concurrent); | ||
quartzJobConfiguration.setDescription(this.description); | ||
quartzJobConfiguration.setStatus(this.status); | ||
return quartzJobConfiguration; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...jmsoftware/maf/springcloudstarter/quartz/entity/CreateQuartzJobConfigurationResponse.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.jmsoftware.maf.springcloudstarter.quartz.entity; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
/** | ||
* <h1>CreateQuartzJobConfigurationResponse</h1> | ||
* <p> | ||
* Change description here. | ||
* | ||
* @author Johnny Miller (鍾俊), email: johnnysviva@outlook.com, 10/1/21 10:29 PM | ||
**/ | ||
@Data | ||
@AllArgsConstructor | ||
public class CreateQuartzJobConfigurationResponse { | ||
private Long id; | ||
} |
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