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 org.apache.commons.lang.builder.ReflectionToStringBuilder;
22 import org.simpleframework.xml.Attribute;
23 import org.simpleframework.xml.Text;
24
25 /***
26 * This class represents 'error' part of webthumb's response. See <a
27 * href="http://webthumb.bluga.net/apidoc#errorhandling"
28 * >http://webthumb.bluga.net/apidoc#errorhandling</a> for details
29 *
30 * @author <a href="mailto:MilenDyankov@gmail.com">Milen Dyankov</a>
31 * @see http://webthumb.bluga.net/apidoc#errorhandling
32 * @since 0.3
33 */
34 public class WebThumbError {
35
36 @Text(required = false)
37 private String value;
38
39 @Attribute(required = false)
40 private String type;
41
42 @Attribute(required = false)
43 private String code;
44
45 @Attribute(required = false)
46 private String url;
47
48
49 /***
50 * @return the value
51 */
52 public String getValue() {
53 return this.value;
54 }
55
56
57 /***
58 * @return the type
59 */
60 public String getType() {
61 return this.type;
62 }
63
64
65 /***
66 * @return the code
67 */
68 public String getCode() {
69 return this.code;
70 }
71
72
73 /***
74 * @return the url
75 */
76 public String getUrl() {
77 return this.url;
78 }
79
80
81 @Override
82 public String toString() {
83 return new ReflectionToStringBuilder(this).toString();
84 }
85
86 }