forked from OpenIntegrationEngine/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDatabaseTask.java
More file actions
115 lines (90 loc) · 2.67 KB
/
DatabaseTask.java
File metadata and controls
115 lines (90 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
* Copyright (c) Mirth Corporation. All rights reserved.
*
* http://www.mirthcorp.com
*
* The software in this package is published under the terms of the MPL license a copy of which has
* been included with this distribution in the LICENSE.txt file.
*/
package com.mirth.connect.model;
import java.io.Serializable;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.text.WordUtils;
public class DatabaseTask implements Serializable {
public enum Status {
IDLE, RUNNING;
@Override
public String toString() {
return WordUtils.capitalizeFully(super.toString());
}
}
private String id;
private Status status;
private String name;
private String description;
private String confirmationMessage;
private Map<String, String> affectedChannels;
private Calendar startDateTime;
public DatabaseTask(String id) {
this(id, null, null);
}
public DatabaseTask(String id, String name, String description) {
this(id, name, description, null);
}
public DatabaseTask(String id, String name, String description, String confirmationMessage) {
this.id = id;
this.status = Status.IDLE;
this.name = name;
this.description = description;
this.confirmationMessage = confirmationMessage;
this.affectedChannels = new HashMap<String, String>();
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getConfirmationMessage() {
return confirmationMessage;
}
public void setConfirmationMessage(String confirmationMessage) {
this.confirmationMessage = confirmationMessage;
}
public Map<String, String> getAffectedChannels() {
return affectedChannels;
}
public void setAffectedChannels(Map<String, String> affectedChannels) {
this.affectedChannels = affectedChannels;
}
public Calendar getStartDateTime() {
return startDateTime;
}
public void setStartDateTime(Calendar startDateTime) {
this.startDateTime = startDateTime;
}
@Override
public String toString() {
return name;
}
}