View Javadoc

1   /*
2    * Copyright (c) 2010 Commsen International. All rights reserved.
3    * 
4    * This file is part of JWebThumb library.
5    *	
6    * JWebThumb library is free software: you can redistribute it and/or modify 
7    * it under the terms of the GNU Lesser General Public License as published by
8    * the Free Software Foundation, either version 2 of the License, or
9    * (at your option) any later version.
10   * 
11   * JWebThumb library is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Lesser General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Lesser General Public License
17   * along with JWebThumb library.  If not, see <http://www.gnu.org/licenses/lgpl.html>.
18   */
19  
20  package com.commsen.jwebthumb;
21  
22  import java.util.List;
23  
24  import org.apache.commons.lang.builder.ReflectionToStringBuilder;
25  import org.simpleframework.xml.ElementList;
26  
27  /***
28   * This class represents 'jobStatus' part of webthumb's response to "status" API call. See <a
29   * href="http://webthumb.bluga.net/apidoc#status">http://webthumb.bluga.net/apidoc#status</a> for
30   * details
31   * 
32   * @author <a href="mailto:MilenDyankov@gmail.com">Milen Dyankov</a>
33   * @since 0.3
34   * 
35   */
36  public class WebThumbJobStatus {
37  
38  	@ElementList(required = false, inline = true, entry = "status")
39  	private List<WebThumbStatus> statuses;
40  
41  	@ElementList(required = false, inline = true, entry = "error")
42  	private List<WebThumbError> errors;
43  
44  
45  	// @Element(required = false)
46  	// private WebThumbError error;
47  
48  	@Override
49  	public String toString() {
50  		return new ReflectionToStringBuilder(this).toString();
51  	}
52  
53  
54  	/***
55  	 * @return the statuses
56  	 */
57  	public List<WebThumbStatus> getStatuses() {
58  		return this.statuses;
59  	}
60  
61  
62  	/***
63  	 * @return the errors
64  	 */
65  	public List<WebThumbError> getErrors() {
66  		return this.errors;
67  	}
68  
69  	/***
70  	 * @return the error
71  	 */
72  	// public WebThumbError getError() {
73  	// return this.error;
74  	// }
75  
76  }