package org.azavea.otm.rest.handlers;

import org.azavea.otm.data.Model;
import org.json.JSONObject;

import com.loopj.android.http.JsonHttpResponseHandler;

public class RestHandler<T extends Model> extends JsonHttpResponseHandler {
	private T resultObject;
	
	public RestHandler(T resultObject) {
		this.resultObject = resultObject;
	}
	
	@Override
	public void onSuccess(JSONObject response) {
		resultObject.setData(response);
		dataReceived(resultObject);
	}

	// Overridden by consuming class
	public void dataReceived(T responseObject) {
		
	}
}

@@ -227,17 +227,20 @@
 ndler %7B%0A
-%09
+    
 private 
@@ -255,19 +255,21 @@
 Object;%0A
-%09%0A%09
+%0A    
 public R
@@ -297,18 +297,24 @@
 ject) %7B%0A
-%09%09
+        
 this.res
@@ -343,14 +343,19 @@
 ct;%0A
-%09%7D%0A%09%0A%09
+    %7D%0A%0A    
 @Ove
@@ -360,17 +360,20 @@
 verride%0A
-%09
+    
 public v
@@ -409,18 +409,24 @@
 onse) %7B%0A
-%09%09
+        
 resultOb
@@ -449,18 +449,24 @@
 ponse);%0A
-%09%09
+        
 dataRece
@@ -489,13 +489,19 @@
 t);%0A
-%09%7D%0A%0A%09
+    %7D%0A%0A    
 // O
@@ -529,17 +529,20 @@
 g class%0A
-%09
+    
 public v
@@ -582,12 +582,13 @@
 ) %7B%0A
-%09%09%0A%09
+%0A    
 %7D%0A%7D%0A

Reformat code