diff --git a/src/com/uncc/gameday/GameDay.java b/src/com/uncc/gameday/GameDay.java index df4bcce..a120b69 100644 --- a/src/com/uncc/gameday/GameDay.java +++ b/src/com/uncc/gameday/GameDay.java @@ -3,14 +3,28 @@ package com.uncc.gameday; import android.app.Application; import android.content.Context; +// TODO: Auto-generated Javadoc +/** + * The Class GameDay. + */ public class GameDay extends Application{ + + /** The context. */ private static Context context; + /* (non-Javadoc) + * @see android.app.Application#onCreate() + */ public void onCreate(){ super.onCreate(); GameDay.context = getApplicationContext(); } + /** + * Gets the app context. + * + * @return the app context + */ public static Context getAppContext() { return GameDay.context; } diff --git a/src/com/uncc/gameday/activities/Alerts.java b/src/com/uncc/gameday/activities/Alerts.java index ead1641..dce0842 100644 --- a/src/com/uncc/gameday/activities/Alerts.java +++ b/src/com/uncc/gameday/activities/Alerts.java @@ -7,13 +7,25 @@ import android.widget.Toast; import com.uncc.gameday.R; +// TODO: Auto-generated Javadoc +/** + * The Class Alerts. + */ public class Alerts extends MenuActivity { + /* (non-Javadoc) + * @see com.uncc.gameday.activities.MenuActivity#onCreate(android.os.Bundle) + */ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_alerts); } + /** + * On click timed alerts. + * + * @param view the view + */ public void onClickTimedAlerts(View view) { int toastDuration = Toast.LENGTH_SHORT; if (((CheckBox) view).isChecked()) @@ -24,6 +36,11 @@ public class Alerts extends MenuActivity { Toast.makeText(this, "Timed alerts disabled.", toastDuration).show(); } + /** + * On click organization alerts. + * + * @param view the view + */ public void onClickOrganizationAlerts(View view) { int toastDuration = Toast.LENGTH_SHORT; if (((CheckBox) view).isChecked()) @@ -34,6 +51,11 @@ public class Alerts extends MenuActivity { Toast.makeText(this, "Organization alerts disabled.", toastDuration).show(); } + /** + * On click university alerts. + * + * @param view the view + */ public void onClickUniversityAlerts(View view) { int toastDuration = Toast.LENGTH_SHORT; if (((CheckBox) view).isChecked()) diff --git a/src/com/uncc/gameday/activities/Home.java b/src/com/uncc/gameday/activities/Home.java index 448157e..028794f 100644 --- a/src/com/uncc/gameday/activities/Home.java +++ b/src/com/uncc/gameday/activities/Home.java @@ -12,12 +12,20 @@ import android.os.Bundle; import com.uncc.gameday.R; import com.uncc.gameday.alerts.AlertService; +// TODO: Auto-generated Javadoc +/** + * The Class Home. + */ public class Home extends MenuActivity { + /** The alarm rate. */ private final long alarmRate = 300000; // 5 Minutes + /* (non-Javadoc) + * @see com.uncc.gameday.activities.MenuActivity#onCreate(android.os.Bundle) + */ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); @@ -37,6 +45,9 @@ public class Home extends MenuActivity { this.onFirstRun(); } + /** + * On first run. + */ protected void onFirstRun() { SharedPreferences settings = this.getPreferences(MODE_PRIVATE); if (settings.getBoolean("FIRST_RUN", true)) { diff --git a/src/com/uncc/gameday/activities/MenuActivity.java b/src/com/uncc/gameday/activities/MenuActivity.java index a69c54f..014cbeb 100644 --- a/src/com/uncc/gameday/activities/MenuActivity.java +++ b/src/com/uncc/gameday/activities/MenuActivity.java @@ -8,14 +8,24 @@ import android.view.MenuItem; import com.uncc.gameday.R; +// TODO: Auto-generated Javadoc +/** + * The Class MenuActivity. + */ public class MenuActivity extends Activity { + /* (non-Javadoc) + * @see android.app.Activity#onCreate(android.os.Bundle) + */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); } + /* (non-Javadoc) + * @see android.app.Activity#onCreateOptionsMenu(android.view.Menu) + */ @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. @@ -23,6 +33,9 @@ public class MenuActivity extends Activity { return true; } + /* (non-Javadoc) + * @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem) + */ @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()){ diff --git a/src/com/uncc/gameday/activities/Parking.java b/src/com/uncc/gameday/activities/Parking.java index 8ddcc96..5569969 100644 --- a/src/com/uncc/gameday/activities/Parking.java +++ b/src/com/uncc/gameday/activities/Parking.java @@ -9,14 +9,26 @@ import com.uncc.gameday.activities.parking.LotViewFragment; import com.uncc.gameday.parking.ParkingChoice; +// TODO: Auto-generated Javadoc +/** + * The Class Parking. + */ public class Parking extends MenuActivity { + /* (non-Javadoc) + * @see com.uncc.gameday.activities.MenuActivity#onCreate(android.os.Bundle) + */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_parking); } + /** + * On radio button click. + * + * @param v the v + */ public void onRadioButtonClick(View v) { FragmentManager fm = this.getFragmentManager(); LotViewFragment f = new LotViewFragment(); diff --git a/src/com/uncc/gameday/activities/Registration.java b/src/com/uncc/gameday/activities/Registration.java index f96aeff..031ed77 100644 --- a/src/com/uncc/gameday/activities/Registration.java +++ b/src/com/uncc/gameday/activities/Registration.java @@ -5,8 +5,15 @@ import android.os.Bundle; import com.uncc.gameday.R; +// TODO: Auto-generated Javadoc +/** + * The Class Registration. + */ public class Registration extends MenuActivity { + /* (non-Javadoc) + * @see com.uncc.gameday.activities.MenuActivity#onCreate(android.os.Bundle) + */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/src/com/uncc/gameday/activities/parking/LotViewFragment.java b/src/com/uncc/gameday/activities/parking/LotViewFragment.java index b206b74..6a91faf 100644 --- a/src/com/uncc/gameday/activities/parking/LotViewFragment.java +++ b/src/com/uncc/gameday/activities/parking/LotViewFragment.java @@ -17,13 +17,26 @@ import com.uncc.gameday.parking.ParkingCoordinate; import com.uncc.gameday.parking.ParkingLot; import com.uncc.gameday.parking.RatingChoices; +// TODO: Auto-generated Javadoc +/** + * The Class LotViewFragment. + */ public class LotViewFragment extends DialogFragment { + /** The pc. */ ParkingChoice pc; + /** + * Instantiates a new lot view fragment. + */ public LotViewFragment(){ } + /** + * Initialize data. + * + * @param pc the pc + */ private void initializeData(ParkingChoice pc){ ParkingClient client = new ParkingClient(this.getActivity()); @@ -35,6 +48,9 @@ public class LotViewFragment extends DialogFragment { // Set up the MapView here. } + /* (non-Javadoc) + * @see android.app.Fragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) + */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -58,6 +74,9 @@ public class LotViewFragment extends DialogFragment { return view; } + /** + * On submit rating. + */ public void onSubmitRating() { // Submit a rating to the server SeekBar bar = (SeekBar)this.getView().findViewById(R.id.lotViewRateLot); diff --git a/src/com/uncc/gameday/alerts/Alert.java b/src/com/uncc/gameday/alerts/Alert.java index 36bbb94..946d323 100644 --- a/src/com/uncc/gameday/alerts/Alert.java +++ b/src/com/uncc/gameday/alerts/Alert.java @@ -12,40 +12,99 @@ import android.content.Intent; import android.support.v4.app.NotificationCompat; import android.support.v4.app.TaskStackBuilder; +// TODO: Auto-generated Javadoc +/** + * The Class Alert. + */ public class Alert { + /** The alarm date. */ private Date alarmDate; + + /** The message. */ private String message; + + /** The shown. */ private boolean shown; // Default constructor + /** + * Instantiates a new alert. + */ public Alert(){} + /** + * Instantiates a new alert. + * + * @param alarmDate the alarm date + * @param message the message + * @param shown the shown + */ public Alert(Date alarmDate, String message, boolean shown) { this.setAlarmDate(alarmDate); this.setMessage(message); this.setShown(shown); } + /** + * Gets the alarm date. + * + * @return the alarm date + */ public Date getAlarmDate() { return alarmDate; } + + /** + * Sets the alarm date. + * + * @param alarmDate the new alarm date + */ public void setAlarmDate(Date alarmDate) { this.alarmDate = alarmDate; } + + /** + * Gets the message. + * + * @return the message + */ public String getMessage() { return message; } + + /** + * Sets the message. + * + * @param message the new message + */ public void setMessage(String message) { this.message = message; } + + /** + * Checks if is shown. + * + * @return true, if is shown + */ public boolean isShown() { return shown; } + + /** + * Sets the shown. + * + * @param shown the new shown + */ public void setShown(boolean shown) { this.shown = shown; } + /** + * Display notification. + * + * @param ctx the ctx + */ public void displayNotification(Context ctx) { NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx) .setSmallIcon(R.drawable.ic_launcher) diff --git a/src/com/uncc/gameday/alerts/AlertDB.java b/src/com/uncc/gameday/alerts/AlertDB.java index 633dd51..81b731a 100644 --- a/src/com/uncc/gameday/alerts/AlertDB.java +++ b/src/com/uncc/gameday/alerts/AlertDB.java @@ -3,33 +3,69 @@ package com.uncc.gameday.alerts; import java.util.Date; import java.util.List; +// TODO: Auto-generated Javadoc /* Responsible for handling persistence/fetching of alerts */ +/** + * The Class AlertDB. + */ public class AlertDB { + /** + * Persist. + * + * @param a the a + */ public void persist(Alert a) { } + /** + * Persist multiple. + * + * @param alerts the alerts + */ public void persistMultiple(List alerts) { } + /** + * Fetch. + * + * @param d the d + * @return the alert + */ public Alert fetch(Date d) { return null; } + /** + * Fetch multiple. + * + * @param dates the dates + * @return the list + */ public List fetchMultiple(List dates) { return null; } + /** + * Fetch all. + * + * @return the list + */ public List fetchAll() { return null; } + /** + * Fetch unread. + * + * @return the list + */ public List fetchUnread() { return null; } diff --git a/src/com/uncc/gameday/alerts/AlertFetcher.java b/src/com/uncc/gameday/alerts/AlertFetcher.java index e107a65..7d383d6 100644 --- a/src/com/uncc/gameday/alerts/AlertFetcher.java +++ b/src/com/uncc/gameday/alerts/AlertFetcher.java @@ -14,11 +14,21 @@ import android.util.Log; import com.uncc.gameday.R; +// TODO: Auto-generated Javadoc +/** + * The Class AlertFetcher. + */ public class AlertFetcher { // Class responsible for fetching all alerts as necessary. + /** The max tweets. */ private int maxTweets = 5; + /** + * Fetch alerts. + * + * @param ctx the ctx + */ public void fetchAlerts(Context ctx) { // Fetch all alerts. Responsible for discovering what sources need to be fetched. @@ -41,6 +51,12 @@ public class AlertFetcher { } } + /** + * Fetch organization alerts. + * + * @param ctx the ctx + * @throws TwitterException the twitter exception + */ private void fetchOrganizationAlerts(Context ctx) throws TwitterException { // Process fetching organization alerts (alerts retweeted by us) // Will not necessarily fetch `maxTweets` tweets. @@ -58,6 +74,12 @@ public class AlertFetcher { // List contains all valid alerts now } + /** + * Fetch university alerts. + * + * @param ctx the ctx + * @throws TwitterException the twitter exception + */ private void fetchUniversityAlerts(Context ctx) throws TwitterException { // Process fetching university alerts // Guaranteed to get `maxTweets` tweets @@ -68,6 +90,12 @@ public class AlertFetcher { // List contains all valid alerts now } + /** + * Fetch gameday alerts. + * + * @param ctx the ctx + * @throws TwitterException the twitter exception + */ private void fetchGamedayAlerts(Context ctx) throws TwitterException { // Process fetching alerts generated by staff of UNCCGameDay // Not guaranteed to get `maxTweets` tweets @@ -86,6 +114,12 @@ public class AlertFetcher { } + /** + * Creates the timed alerts. + * + * @param ctx the ctx + * @return the list + */ public static List createTimedAlerts(Context ctx) { // Create the timed alerts so we can add or remove them from the DB return null; diff --git a/src/com/uncc/gameday/alerts/AlertService.java b/src/com/uncc/gameday/alerts/AlertService.java index 5db7ff6..22a6b2a 100644 --- a/src/com/uncc/gameday/alerts/AlertService.java +++ b/src/com/uncc/gameday/alerts/AlertService.java @@ -5,13 +5,25 @@ import java.util.List; import android.app.IntentService; import android.content.Intent; +// TODO: Auto-generated Javadoc +/** + * The Class AlertService. + */ public class AlertService extends IntentService { + + /** The Constant name. */ private static final String name = "AlertService"; + /** + * Instantiates a new alert service. + */ public AlertService() { super(name); } + /* (non-Javadoc) + * @see android.app.IntentService#onHandleIntent(android.content.Intent) + */ @Override protected void onHandleIntent(Intent intent) { // Go fetch all the alerts! diff --git a/src/com/uncc/gameday/parking/ParkingChoice.java b/src/com/uncc/gameday/parking/ParkingChoice.java index 7574a9f..5fb0c36 100644 --- a/src/com/uncc/gameday/parking/ParkingChoice.java +++ b/src/com/uncc/gameday/parking/ParkingChoice.java @@ -1,19 +1,58 @@ package com.uncc.gameday.parking; +// TODO: Auto-generated Javadoc +/** + * The Enum ParkingChoice. + */ public enum ParkingChoice { + + /** The green. */ GREEN ("GREEN"), + + /** The black. */ BLACK ("BLACK"), + + /** The red. */ RED ("RED"), + + /** The blue. */ BLUE ("BLUE"), + + /** The silver. */ SILVER ("SILVER"), + + /** The orange. */ ORANGE ("ORANGE"), + + /** The yellow. */ YELLOW ("YELLOW"), + + /** The purple. */ PURPLE ("PURPLE"), + + /** The pink. */ PINK ("PINK"), + + /** The white. */ WHITE ("WHITE"), + + /** The gold. */ GOLD ("GOLD"); + /** The choice. */ String choice; + + /** + * Instantiates a new parking choice. + * + * @param choice the choice + */ ParkingChoice(String choice) { this.choice = choice; } + + /** + * Gets the value. + * + * @return the value + */ public String getValue() { return choice; } } \ No newline at end of file diff --git a/src/com/uncc/gameday/parking/ParkingClient.java b/src/com/uncc/gameday/parking/ParkingClient.java index 815ebe1..2c9bb14 100644 --- a/src/com/uncc/gameday/parking/ParkingClient.java +++ b/src/com/uncc/gameday/parking/ParkingClient.java @@ -8,10 +8,20 @@ import android.content.Context; import com.uncc.gameday.R; import com.uncc.gameday.rest.GamedayService; +// TODO: Auto-generated Javadoc +/** + * The Class ParkingClient. + */ public class ParkingClient { + /** The gds. */ private GamedayService gds; + /** + * Instantiates a new parking client. + * + * @param c the c + */ public ParkingClient(Context c) { RestAdapter ra = new RestAdapter.Builder() .setServer("http://" + c.getString(R.string.server_hostname)) @@ -19,18 +29,41 @@ public class ParkingClient { gds = ra.create(GamedayService.class); } + /** + * List lots. + * + * @return the list + */ public List listLots() { return gds.listLots(); } + /** + * List lot. + * + * @param choice the choice + * @return the parking lot + */ public ParkingLot listLot(ParkingChoice choice) { return gds.listLot(choice.getValue()); } + /** + * List lot. + * + * @param lot the lot + * @return the parking lot + */ public ParkingLot listLot(ParkingLot lot) { return gds.listLot(lot.getLocation().getValue()); } + /** + * Rate lot. + * + * @param rating the rating + * @param parkingLot the parking lot + */ public void rateLot(RatingChoices rating, ParkingChoice parkingLot) { ParkingRating pRating = new ParkingRating(); pRating.setParkingLot(parkingLot); @@ -38,16 +71,33 @@ public class ParkingClient { gds.rateLot(pRating, new ParkingLotCallback()); } + /** + * Rate lot. + * + * @param rating the rating + */ public void rateLot(ParkingRating rating) { gds.rateLot(rating, new ParkingLotCallback()); } + /** + * List lot location. + * + * @param p the p + * @return the parking lot + */ public ParkingLot listLotLocation(ParkingLot p){ ParkingCoordinate pc = gds.listLotLocation(p.getLocation().getValue()); p.setCoordinate(pc); return p; } + /** + * List lot location. + * + * @param c the c + * @return the parking lot + */ public ParkingLot listLotLocation(ParkingChoice c) { ParkingCoordinate pc = gds.listLotLocation(c.getValue()); ParkingLot pl = new ParkingLot(); diff --git a/src/com/uncc/gameday/parking/ParkingCoordinate.java b/src/com/uncc/gameday/parking/ParkingCoordinate.java index be1a966..d579b92 100644 --- a/src/com/uncc/gameday/parking/ParkingCoordinate.java +++ b/src/com/uncc/gameday/parking/ParkingCoordinate.java @@ -3,40 +3,102 @@ package com.uncc.gameday.parking; import android.content.Intent; import android.net.Uri; +// TODO: Auto-generated Javadoc +/** + * The Class ParkingCoordinate. + */ public class ParkingCoordinate { + + /** The latitude. */ private double latitude; + + /** The longitude. */ private double longitude; + + /** The label. */ private String label; + /** + * Gets the latitude. + * + * @return the latitude + */ public double getLatitude() { return latitude; } + + /** + * Sets the latitude. + * + * @param latitude the new latitude + */ public void setLatitude(double latitude) { this.latitude = latitude; } + + /** + * Gets the longitude. + * + * @return the longitude + */ public double getLongitude() { return longitude; } + + /** + * Sets the longitude. + * + * @param longitude the new longitude + */ public void setLongitude(double longitude) { this.longitude = longitude; } + + /** + * Gets the label. + * + * @return the label + */ public String getLabel() { return label; } + + /** + * Sets the label. + * + * @param label the new label + */ public void setLabel(String label) { this.label = label; } + /** + * Gets the navigation uri. + * + * @return the navigation uri + */ public Uri getNavigationURI() { // URI used to construct an intent for navigation return Uri.parse("google.navigation:q=" + this.getLatitude() + "," + this.getLongitude()); } + /** + * Gets the navigation intent. + * + * @return the navigation intent + */ public Intent getNavigationIntent() { // Intent used to do navigation return new Intent(Intent.ACTION_VIEW, this.getNavigationURI()); } + /** + * Instantiates a new parking coordinate. + * + * @param latitude the latitude + * @param longitude the longitude + * @param label the label + */ public ParkingCoordinate(double latitude, double longitude, String label) { this.latitude = latitude; this.longitude = longitude; diff --git a/src/com/uncc/gameday/parking/ParkingLot.java b/src/com/uncc/gameday/parking/ParkingLot.java index ecaa8fa..cd086dd 100644 --- a/src/com/uncc/gameday/parking/ParkingLot.java +++ b/src/com/uncc/gameday/parking/ParkingLot.java @@ -1,26 +1,70 @@ package com.uncc.gameday.parking; +// TODO: Auto-generated Javadoc +/** + * The Class ParkingLot. + */ public class ParkingLot { + /** The location. */ private ParkingChoice location; + + /** The filled_pct. */ private int filled_pct; + + /** The coordinate. */ private ParkingCoordinate coordinate; + /** + * Gets the filled pct. + * + * @return the filled pct + */ public int getFilledPct() { return filled_pct; } + + /** + * Sets the filled pct. + * + * @param filled_pct the new filled pct + */ public void setFilledPct(int filled_pct) { this.filled_pct = filled_pct; } + + /** + * Gets the location. + * + * @return the location + */ public ParkingChoice getLocation() { return location; } + + /** + * Sets the location. + * + * @param location the new location + */ public void setLocation(ParkingChoice location) { this.location = location; } + + /** + * Gets the coordinate. + * + * @return the coordinate + */ public ParkingCoordinate getCoordinate() { return coordinate; } + + /** + * Sets the coordinate. + * + * @param coordinate the new coordinate + */ public void setCoordinate(ParkingCoordinate coordinate) { this.coordinate = coordinate; } diff --git a/src/com/uncc/gameday/parking/ParkingLotCallback.java b/src/com/uncc/gameday/parking/ParkingLotCallback.java index c520227..c5f4fa4 100644 --- a/src/com/uncc/gameday/parking/ParkingLotCallback.java +++ b/src/com/uncc/gameday/parking/ParkingLotCallback.java @@ -5,13 +5,23 @@ import retrofit.Callback; import retrofit.RetrofitError; import retrofit.client.Response; +// TODO: Auto-generated Javadoc +/** + * The Class ParkingLotCallback. + */ public class ParkingLotCallback implements Callback { + /* (non-Javadoc) + * @see retrofit.Callback#failure(retrofit.RetrofitError) + */ @Override public void failure(RetrofitError e) { Log.w("ParkingLotCallback", e.getMessage()); } + /* (non-Javadoc) + * @see retrofit.Callback#success(java.lang.Object, retrofit.client.Response) + */ @Override public void success(ParkingLot p, Response r) { return; diff --git a/src/com/uncc/gameday/parking/ParkingRating.java b/src/com/uncc/gameday/parking/ParkingRating.java index 9e03669..32ef603 100644 --- a/src/com/uncc/gameday/parking/ParkingRating.java +++ b/src/com/uncc/gameday/parking/ParkingRating.java @@ -1,18 +1,49 @@ package com.uncc.gameday.parking; +// TODO: Auto-generated Javadoc +/** + * The Class ParkingRating. + */ public class ParkingRating { + + /** The parking_lot. */ private ParkingChoice parking_lot; + + /** The rating. */ private RatingChoices rating; + /** + * Gets the parking lot. + * + * @return the parking lot + */ public ParkingChoice getParkingLot() { return parking_lot; } + + /** + * Sets the parking lot. + * + * @param parking_lot the new parking lot + */ public void setParkingLot(ParkingChoice parking_lot) { this.parking_lot = parking_lot; } + + /** + * Gets the rating. + * + * @return the rating + */ public RatingChoices getRating() { return rating; } + + /** + * Sets the rating. + * + * @param rating the new rating + */ public void setRating(RatingChoices rating) { this.rating = rating; } diff --git a/src/com/uncc/gameday/parking/RatingChoices.java b/src/com/uncc/gameday/parking/RatingChoices.java index a7dbe70..b916efb 100644 --- a/src/com/uncc/gameday/parking/RatingChoices.java +++ b/src/com/uncc/gameday/parking/RatingChoices.java @@ -1,12 +1,37 @@ package com.uncc.gameday.parking; +// TODO: Auto-generated Javadoc +/** + * The Enum RatingChoices. + */ public enum RatingChoices { + + /** The emp. */ EMP ("EMPTY"), + + /** The sct. */ SCT ("SCATTERED"), + + /** The bsy. */ BSY ("BUSY"), + + /** The fll. */ FLL ("FULL"); + /** The choice. */ String choice; + + /** + * Instantiates a new rating choices. + * + * @param choice the choice + */ RatingChoices(String choice) { this.choice = choice; } + + /** + * Gets the value. + * + * @return the value + */ public String getValue() { return choice; } } diff --git a/src/com/uncc/gameday/registration/Attendee.java b/src/com/uncc/gameday/registration/Attendee.java index 8efda6b..9fdde84 100644 --- a/src/com/uncc/gameday/registration/Attendee.java +++ b/src/com/uncc/gameday/registration/Attendee.java @@ -1,40 +1,112 @@ package com.uncc.gameday.registration; +// TODO: Auto-generated Javadoc +/** + * The Class Attendee. + */ public class Attendee { + /** The id. */ private int id; + + /** The first_name. */ private String first_name; + + /** The last_name. */ private String last_name; + + /** The section. */ private String section; + + /** The row. */ private int row; + /** + * Gets the first name. + * + * @return the first name + */ public String getFirstName() { return first_name; } + + /** + * Sets the first name. + * + * @param first_name the new first name + */ public void setFirstName(String first_name) { this.first_name = first_name; } + + /** + * Gets the last name. + * + * @return the last name + */ public String getLastName() { return last_name; } + + /** + * Sets the last name. + * + * @param last_name the new last name + */ public void setLastName(String last_name) { this.last_name = last_name; } + + /** + * Gets the section. + * + * @return the section + */ public String getSection() { return section; } + + /** + * Sets the section. + * + * @param section the new section + */ public void setSection(String section) { this.section = section; } + + /** + * Gets the row. + * + * @return the row + */ public int getRow() { return row; } + + /** + * Sets the row. + * + * @param row the new row + */ public void setRow(int row) { this.row = row; } + + /** + * Gets the id. + * + * @return the id + */ public int getId() { return id; } + + /** + * Sets the id. + * + * @param id the new id + */ public void setId(int id) { this.id = id; } diff --git a/src/com/uncc/gameday/registration/AttendeeCallback.java b/src/com/uncc/gameday/registration/AttendeeCallback.java index 59665b2..1a584c4 100644 --- a/src/com/uncc/gameday/registration/AttendeeCallback.java +++ b/src/com/uncc/gameday/registration/AttendeeCallback.java @@ -5,13 +5,23 @@ import retrofit.Callback; import retrofit.RetrofitError; import retrofit.client.Response; +// TODO: Auto-generated Javadoc +/** + * The Class AttendeeCallback. + */ public class AttendeeCallback implements Callback { + /* (non-Javadoc) + * @see retrofit.Callback#failure(retrofit.RetrofitError) + */ @Override public void failure(RetrofitError e) { Log.w("AttendeeCallback", e.getMessage()); } + /* (non-Javadoc) + * @see retrofit.Callback#success(java.lang.Object, retrofit.client.Response) + */ @Override public void success(Attendee a, Response r) { return; diff --git a/src/com/uncc/gameday/registration/RegistrationClient.java b/src/com/uncc/gameday/registration/RegistrationClient.java index d9b3547..7fc7e09 100644 --- a/src/com/uncc/gameday/registration/RegistrationClient.java +++ b/src/com/uncc/gameday/registration/RegistrationClient.java @@ -8,10 +8,20 @@ import android.content.Context; import com.uncc.gameday.R; import com.uncc.gameday.rest.GamedayService; +// TODO: Auto-generated Javadoc +/** + * The Class RegistrationClient. + */ public class RegistrationClient { + /** The gds. */ private GamedayService gds; + /** + * Instantiates a new registration client. + * + * @param c the c + */ public RegistrationClient(Context c) { RestAdapter ra = new RestAdapter.Builder() .setServer("http://" + c.getString(R.string.server_hostname)) @@ -19,18 +29,40 @@ public class RegistrationClient { gds = ra.create(GamedayService.class); } + /** + * Register attendee. + * + * @param a the a + */ public void registerAttendee(Attendee a) { gds.registerUser(a, new AttendeeCallback()); } + /** + * List attendee. + * + * @param id the id + * @return the attendee + */ public Attendee listAttendee(int id) { return gds.getUser(id); } + /** + * List attendee. + * + * @param a the a + * @return the attendee + */ public Attendee listAttendee(Attendee a) { return gds.getUser(a.getFirstName(), a.getLastName()); } + /** + * List attendees. + * + * @return the list + */ public List listAttendees() { return gds.getAllUsers(); } diff --git a/src/com/uncc/gameday/rest/GamedayService.java b/src/com/uncc/gameday/rest/GamedayService.java index 23baa61..aaafc4a 100644 --- a/src/com/uncc/gameday/rest/GamedayService.java +++ b/src/com/uncc/gameday/rest/GamedayService.java @@ -13,29 +13,80 @@ import com.uncc.gameday.parking.ParkingLot; import com.uncc.gameday.parking.ParkingRating; import com.uncc.gameday.registration.Attendee; +// TODO: Auto-generated Javadoc +/** + * The Interface GamedayService. + */ public interface GamedayService { + /** + * List lots. + * + * @return the list + */ @GET("/lots/") List listLots(); + /** + * List lot. + * + * @param lot the lot + * @return the parking lot + */ @GET("/lots/{lot}/") ParkingLot listLot(@Path("lot") String lot); + /** + * Rate lot. + * + * @param p the p + * @param lot the lot + */ @POST("/lots/rate/") void rateLot(@Body ParkingRating p, Callback lot); + /** + * List lot location. + * + * @param lot the lot + * @return the parking coordinate + */ @GET("/lots/{lot}/") ParkingCoordinate listLotLocation(@Path("lot") String lot); + /** + * Gets the user. + * + * @param id the id + * @return the user + */ @GET("/register/{id}/") Attendee getUser(@Path("id") int id); + /** + * Gets the user. + * + * @param firstName the first name + * @param lastName the last name + * @return the user + */ @GET("/register/{fname}/{lname}/") Attendee getUser(@Path("fname") String firstName, @Path("lname") String lastName); + /** + * Gets the all users. + * + * @return the all users + */ @GET("/register/") List getAllUsers(); + /** + * Register user. + * + * @param a the a + * @param attendee the attendee + */ @POST("/register/") void registerUser(@Body Attendee a, Callback attendee); diff --git a/src/com/uncc/gameday/twitter/TwitterClient.java b/src/com/uncc/gameday/twitter/TwitterClient.java index 1404737..0a28ca2 100644 --- a/src/com/uncc/gameday/twitter/TwitterClient.java +++ b/src/com/uncc/gameday/twitter/TwitterClient.java @@ -11,14 +11,29 @@ import twitter4j.TwitterFactory; import twitter4j.conf.Configuration; import twitter4j.conf.ConfigurationBuilder; +// TODO: Auto-generated Javadoc +/** + * The Class TwitterClient. + */ public class TwitterClient { + /** The Constant CONSUMER_KEY. */ static final String CONSUMER_KEY = "vfRa3Tr5QYaU8Jr2pKHtiA"; + + /** The Constant CONSUMER_SECRET. */ static final String CONSUMER_SECRET = "gGRdIrhPdX2Vrg296xOvTqE4sgOISMphRmPdrGirbU"; + /** The c. */ Configuration c; + + /** The t. */ Twitter t; + /** + * Instantiates a new twitter client. + * + * @throws TwitterException the twitter exception + */ public TwitterClient() throws TwitterException { ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setApplicationOnlyAuthEnabled(true).setUseSSL(true); @@ -28,6 +43,12 @@ public class TwitterClient { t.getOAuth2Token(); } + /** + * Fetch tweets. + * + * @param handle the handle + * @return the list + */ public List fetchTweets(String handle) { try { return t.getUserTimeline(handle); @@ -38,6 +59,13 @@ public class TwitterClient { } } + /** + * Fetch tweets. + * + * @param handle the handle + * @param count the count + * @return the list + */ public List fetchTweets(String handle, int count) { try { return t.getUserTimeline(handle, new Paging(1, count));