Revision 038ac9a4 src/com/rackspace/cloud/servers/api/client/Image.java

b/src/com/rackspace/cloud/servers/api/client/Image.java
9 9

  
10 10
/**
11 11
 * @author Mike Mayo - mike.mayo@rackspace.com - twitter.com/greenisus
12
 *
12
 * 
13 13
 */
14
public class Image extends Entity implements Comparable<Image>{
14
public class Image extends Entity implements Comparable<Image> {
15 15

  
16 16
	private static final long serialVersionUID = -9020224299062520935L;
17 17
	private static TreeMap<String, Image> images;
18 18
	private String status;
19 19
	private String updated;
20
	
20

  
21 21
	public int iconResourceId() {
22 22
		int iconResourceId = R.drawable.cloudservers_icon; // default if unknown
23
		
23

  
24 24
		if ("2".equals(getId())) {
25 25
			iconResourceId = R.drawable.centos_icon;
26 26
		} else if ("3".equals(getId())) {
......
88 88
		}
89 89
		return iconResourceId;
90 90
	}
91
	
91

  
92 92
	public int logoResourceId() {
93
		int logoResourceId = R.drawable.cloudservers_large; // default if unknown
94
		
93
		int logoResourceId = R.drawable.cloudservers_large; // default if
94
															// unknown
95

  
95 96
		if ("2".equals(getId())) {
96 97
			logoResourceId = R.drawable.centos_large;
97 98
		} else if ("3".equals(getId())) {
......
157 158
		} else if ("71".equals(getId())) {
158 159
			logoResourceId = R.drawable.fedora_large;
159 160
		}
160
		
161

  
161 162
		return logoResourceId;
162 163
	}
163
	
164

  
164 165
	/**
165 166
	 * @return the status
166 167
	 */
167 168
	public String getStatus() {
168 169
		return status;
169 170
	}
171

  
170 172
	/**
171
	 * @param status the status to set
173
	 * @param status
174
	 *            the status to set
172 175
	 */
173 176
	public void setStatus(String status) {
174 177
		this.status = status;
175 178
	}
179

  
176 180
	/**
177 181
	 * @return the updated
178 182
	 */
179 183
	public String getUpdated() {
180 184
		return updated;
181 185
	}
186

  
182 187
	/**
183
	 * @param updated the updated to set
188
	 * @param updated
189
	 *            the updated to set
184 190
	 */
185 191
	public void setUpdated(String updated) {
186 192
		this.updated = updated;
......
194 200
	}
195 201

  
196 202
	/**
197
	 * @param images the images to set
203
	 * @param images
204
	 *            the images to set
198 205
	 */
199 206
	public static void setImages(TreeMap<String, Image> images) {
200 207
		Image.images = images;
......
204 211
	public int compareTo(Image b) {
205 212
		return this.getName().compareTo(b.getName());
206 213
	}
207
	
208
	
214

  
209 215
}

Also available in: Unified diff