-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCampaign.java
More file actions
40 lines (34 loc) · 867 Bytes
/
Campaign.java
File metadata and controls
40 lines (34 loc) · 867 Bytes
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
import org.apache.commons.lang.builder.ToStringBuilder;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
public class Campaign
{
private String name;
private String id;
private Boolean active;
public Campaign(Node node) throws Exception{
Element campaignElem = (Element) node;
id = campaignElem.getAttribute("id");
active = false;
if (campaignElem.getAttribute("active").equals("true")){
active = true;
}
name = MobileCommons.getValueFromChildNodeByNodeName(campaignElem, "name");
}
public String getName(){
return name;
}
public String getId(){
return id;
}
public Boolean getActive(){
return active;
}
public String toString() {
return new ToStringBuilder(this).
append("name", name).
append("id", id).
append("active", active).
toString();
}
}