1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package com.commsen.jwebthumb;
20
21 import java.util.Date;
22
23 import org.apache.commons.lang.builder.ReflectionToStringBuilder;
24 import org.simpleframework.xml.Attribute;
25 import org.simpleframework.xml.Text;
26
27 /***
28 * This class represents 'jobs' part of webthumb's response to "request" API call. See <a
29 * href="http://webthumb.bluga.net/apidoc#request">http://webthumb.bluga.net/apidoc#request</a> for
30 * details
31 *
32 * @author <a href="mailto:MilenDyankov@gmail.com">Milen Dyankov</a>
33 * @see http://webthumb.bluga.net/apidoc#request
34 *
35 */
36 public class WebThumbJob {
37
38 @Attribute
39 private int estimate;
40
41 @Attribute(name = "time")
42 private Date time;
43
44 @Attribute
45 private String url;
46
47 @Attribute
48 private int cost;
49
50 @Text
51 private String id;
52
53
54 /***
55 * @return the estimate
56 */
57 public int getEstimate() {
58 return this.estimate;
59 }
60
61
62 /***
63 * @return the time
64 */
65 public Date getTime() {
66 return this.time == null ? null : (Date) this.time.clone();
67 }
68
69
70 /***
71 * @return the url
72 */
73 public String getUrl() {
74 return this.url;
75 }
76
77
78 /***
79 * @return the cost
80 */
81 public int getCost() {
82 return this.cost;
83 }
84
85
86 /***
87 * @return the id
88 */
89 public String getId() {
90 return this.id;
91 }
92
93
94 @Override
95 public String toString() {
96 return new ReflectionToStringBuilder(this).toString();
97 }
98 }