forked from iron-io/iron_worker_java
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
366 additions
and
192 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
32 changes: 32 additions & 0 deletions
32
client/src/main/java/io/iron/ironworker/client/builders/ScheduleOptions.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,32 @@ | ||
package io.iron.ironworker.client.builders; | ||
|
||
import java.util.Date; | ||
|
||
public class ScheduleOptions { | ||
public static ScheduleOptionsObject priority(int priority) { | ||
return (new ScheduleOptionsObject()).priority(priority); | ||
} | ||
|
||
public static ScheduleOptionsObject startAt(Date startAt) { | ||
return (new ScheduleOptionsObject()).startAt(startAt); | ||
} | ||
|
||
public static ScheduleOptionsObject endAt(Date endAt) { | ||
return (new ScheduleOptionsObject()).endAt(endAt); | ||
} | ||
|
||
public static ScheduleOptionsObject delay(int delay) { | ||
return (new ScheduleOptionsObject()).delay(delay); | ||
} | ||
|
||
public static ScheduleOptionsObject runEvery(int runEvery) { | ||
return (new ScheduleOptionsObject()).runEvery(runEvery); | ||
} | ||
|
||
public static ScheduleOptionsObject runTimes(int runTimes) { | ||
return (new ScheduleOptionsObject()).runTimes(runTimes); | ||
} | ||
|
||
protected ScheduleOptions() { | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
client/src/main/java/io/iron/ironworker/client/builders/ScheduleOptionsObject.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,53 @@ | ||
package io.iron.ironworker.client.builders; | ||
|
||
import java.util.Date; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class ScheduleOptionsObject { | ||
private Map<String, Object> options; | ||
|
||
public ScheduleOptionsObject() { | ||
options = new HashMap<String, Object>(); | ||
} | ||
|
||
public ScheduleOptionsObject priority(int priority) { | ||
options.put("priority", priority); | ||
|
||
return this; | ||
} | ||
|
||
public ScheduleOptionsObject startAt(Date startAt) { | ||
options.put("start_at", startAt); | ||
|
||
return this; | ||
} | ||
|
||
public ScheduleOptionsObject endAt(Date endAt) { | ||
options.put("end_at", endAt); | ||
|
||
return this; | ||
} | ||
|
||
public ScheduleOptionsObject delay(int delay) { | ||
options.put("delay", delay); | ||
|
||
return this; | ||
} | ||
|
||
public ScheduleOptionsObject runEvery(int runEvery) { | ||
options.put("run_every", runEvery); | ||
|
||
return this; | ||
} | ||
|
||
public ScheduleOptionsObject runTimes(int runTimes) { | ||
options.put("run_times", runTimes); | ||
|
||
return this; | ||
} | ||
|
||
public Map<String, Object> create() { | ||
return options; | ||
} | ||
} |
35 changes: 0 additions & 35 deletions
35
client/src/main/java/io/iron/ironworker/client/entities/BaseEntity.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.