Initial automated refactoring

This commit is contained in:
bspeice
2013-10-20 17:32:28 -04:00
parent 83a66e45a6
commit 2ebeba7288
7 changed files with 16 additions and 6 deletions

View File

@ -1,31 +0,0 @@
package com.uncc.gameday.registration;
import java.util.List;
import retrofit.Callback;
import retrofit.http.*;
public interface GamedayService {
@GET("/lots/")
List<ParkingLot> listLots();
@GET("/lots/{lot}/")
ParkingLot listLot(@Path("lot") String lot);
@POST("/rate/")
void rateLot(@Body ParkingRating p, Callback<ParkingLot> lot);
@GET("/register/{id}/")
Attendee getUser(@Path("id") int id);
@GET("/register/{fname}/{lname}/")
Attendee getUser(@Path("fname") String firstName, @Path("lname") String lastName);
@GET("/register/")
List<Attendee> getAllUsers();
@POST("/register/")
void registerUser(@Body Attendee a, Callback<Attendee> attendee);
}

View File

@ -1,19 +0,0 @@
package com.uncc.gameday.registration;
public enum ParkingChoices {
GREEN ("GREEN"),
BLACK ("BLACK"),
RED ("RED"),
BLUE ("BLUE"),
SILVER ("SILVER"),
ORANGE ("ORANGE"),
YELLOW ("YELLOW"),
PURPLE ("PURPLE"),
PINK ("PINK"),
WHITE ("WHITE"),
GOLD ("GOLD");
String choice;
ParkingChoices(String choice) { this.choice = choice; }
public String getValue() { return choice; }
}

View File

@ -1,21 +0,0 @@
package com.uncc.gameday.registration;
public class ParkingLot {
private ParkingChoices location;
private int filled_pct;
public int getFilledPct() {
return filled_pct;
}
public void setFilledPct(int filled_pct) {
this.filled_pct = filled_pct;
}
public ParkingChoices getLocation() {
return location;
}
public void setLocation(ParkingChoices location) {
this.location = location;
}
}

View File

@ -1,20 +0,0 @@
package com.uncc.gameday.registration;
import android.util.Log;
import retrofit.Callback;
import retrofit.RetrofitError;
import retrofit.client.Response;
public class ParkingLotCallback implements Callback<ParkingLot> {
@Override
public void failure(RetrofitError e) {
Log.w("ParkingLotCallback", e.getMessage());
}
@Override
public void success(ParkingLot p, Response r) {
return;
}
}

View File

@ -1,19 +0,0 @@
package com.uncc.gameday.registration;
public class ParkingRating {
private ParkingChoices parking_lot;
private RatingChoices rating;
public ParkingChoices getParkingLot() {
return parking_lot;
}
public void setParkingLot(ParkingChoices parking_lot) {
this.parking_lot = parking_lot;
}
public RatingChoices getRating() {
return rating;
}
public void setRating(RatingChoices rating) {
this.rating = rating;
}
}

View File

@ -1,12 +0,0 @@
package com.uncc.gameday.registration;
public enum RatingChoices {
EMP ("EMPTY"),
SCT ("SCATTERED"),
BSY ("BUSY"),
FLL ("FULL");
String choice;
RatingChoices(String choice) { this.choice = choice; }
public String getValue() { return choice; }
}

View File

@ -6,6 +6,12 @@ import retrofit.RestAdapter;
import android.content.Context;
import com.uncc.gameday.R;
import com.uncc.gameday.parking.ParkingChoices;
import com.uncc.gameday.parking.ParkingLot;
import com.uncc.gameday.parking.ParkingLotCallback;
import com.uncc.gameday.parking.ParkingRating;
import com.uncc.gameday.parking.RatingChoices;
import com.uncc.gameday.rest.GamedayService;
public class RegistrationClient {