Merge branch 'bottomNaviWithFrags' of s416084/find-my-tutor-android into develop

This commit is contained in:
Marcin Jedyński 2018-09-04 17:23:26 +00:00 committed by Gogs
commit 3ab11592d4
53 changed files with 3800 additions and 329 deletions

73
.gitignore vendored
View File

@ -1,10 +1,67 @@
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.gradle
/local.properties
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
.idea/vcs.xml
.idea/workspace.xml
.idea/modules.xml
# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WizardSettings">
<option name="children">
<map>
<entry key="imageWizard">
<value>
<PersistentState />
</value>
</entry>
</map>
</option>
</component>
</project>

65
app/.gitignore vendored
View File

@ -1 +1,66 @@
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
/build

View File

@ -2,6 +2,10 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 27
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.uam.wmi.findmytutor"
minSdkVersion 19
@ -26,7 +30,19 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation "io.swagger:swagger-annotations:1.5.15"
implementation "org.threeten:threetenbp:1.3.5"
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.4.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.0'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation "com.jakewharton:butterknife:8.8.1"
annotationProcessor "com.jakewharton:butterknife-compiler:8.8.1"
implementation "com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0"
implementation "com.squareup.okhttp3:okhttp:3.11.0"
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.10.0"
implementation "com.squareup.okhttp3:logging-interceptor:3.11.0"
}

View File

@ -7,6 +7,10 @@
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:allowBackup="true"

View File

@ -3,24 +3,20 @@ package com.uam.wmi.findmytutor.activity;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.support.annotation.NonNull;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.app.LoaderManager.LoaderCallbacks;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.support.annotation.NonNull;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
@ -31,22 +27,24 @@ import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.ToggleButton;
import com.uam.wmi.findmytutor.R;
import com.uam.wmi.findmytutor.model.JwtToken;
import com.uam.wmi.findmytutor.model.LdapUser;
import com.uam.wmi.findmytutor.network.RetrofitClientInstance;
import com.uam.wmi.findmytutor.network.ApiClient;
import com.uam.wmi.findmytutor.service.LdapService;
import com.uam.wmi.findmytutor.utils.PrefUtils;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.observers.DisposableSingleObserver;
import io.reactivex.schedulers.Schedulers;
import static android.Manifest.permission.READ_CONTACTS;
@ -77,6 +75,7 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
private EditText mPasswordView;
private View mProgressView;
private View mLoginFormView;
private boolean loginOption;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -98,6 +97,14 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
}
});
Switch tutorLogin = (Switch) findViewById(R.id.tutor_login_switch);
tutorLogin.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
loginOption = tutorLogin.isChecked();
}
});
Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button);
mEmailSignInButton.setOnClickListener(new OnClickListener() {
@ -202,7 +209,7 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
// Show a progress spinner, and kick off a background task to
// perform the user login attempt.
showProgress(true);
mAuthTask = new UserLoginTask(email, password);
mAuthTask = new UserLoginTask(email, password,loginOption);
mAuthTask.execute((Void) null);
}
}
@ -315,73 +322,44 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
private final String mEmail;
private final String mPassword;
private boolean isTutor;
private LdapService ldapService;
private CompositeDisposable disposable = new CompositeDisposable();
private Boolean isAuthorizate;
// Constructor
UserLoginTask(String email, String password) {
UserLoginTask(String email, String password, Boolean loginOption) {
mEmail = email;
mPassword = password;
isTutor=loginOption;
this.ldapService = ApiClient.getClient(getApplicationContext())
.create(LdapService.class);
this.isAuthorizate = false;
}
@Override
protected Boolean doInBackground(Void... params) {
LdapService service = RetrofitClientInstance.getRetrofitLoginInstance().create(LdapService.class);
LdapUser user = new LdapUser("string",mPassword,"string","string","string","string",mEmail);
try {
Response<JwtToken> loginResponse = service.fakeValidate(user).execute();
if (loginResponse.isSuccessful()) {
String authToken = loginResponse.body().getToken();
Log.e("Login", "jwt token: " + authToken);
SharedPreferences sharedPref = getSharedPreferences("fmtPrefs", Context.MODE_PRIVATE);
sharedPref.edit().putString("authToken", authToken).putBoolean("loggedIn", true).apply();
LdapUser user = new LdapUser("string",mPassword,"string",(isTutor)?"tutor":"student","string","string",mEmail);
Log.d("LoginRole","Login role is : " + user.getTitle());
disposable.add(
ldapService
.fakeValidate(user)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribeWith(new DisposableSingleObserver<JwtToken>() {
@Override
public void onSuccess(JwtToken jwtToken) {
PrefUtils.storeApiKey(getApplicationContext(), jwtToken.getToken());
onPostExecute(true);
}
@Override
public void onError(Throwable e) {
Log.e("LoginError", "onError: " + e.getMessage());
}
}));
return true;
}
} catch (IOException e) {
Log.e("Login error", "nie udalo sie kurde...");
return false;
}
//To jest async i nie da sie zwrocic :(
// Call<JwtToken> call = service.fakeValidate(user);
//
// call.enqueue(new Callback<JwtToken>() {
// @Override
// public void onResponse(Call<JwtToken> call, Response<JwtToken> response) {
// Log.e("jwt", response.body().getToken());
// }
//
// @Override
// public void onFailure(Call<JwtToken> call, Throwable t) {
// Toast.makeText(LoginActivity.this, "Something went wrong...Please try later!", Toast.LENGTH_SHORT).show();
// return false;
// }
// });
// TODO: attempt authentication against a network service.
// try {
// // Simulate network access.
// Thread.sleep(2000);
// } catch (InterruptedException e) {
// return false;
// }
//
// for (String credential : DUMMY_CREDENTIALS) {
// String[] pieces = credential.split(":");
// if (pieces[0].equals(mEmail)) {
// // Account exists, return true if the password matches.
// return pieces[1].equals(mPassword);
// }
// }
// TODO: register the new account here.
return false;
}
@Override
@ -390,17 +368,9 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
showProgress(false);
if (success) {
// TODO: Ustawiam localstora kluczyk jakis
SharedPreferences sharedPref = getSharedPreferences("fmtPrefs", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
editor.putString("test", "jakieś gówno");
editor.commit();
Log.e("okurwa", "eealslasla");
// TODO: Ma zwracac 666 i cos jeszcze, do tego wpisywac jwt to shared prefs... kurwa
Intent data = new Intent();
String txt = "siema eee";
String txt = "test text to Startup compo";
data.setData(Uri.parse(txt));
setResult(RESULT_OK, data);
finish();
@ -408,6 +378,7 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
mPasswordView.setError(getString(R.string.error_incorrect_password));
mPasswordView.requestFocus();
}
}
@Override

View File

@ -1,26 +1,121 @@
package com.uam.wmi.findmytutor.activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.widget.FrameLayout;
import com.mapbox.mapboxsdk.Mapbox;
import com.mapbox.mapboxsdk.maps.MapView;
import com.uam.wmi.findmytutor.R;
import com.uam.wmi.findmytutor.model.Coordinate;
import com.uam.wmi.findmytutor.network.ApiClient;
import com.uam.wmi.findmytutor.service.CoordinateService;
import java.util.List;
public class MainActivity extends AppCompatActivity {
private BottomNavigationView mMainNav;
private FrameLayout mMainFrame;
private MapFragment mapFragment;
private NotificationFragment notificationFragment;
private ProfileFragment profileFragment;
private MapView mapView;
public List<Coordinate> getCoordinates() {
return this.coordinates;
}
public void setCoordinates(List<Coordinate> coordinates) {
this.coordinates = coordinates;
}
public List<Coordinate> coordinates;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Mapbox.getInstance(this, getString(R.string.access_token));
setContentView(R.layout.activity_main);
SharedPreferences sharedPref = getSharedPreferences("fmtPrefs", Context.MODE_PRIVATE);
String text = sharedPref.getString("test",null);
Log.e("Mainactivity", text);
mMainFrame = (FrameLayout) findViewById(R.id.main_frame);
mMainNav = (BottomNavigationView) findViewById(R.id.main_nav);
mapFragment = new MapFragment();
notificationFragment = new NotificationFragment();
profileFragment = new ProfileFragment();
// Default frag here
setFragment(mapFragment);
mMainNav.setSelectedItemId(R.id.nav_map);
mMainNav.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.nav_map:
mMainNav.setItemBackgroundResource(R.color.colorPrimary);
setFragment(mapFragment);
return true;
case R.id.nav_notif:
mMainNav.setItemBackgroundResource(R.color.colorAccent);
setFragment(notificationFragment);
return true;
case R.id.nav_profile:
mMainNav.setItemBackgroundResource(R.color.colorPrimaryDark);
setFragment(profileFragment);
return true;
default:
return false;
}
}
});
// Logout button
final FloatingActionButton button = findViewById(R.id.logoutButton);
button.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
SharedPreferences preferences = getSharedPreferences("fmtPrefs",Context.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.clear().commit();
Intent i = getBaseContext().getPackageManager()
.getLaunchIntentForPackage( getBaseContext().getPackageName() );
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
finish();
}
});
// CoordinateService service = ApiClient.getClient(getApplicationContext())
// .create(CoordinateService.class);
}
private void setFragment(Fragment fragment) {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.main_frame, fragment);
fragmentTransaction.commit();
}
}

View File

@ -0,0 +1,98 @@
package com.uam.wmi.findmytutor.activity;
import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.mapbox.mapboxsdk.maps.MapView;
import com.uam.wmi.findmytutor.R;
import com.uam.wmi.findmytutor.network.ApiClient;
import com.uam.wmi.findmytutor.service.CoordinateService;
import static com.mapbox.mapboxsdk.Mapbox.getApplicationContext;
/**
* A simple {@link Fragment} subclass.
*/
public class MapFragment extends Fragment {
private MapView mapView;
public MapFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_map, container, false);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mapView = (MapView) view.findViewById(R.id.mapView);
mapView.onCreate(savedInstanceState);
CoordinateService service = ApiClient.getClient(getApplicationContext())
.create(CoordinateService.class);
}
@Override
public void onStart() {
super.onStart();
mapView.onStart();
}
@Override
public void onResume() {
super.onResume();
mapView.onResume();
}
@Override
public void onPause() {
super.onPause();
mapView.onPause();
}
@Override
public void onStop() {
super.onStop();
mapView.onStop();
}
@Override
public void onLowMemory() {
super.onLowMemory();
mapView.onLowMemory();
}
@Override
public void onDestroyView() {
super.onDestroyView();
mapView.onDestroy();
}
// @Override
// public void onDestroy() {
// super.onDestroy();
// mapView.onDestroy();
// }
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
mapView.onSaveInstanceState(outState);
}
}

View File

@ -0,0 +1,31 @@
package com.uam.wmi.findmytutor.activity;
import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.uam.wmi.findmytutor.R;
/**
* A simple {@link Fragment} subclass.
*/
public class NotificationFragment extends Fragment {
public NotificationFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_notification, container, false);
}
}

View File

@ -0,0 +1,31 @@
package com.uam.wmi.findmytutor.activity;
import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.uam.wmi.findmytutor.R;
/**
* A simple {@link Fragment} subclass.
*/
public class ProfileFragment extends Fragment {
public ProfileFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_profile, container, false);
}
}

View File

@ -5,17 +5,7 @@ import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import com.uam.wmi.findmytutor.model.JwtToken;
import com.uam.wmi.findmytutor.model.LdapUser;
import com.uam.wmi.findmytutor.network.RetrofitClientInstance;
import com.uam.wmi.findmytutor.service.LdapService;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class StartupActivity extends AppCompatActivity {
private static final int AUTHENTICATION_REQUEST_CODE = 666;

View File

@ -0,0 +1,9 @@
package com.uam.wmi.findmytutor.model;
public class BaseResponse {
String error;
public String getError() {
return error;
}
}

View File

@ -0,0 +1,260 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
import java.util.UUID;
import io.swagger.annotations.ApiModelProperty;
/**
* Coordinate
*/
public class Coordinate extends BaseResponse{
@SerializedName("coordinateId")
private UUID coordinateId = null;
@SerializedName("latitude")
private Float latitude = null;
@SerializedName("longitude")
private Float longitude = null;
@SerializedName("altitude")
private Float altitude = null;
@SerializedName("userId")
private String userId = null;
@SerializedName("approximatedLocation")
private String approximatedLocation = null;
@SerializedName("displayMode")
private String displayMode = "exact";
@SerializedName("timeStamp")
private Long timeStamp = null;
@SerializedName("label")
private String label = null;
public Coordinate coordinateId(UUID coordinateId) {
this.coordinateId = coordinateId;
return this;
}
/**
* Get coordinateId
* @return coordinateId
**/
@ApiModelProperty(required = true, value = "")
public UUID getCoordinateId() {
return coordinateId;
}
public void setCoordinateId(UUID coordinateId) {
this.coordinateId = coordinateId;
}
public Coordinate latitude(Float latitude) {
this.latitude = latitude;
return this;
}
/**
* Get latitude
* @return latitude
**/
@ApiModelProperty(required = true, value = "")
public Float getLatitude() {
return latitude;
}
public void setLatitude(Float latitude) {
this.latitude = latitude;
}
public Coordinate longitude(Float longitude) {
this.longitude = longitude;
return this;
}
/**
* Get longitude
* @return longitude
**/
@ApiModelProperty(required = true, value = "")
public Float getLongitude() {
return longitude;
}
public void setLongitude(Float longitude) {
this.longitude = longitude;
}
public Coordinate altitude(Float altitude) {
this.altitude = altitude;
return this;
}
/**
* Get altitude
* @return altitude
**/
@ApiModelProperty(required = true, value = "")
public Float getAltitude() {
return altitude;
}
public void setAltitude(Float altitude) {
this.altitude = altitude;
}
public Coordinate userId(String userId) {
this.userId = userId;
return this;
}
/**
* Get userId
* @return userId
**/
@ApiModelProperty(required = true, value = "")
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Coordinate approximatedLocation(String approximatedLocation) {
this.approximatedLocation = approximatedLocation;
return this;
}
/**
* Get approximatedLocation
* @return approximatedLocation
**/
@ApiModelProperty(value = "")
public String getApproximatedLocation() {
return approximatedLocation;
}
public void setApproximatedLocation(String approximatedLocation) {
this.approximatedLocation = approximatedLocation;
}
public Coordinate displayMode(String displayMode) {
this.displayMode = displayMode;
return this;
}
/**
* Get displayMode
* @return displayMode
**/
@ApiModelProperty(required = true, value = "")
public String getDisplayMode() {
return displayMode;
}
public void setDisplayMode(String displayMode) {
this.displayMode = displayMode;
}
public Coordinate timeStamp(Long timeStamp) {
this.timeStamp = timeStamp;
return this;
}
/**
* Get timeStamp
* @return timeStamp
**/
@ApiModelProperty(value = "")
public Long getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(Long timeStamp) {
this.timeStamp = timeStamp;
}
public Coordinate label(String label) {
this.label = label;
return this;
}
/**
* Get label
* @return label
**/
@ApiModelProperty(value = "")
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Coordinate coordinate = (Coordinate) o;
return Objects.equals(this.coordinateId, coordinate.coordinateId) &&
Objects.equals(this.latitude, coordinate.latitude) &&
Objects.equals(this.longitude, coordinate.longitude) &&
Objects.equals(this.altitude, coordinate.altitude) &&
Objects.equals(this.userId, coordinate.userId) &&
Objects.equals(this.approximatedLocation, coordinate.approximatedLocation) &&
Objects.equals(this.displayMode, coordinate.displayMode) &&
Objects.equals(this.timeStamp, coordinate.timeStamp) &&
Objects.equals(this.label, coordinate.label);
}
@Override
public int hashCode() {
return Objects.hash(coordinateId, latitude, longitude, altitude, userId, approximatedLocation, displayMode, timeStamp, label);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Coordinate {\n");
sb.append(" coordinateId: ").append(toIndentedString(coordinateId)).append("\n");
sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n");
sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n");
sb.append(" altitude: ").append(toIndentedString(altitude)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
sb.append(" approximatedLocation: ").append(toIndentedString(approximatedLocation)).append("\n");
sb.append(" displayMode: ").append(toIndentedString(displayMode)).append("\n");
sb.append(" timeStamp: ").append(toIndentedString(timeStamp)).append("\n");
sb.append(" label: ").append(toIndentedString(label)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,192 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
import java.util.UUID;
import io.swagger.annotations.ApiModelProperty;
/**
* DutyHour
*/
public class DutyHour extends BaseResponse {
@SerializedName("dutyHourId")
private UUID dutyHourId = null;
@SerializedName("tutorTabId")
private UUID tutorTabId = null;
@SerializedName("day")
private String day = null;
@SerializedName("start")
private String start = null;
@SerializedName("end")
private String end = null;
@SerializedName("tutorTab")
private TutorTab tutorTab = null;
public DutyHour dutyHourId(UUID dutyHourId) {
this.dutyHourId = dutyHourId;
return this;
}
/**
* Get dutyHourId
* @return dutyHourId
**/
@ApiModelProperty(value = "")
public UUID getDutyHourId() {
return dutyHourId;
}
public void setDutyHourId(UUID dutyHourId) {
this.dutyHourId = dutyHourId;
}
public DutyHour tutorTabId(UUID tutorTabId) {
this.tutorTabId = tutorTabId;
return this;
}
/**
* Get tutorTabId
* @return tutorTabId
**/
@ApiModelProperty(required = true, value = "")
public UUID getTutorTabId() {
return tutorTabId;
}
public void setTutorTabId(UUID tutorTabId) {
this.tutorTabId = tutorTabId;
}
public DutyHour day(String day) {
this.day = day;
return this;
}
/**
* Get day
* @return day
**/
@ApiModelProperty(value = "")
public String getDay() {
return day;
}
public void setDay(String day) {
this.day = day;
}
public DutyHour start(String start) {
this.start = start;
return this;
}
/**
* Get start
* @return start
**/
@ApiModelProperty(value = "")
public String getStart() {
return start;
}
public void setStart(String start) {
this.start = start;
}
public DutyHour end(String end) {
this.end = end;
return this;
}
/**
* Get end
* @return end
**/
@ApiModelProperty(value = "")
public String getEnd() {
return end;
}
public void setEnd(String end) {
this.end = end;
}
public DutyHour tutorTab(TutorTab tutorTab) {
this.tutorTab = tutorTab;
return this;
}
/**
* Get tutorTab
* @return tutorTab
**/
@ApiModelProperty(value = "")
public TutorTab getTutorTab() {
return tutorTab;
}
public void setTutorTab(TutorTab tutorTab) {
this.tutorTab = tutorTab;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DutyHour dutyHour = (DutyHour) o;
return Objects.equals(this.dutyHourId, dutyHour.dutyHourId) &&
Objects.equals(this.tutorTabId, dutyHour.tutorTabId) &&
Objects.equals(this.day, dutyHour.day) &&
Objects.equals(this.start, dutyHour.start) &&
Objects.equals(this.end, dutyHour.end) &&
Objects.equals(this.tutorTab, dutyHour.tutorTab);
}
@Override
public int hashCode() {
return Objects.hash(dutyHourId, tutorTabId, day, start, end, tutorTab);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DutyHour {\n");
sb.append(" dutyHourId: ").append(toIndentedString(dutyHourId)).append("\n");
sb.append(" tutorTabId: ").append(toIndentedString(tutorTabId)).append("\n");
sb.append(" day: ").append(toIndentedString(day)).append("\n");
sb.append(" start: ").append(toIndentedString(start)).append("\n");
sb.append(" end: ").append(toIndentedString(end)).append("\n");
sb.append(" tutorTab: ").append(toIndentedString(tutorTab)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,20 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class IsUsingListBool extends BaseResponse{
@SerializedName("isUsing")
@Expose
private Boolean isUsing;
public Boolean getIsUsing() {
return isUsing;
}
public void setIsUsing(Boolean isUsing) {
this.isUsing = isUsing;
}
}

View File

@ -0,0 +1,76 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
import io.swagger.annotations.ApiModelProperty;
/**
* IsUsingListBoolModel
*/
public class IsUsingListBoolModel extends BaseResponse {
@SerializedName("isUsing")
private Boolean isUsing = null;
public IsUsingListBoolModel isUsing(Boolean isUsing) {
this.isUsing = isUsing;
return this;
}
/**
* Get isUsing
* @return isUsing
**/
@ApiModelProperty(value = "")
public Boolean isIsUsing() {
return isUsing;
}
public void setIsUsing(Boolean isUsing) {
this.isUsing = isUsing;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IsUsingListBoolModel isUsingListBoolModel = (IsUsingListBoolModel) o;
return Objects.equals(this.isUsing, isUsingListBoolModel.isUsing);
}
@Override
public int hashCode() {
return Objects.hash(isUsing);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IsUsingListBoolModel {\n");
sb.append(" isUsing: ").append(toIndentedString(isUsing)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,31 +1,37 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class LdapUser {
import java.util.Objects;
import io.swagger.annotations.ApiModelProperty;
/**
* LdapUser
*/
public class LdapUser extends BaseResponse{
@SerializedName("login")
@Expose
private String login;
private String login = null;
@SerializedName("password")
@Expose
private String password;
private String password = null;
@SerializedName("department")
@Expose
private String department;
private String department = null;
@SerializedName("title")
@Expose
private String title;
private String title = null;
@SerializedName("firstName")
@Expose
private String firstName;
private String firstName = null;
@SerializedName("lastName")
@Expose
private String lastName;
private String lastName = null;
@SerializedName("email")
@Expose
private String email;
private String email = null;
public LdapUser(String login, String password, String department, String title, String firstName, String lastName, String email) {
this.login = login;
@ -37,6 +43,16 @@ public class LdapUser {
this.email = email;
}
public LdapUser login(String login) {
this.login = login;
return this;
}
/**
* Get login
* @return login
**/
@ApiModelProperty(required = true, value = "")
public String getLogin() {
return login;
}
@ -45,6 +61,16 @@ public class LdapUser {
this.login = login;
}
public LdapUser password(String password) {
this.password = password;
return this;
}
/**
* Get password
* @return password
**/
@ApiModelProperty(required = true, value = "")
public String getPassword() {
return password;
}
@ -53,6 +79,16 @@ public class LdapUser {
this.password = password;
}
public LdapUser department(String department) {
this.department = department;
return this;
}
/**
* Get department
* @return department
**/
@ApiModelProperty(value = "")
public String getDepartment() {
return department;
}
@ -61,6 +97,16 @@ public class LdapUser {
this.department = department;
}
public LdapUser title(String title) {
this.title = title;
return this;
}
/**
* Get title
* @return title
**/
@ApiModelProperty(value = "")
public String getTitle() {
return title;
}
@ -69,6 +115,16 @@ public class LdapUser {
this.title = title;
}
public LdapUser firstName(String firstName) {
this.firstName = firstName;
return this;
}
/**
* Get firstName
* @return firstName
**/
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
}
@ -77,6 +133,16 @@ public class LdapUser {
this.firstName = firstName;
}
public LdapUser lastName(String lastName) {
this.lastName = lastName;
return this;
}
/**
* Get lastName
* @return lastName
**/
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
}
@ -85,6 +151,16 @@ public class LdapUser {
this.lastName = lastName;
}
public LdapUser email(String email) {
this.email = email;
return this;
}
/**
* Get email
* @return email
**/
@ApiModelProperty(value = "")
public String getEmail() {
return email;
}
@ -93,4 +169,57 @@ public class LdapUser {
this.email = email;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LdapUser ldapUser = (LdapUser) o;
return Objects.equals(this.login, ldapUser.login) &&
Objects.equals(this.password, ldapUser.password) &&
Objects.equals(this.department, ldapUser.department) &&
Objects.equals(this.title, ldapUser.title) &&
Objects.equals(this.firstName, ldapUser.firstName) &&
Objects.equals(this.lastName, ldapUser.lastName) &&
Objects.equals(this.email, ldapUser.email);
}
@Override
public int hashCode() {
return Objects.hash(login, password, department, title, firstName, lastName, email);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LdapUser {\n");
sb.append(" login: ").append(toIndentedString(login)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" department: ").append(toIndentedString(department)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,16 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.SerializedName;
public class Model
{
@SerializedName("data")
private PagedResult data;
public PagedResult getData ()
{
return data;
}
}

View File

@ -0,0 +1,88 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class PagedResult {
@SerializedName("results")
@Expose
private List<User> results = null;
@SerializedName("currentPage")
@Expose
private Integer currentPage;
@SerializedName("pageCount")
@Expose
private Integer pageCount;
@SerializedName("pageSize")
@Expose
private Integer pageSize;
@SerializedName("rowCount")
@Expose
private Integer rowCount;
@SerializedName("firstRowOnPage")
@Expose
private Integer firstRowOnPage;
@SerializedName("lastRowOnPage")
@Expose
private Integer lastRowOnPage;
public List<User> getResults() {
return results;
}
public void setResults(List<User> results) {
this.results = results;
}
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getPageCount() {
return pageCount;
}
public void setPageCount(Integer pageCount) {
this.pageCount = pageCount;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Integer getRowCount() {
return rowCount;
}
public void setRowCount(Integer rowCount) {
this.rowCount = rowCount;
}
public Integer getFirstRowOnPage() {
return firstRowOnPage;
}
public void setFirstRowOnPage(Integer firstRowOnPage) {
this.firstRowOnPage = firstRowOnPage;
}
public Integer getLastRowOnPage() {
return lastRowOnPage;
}
public void setLastRowOnPage(Integer lastRowOnPage) {
this.lastRowOnPage = lastRowOnPage;
}
}

View File

@ -0,0 +1,206 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import io.swagger.annotations.ApiModelProperty;
/**
* PagedResultUserResponseModel
*/
public class PagedResultUserResponseModel extends BaseResponse {
@SerializedName("results")
private List<UserResponseModel> results = null;
@SerializedName("currentPage")
private Integer currentPage = null;
@SerializedName("pageCount")
private Integer pageCount = null;
@SerializedName("pageSize")
private Integer pageSize = null;
@SerializedName("rowCount")
private Integer rowCount = null;
@SerializedName("firstRowOnPage")
private Integer firstRowOnPage = null;
@SerializedName("lastRowOnPage")
private Integer lastRowOnPage = null;
public PagedResultUserResponseModel results(List<UserResponseModel> results) {
this.results = results;
return this;
}
public PagedResultUserResponseModel addResultsItem(UserResponseModel resultsItem) {
if (this.results == null) {
this.results = new ArrayList<UserResponseModel>();
}
this.results.add(resultsItem);
return this;
}
/**
* Get results
* @return results
**/
@ApiModelProperty(value = "")
public List<UserResponseModel> getResults() {
return results;
}
public void setResults(List<UserResponseModel> results) {
this.results = results;
}
public PagedResultUserResponseModel currentPage(Integer currentPage) {
this.currentPage = currentPage;
return this;
}
/**
* Get currentPage
* @return currentPage
**/
@ApiModelProperty(value = "")
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public PagedResultUserResponseModel pageCount(Integer pageCount) {
this.pageCount = pageCount;
return this;
}
/**
* Get pageCount
* @return pageCount
**/
@ApiModelProperty(value = "")
public Integer getPageCount() {
return pageCount;
}
public void setPageCount(Integer pageCount) {
this.pageCount = pageCount;
}
public PagedResultUserResponseModel pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Get pageSize
* @return pageSize
**/
@ApiModelProperty(value = "")
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public PagedResultUserResponseModel rowCount(Integer rowCount) {
this.rowCount = rowCount;
return this;
}
/**
* Get rowCount
* @return rowCount
**/
@ApiModelProperty(value = "")
public Integer getRowCount() {
return rowCount;
}
public void setRowCount(Integer rowCount) {
this.rowCount = rowCount;
}
/**
* Get firstRowOnPage
* @return firstRowOnPage
**/
@ApiModelProperty(value = "")
public Integer getFirstRowOnPage() {
return firstRowOnPage;
}
/**
* Get lastRowOnPage
* @return lastRowOnPage
**/
@ApiModelProperty(value = "")
public Integer getLastRowOnPage() {
return lastRowOnPage;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PagedResultUserResponseModel pagedResultUserResponseModel = (PagedResultUserResponseModel) o;
return Objects.equals(this.results, pagedResultUserResponseModel.results) &&
Objects.equals(this.currentPage, pagedResultUserResponseModel.currentPage) &&
Objects.equals(this.pageCount, pagedResultUserResponseModel.pageCount) &&
Objects.equals(this.pageSize, pagedResultUserResponseModel.pageSize) &&
Objects.equals(this.rowCount, pagedResultUserResponseModel.rowCount) &&
Objects.equals(this.firstRowOnPage, pagedResultUserResponseModel.firstRowOnPage) &&
Objects.equals(this.lastRowOnPage, pagedResultUserResponseModel.lastRowOnPage);
}
@Override
public int hashCode() {
return Objects.hash(results, currentPage, pageCount, pageSize, rowCount, firstRowOnPage, lastRowOnPage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PagedResultUserResponseModel {\n");
sb.append(" results: ").append(toIndentedString(results)).append("\n");
sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n");
sb.append(" pageCount: ").append(toIndentedString(pageCount)).append("\n");
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
sb.append(" rowCount: ").append(toIndentedString(rowCount)).append("\n");
sb.append(" firstRowOnPage: ").append(toIndentedString(firstRowOnPage)).append("\n");
sb.append(" lastRowOnPage: ").append(toIndentedString(lastRowOnPage)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,164 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class Result extends BaseResponse {
@SerializedName("id")
@Expose
private String id;
@SerializedName("isOnline")
@Expose
private Boolean isOnline;
@SerializedName("isUsingBlacklist")
@Expose
private Boolean isUsingBlacklist;
@SerializedName("isUsingWhitelist")
@Expose
private Boolean isUsingWhitelist;
@SerializedName("blacklist")
@Expose
private List<String> blacklist = null;
@SerializedName("whitelist")
@Expose
private List<String> whitelist = null;
@SerializedName("ldapLogin")
@Expose
private String ldapLogin;
@SerializedName("title")
@Expose
private String title;
@SerializedName("firstName")
@Expose
private String firstName;
@SerializedName("lastName")
@Expose
private String lastName;
@SerializedName("department")
@Expose
private String department;
@SerializedName("userName")
@Expose
private String userName;
@SerializedName("email")
@Expose
private String email;
@SerializedName("isActive")
@Expose
private Boolean isActive;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Boolean getIsOnline() {
return isOnline;
}
public void setIsOnline(Boolean isOnline) {
this.isOnline = isOnline;
}
public Boolean getIsUsingBlacklist() {
return isUsingBlacklist;
}
public void setIsUsingBlacklist(Boolean isUsingBlacklist) {
this.isUsingBlacklist = isUsingBlacklist;
}
public Boolean getIsUsingWhitelist() {
return isUsingWhitelist;
}
public void setIsUsingWhitelist(Boolean isUsingWhitelist) {
this.isUsingWhitelist = isUsingWhitelist;
}
public List<String> getBlacklist() {
return blacklist;
}
public void setBlacklist(List<String> blacklist) {
this.blacklist = blacklist;
}
public List<String> getWhitelist() {
return whitelist;
}
public void setWhitelist(List<String> whitelist) {
this.whitelist = whitelist;
}
public String getLdapLogin() {
return ldapLogin;
}
public void setLdapLogin(String ldapLogin) {
this.ldapLogin = ldapLogin;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Boolean getIsActive() {
return isActive;
}
public void setIsActive(Boolean isActive) {
this.isActive = isActive;
}
}

View File

@ -0,0 +1,100 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
import io.swagger.annotations.ApiModelProperty;
/**
* StudentIdModel
*/
public class StudentIdModel extends BaseResponse{
@SerializedName("studentId")
private String studentId = null;
@SerializedName("ldapLogin")
private String ldapLogin = null;
public StudentIdModel studentId(String studentId) {
this.studentId = studentId;
return this;
}
/**
* Get studentId
* @return studentId
**/
@ApiModelProperty(value = "")
public String getStudentId() {
return studentId;
}
public void setStudentId(String studentId) {
this.studentId = studentId;
}
public StudentIdModel ldapLogin(String ldapLogin) {
this.ldapLogin = ldapLogin;
return this;
}
/**
* Get ldapLogin
* @return ldapLogin
**/
@ApiModelProperty(value = "")
public String getLdapLogin() {
return ldapLogin;
}
public void setLdapLogin(String ldapLogin) {
this.ldapLogin = ldapLogin;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
StudentIdModel studentIdModel = (StudentIdModel) o;
return Objects.equals(this.studentId, studentIdModel.studentId) &&
Objects.equals(this.ldapLogin, studentIdModel.ldapLogin);
}
@Override
public int hashCode() {
return Objects.hash(studentId, ldapLogin);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class StudentIdModel {\n");
sb.append(" studentId: ").append(toIndentedString(studentId)).append("\n");
sb.append(" ldapLogin: ").append(toIndentedString(ldapLogin)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,204 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import io.swagger.annotations.ApiModelProperty;
/**
* TutorTab
*/
public class TutorTab extends BaseResponse{
@SerializedName("tutorTabId")
private UUID tutorTabId = null;
@SerializedName("userId")
private String userId = null;
@SerializedName("room")
private String room = null;
@SerializedName("emailTutorTab")
private String emailTutorTab = null;
@SerializedName("dutyHours")
private List<DutyHour> dutyHours = null;
@SerializedName("user")
private User user = null;
public TutorTab tutorTabId(UUID tutorTabId) {
this.tutorTabId = tutorTabId;
return this;
}
/**
* Get tutorTabId
* @return tutorTabId
**/
@ApiModelProperty(value = "")
public UUID getTutorTabId() {
return tutorTabId;
}
public void setTutorTabId(UUID tutorTabId) {
this.tutorTabId = tutorTabId;
}
public TutorTab userId(String userId) {
this.userId = userId;
return this;
}
/**
* Get userId
* @return userId
**/
@ApiModelProperty(required = true, value = "")
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public TutorTab room(String room) {
this.room = room;
return this;
}
/**
* Get room
* @return room
**/
@ApiModelProperty(value = "")
public String getRoom() {
return room;
}
public void setRoom(String room) {
this.room = room;
}
public TutorTab emailTutorTab(String emailTutorTab) {
this.emailTutorTab = emailTutorTab;
return this;
}
/**
* Get emailTutorTab
* @return emailTutorTab
**/
@ApiModelProperty(value = "")
public String getEmailTutorTab() {
return emailTutorTab;
}
public void setEmailTutorTab(String emailTutorTab) {
this.emailTutorTab = emailTutorTab;
}
public TutorTab dutyHours(List<DutyHour> dutyHours) {
this.dutyHours = dutyHours;
return this;
}
public TutorTab addDutyHoursItem(DutyHour dutyHoursItem) {
if (this.dutyHours == null) {
this.dutyHours = new ArrayList<DutyHour>();
}
this.dutyHours.add(dutyHoursItem);
return this;
}
/**
* Get dutyHours
* @return dutyHours
**/
@ApiModelProperty(value = "")
public List<DutyHour> getDutyHours() {
return dutyHours;
}
public void setDutyHours(List<DutyHour> dutyHours) {
this.dutyHours = dutyHours;
}
public TutorTab user(User user) {
this.user = user;
return this;
}
/**
* Get user
* @return user
**/
@ApiModelProperty(value = "")
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TutorTab tutorTab = (TutorTab) o;
return Objects.equals(this.tutorTabId, tutorTab.tutorTabId) &&
Objects.equals(this.userId, tutorTab.userId) &&
Objects.equals(this.room, tutorTab.room) &&
Objects.equals(this.emailTutorTab, tutorTab.emailTutorTab) &&
Objects.equals(this.dutyHours, tutorTab.dutyHours) &&
Objects.equals(this.user, tutorTab.user);
}
@Override
public int hashCode() {
return Objects.hash(tutorTabId, userId, room, emailTutorTab, dutyHours, user);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TutorTab {\n");
sb.append(" tutorTabId: ").append(toIndentedString(tutorTabId)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
sb.append(" room: ").append(toIndentedString(room)).append("\n");
sb.append(" emailTutorTab: ").append(toIndentedString(emailTutorTab)).append("\n");
sb.append(" dutyHours: ").append(toIndentedString(dutyHours)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,726 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.SerializedName;
import org.threeten.bp.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import io.swagger.annotations.ApiModelProperty;
/**
* User
*/
public class User extends BaseResponse{
@SerializedName("isOnline")
private Boolean isOnline = null;
@SerializedName("isUsingBlacklist")
private Boolean isUsingBlacklist = null;
@SerializedName("isUsingWhitelist")
private Boolean isUsingWhitelist = null;
@SerializedName("blacklist")
private List<String> blacklist = null;
@SerializedName("whitelist")
private List<String> whitelist = null;
@SerializedName("department")
private String department = null;
@SerializedName("ldapLogin")
private String ldapLogin = null;
@SerializedName("title")
private String title = null;
@SerializedName("firstName")
private String firstName = null;
@SerializedName("lastName")
private String lastName = null;
@SerializedName("isActive")
private Boolean isActive = null;
@SerializedName("tutorTab")
private TutorTab tutorTab = null;
@SerializedName("coordinates")
private List<Coordinate> coordinates = null;
@SerializedName("id")
private String id = null;
@SerializedName("userName")
private String userName = null;
@SerializedName("normalizedUserName")
private String normalizedUserName = null;
@SerializedName("email")
private String email = null;
@SerializedName("normalizedEmail")
private String normalizedEmail = null;
@SerializedName("emailConfirmed")
private Boolean emailConfirmed = null;
@SerializedName("passwordHash")
private String passwordHash = null;
@SerializedName("securityStamp")
private String securityStamp = null;
@SerializedName("concurrencyStamp")
private String concurrencyStamp = null;
@SerializedName("phoneNumber")
private String phoneNumber = null;
@SerializedName("phoneNumberConfirmed")
private Boolean phoneNumberConfirmed = null;
@SerializedName("twoFactorEnabled")
private Boolean twoFactorEnabled = null;
@SerializedName("lockoutEnd")
private OffsetDateTime lockoutEnd = null;
@SerializedName("lockoutEnabled")
private Boolean lockoutEnabled = null;
@SerializedName("accessFailedCount")
private Integer accessFailedCount = null;
public User isOnline(Boolean isOnline) {
this.isOnline = isOnline;
return this;
}
/**
* Get isOnline
* @return isOnline
**/
@ApiModelProperty(value = "")
public Boolean isIsOnline() {
return isOnline;
}
public void setIsOnline(Boolean isOnline) {
this.isOnline = isOnline;
}
public User isUsingBlacklist(Boolean isUsingBlacklist) {
this.isUsingBlacklist = isUsingBlacklist;
return this;
}
/**
* Get isUsingBlacklist
* @return isUsingBlacklist
**/
@ApiModelProperty(value = "")
public Boolean isIsUsingBlacklist() {
return isUsingBlacklist;
}
public void setIsUsingBlacklist(Boolean isUsingBlacklist) {
this.isUsingBlacklist = isUsingBlacklist;
}
public User isUsingWhitelist(Boolean isUsingWhitelist) {
this.isUsingWhitelist = isUsingWhitelist;
return this;
}
/**
* Get isUsingWhitelist
* @return isUsingWhitelist
**/
@ApiModelProperty(value = "")
public Boolean isIsUsingWhitelist() {
return isUsingWhitelist;
}
public void setIsUsingWhitelist(Boolean isUsingWhitelist) {
this.isUsingWhitelist = isUsingWhitelist;
}
public User blacklist(List<String> blacklist) {
this.blacklist = blacklist;
return this;
}
public User addBlacklistItem(String blacklistItem) {
if (this.blacklist == null) {
this.blacklist = new ArrayList<String>();
}
this.blacklist.add(blacklistItem);
return this;
}
/**
* Get blacklist
* @return blacklist
**/
@ApiModelProperty(value = "")
public List<String> getBlacklist() {
return blacklist;
}
public void setBlacklist(List<String> blacklist) {
this.blacklist = blacklist;
}
public User whitelist(List<String> whitelist) {
this.whitelist = whitelist;
return this;
}
public User addWhitelistItem(String whitelistItem) {
if (this.whitelist == null) {
this.whitelist = new ArrayList<String>();
}
this.whitelist.add(whitelistItem);
return this;
}
/**
* Get whitelist
* @return whitelist
**/
@ApiModelProperty(value = "")
public List<String> getWhitelist() {
return whitelist;
}
public void setWhitelist(List<String> whitelist) {
this.whitelist = whitelist;
}
public User department(String department) {
this.department = department;
return this;
}
/**
* Get department
* @return department
**/
@ApiModelProperty(required = true, value = "")
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public User ldapLogin(String ldapLogin) {
this.ldapLogin = ldapLogin;
return this;
}
/**
* Get ldapLogin
* @return ldapLogin
**/
@ApiModelProperty(required = true, value = "")
public String getLdapLogin() {
return ldapLogin;
}
public void setLdapLogin(String ldapLogin) {
this.ldapLogin = ldapLogin;
}
public User title(String title) {
this.title = title;
return this;
}
/**
* Get title
* @return title
**/
@ApiModelProperty(required = true, value = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
/**
* Get firstName
* @return firstName
**/
@ApiModelProperty(required = true, value = "")
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
/**
* Get lastName
* @return lastName
**/
@ApiModelProperty(required = true, value = "")
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public User isActive(Boolean isActive) {
this.isActive = isActive;
return this;
}
/**
* Get isActive
* @return isActive
**/
@ApiModelProperty(required = true, value = "")
public Boolean isIsActive() {
return isActive;
}
public void setIsActive(Boolean isActive) {
this.isActive = isActive;
}
public User tutorTab(TutorTab tutorTab) {
this.tutorTab = tutorTab;
return this;
}
/**
* Get tutorTab
* @return tutorTab
**/
@ApiModelProperty(value = "")
public TutorTab getTutorTab() {
return tutorTab;
}
public void setTutorTab(TutorTab tutorTab) {
this.tutorTab = tutorTab;
}
public User coordinates(List<Coordinate> coordinates) {
this.coordinates = coordinates;
return this;
}
public User addCoordinatesItem(Coordinate coordinatesItem) {
if (this.coordinates == null) {
this.coordinates = new ArrayList<Coordinate>();
}
this.coordinates.add(coordinatesItem);
return this;
}
/**
* Get coordinates
* @return coordinates
**/
@ApiModelProperty(value = "")
public List<Coordinate> getCoordinates() {
return coordinates;
}
public void setCoordinates(List<Coordinate> coordinates) {
this.coordinates = coordinates;
}
public User id(String id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@ApiModelProperty(value = "")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public User userName(String userName) {
this.userName = userName;
return this;
}
/**
* Get userName
* @return userName
**/
@ApiModelProperty(value = "")
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public User normalizedUserName(String normalizedUserName) {
this.normalizedUserName = normalizedUserName;
return this;
}
/**
* Get normalizedUserName
* @return normalizedUserName
**/
@ApiModelProperty(value = "")
public String getNormalizedUserName() {
return normalizedUserName;
}
public void setNormalizedUserName(String normalizedUserName) {
this.normalizedUserName = normalizedUserName;
}
public User email(String email) {
this.email = email;
return this;
}
/**
* Get email
* @return email
**/
@ApiModelProperty(value = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public User normalizedEmail(String normalizedEmail) {
this.normalizedEmail = normalizedEmail;
return this;
}
/**
* Get normalizedEmail
* @return normalizedEmail
**/
@ApiModelProperty(value = "")
public String getNormalizedEmail() {
return normalizedEmail;
}
public void setNormalizedEmail(String normalizedEmail) {
this.normalizedEmail = normalizedEmail;
}
public User emailConfirmed(Boolean emailConfirmed) {
this.emailConfirmed = emailConfirmed;
return this;
}
/**
* Get emailConfirmed
* @return emailConfirmed
**/
@ApiModelProperty(value = "")
public Boolean isEmailConfirmed() {
return emailConfirmed;
}
public void setEmailConfirmed(Boolean emailConfirmed) {
this.emailConfirmed = emailConfirmed;
}
public User passwordHash(String passwordHash) {
this.passwordHash = passwordHash;
return this;
}
/**
* Get passwordHash
* @return passwordHash
**/
@ApiModelProperty(value = "")
public String getPasswordHash() {
return passwordHash;
}
public void setPasswordHash(String passwordHash) {
this.passwordHash = passwordHash;
}
public User securityStamp(String securityStamp) {
this.securityStamp = securityStamp;
return this;
}
/**
* Get securityStamp
* @return securityStamp
**/
@ApiModelProperty(value = "")
public String getSecurityStamp() {
return securityStamp;
}
public void setSecurityStamp(String securityStamp) {
this.securityStamp = securityStamp;
}
public User concurrencyStamp(String concurrencyStamp) {
this.concurrencyStamp = concurrencyStamp;
return this;
}
/**
* Get concurrencyStamp
* @return concurrencyStamp
**/
@ApiModelProperty(value = "")
public String getConcurrencyStamp() {
return concurrencyStamp;
}
public void setConcurrencyStamp(String concurrencyStamp) {
this.concurrencyStamp = concurrencyStamp;
}
public User phoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
return this;
}
/**
* Get phoneNumber
* @return phoneNumber
**/
@ApiModelProperty(value = "")
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public User phoneNumberConfirmed(Boolean phoneNumberConfirmed) {
this.phoneNumberConfirmed = phoneNumberConfirmed;
return this;
}
/**
* Get phoneNumberConfirmed
* @return phoneNumberConfirmed
**/
@ApiModelProperty(value = "")
public Boolean isPhoneNumberConfirmed() {
return phoneNumberConfirmed;
}
public void setPhoneNumberConfirmed(Boolean phoneNumberConfirmed) {
this.phoneNumberConfirmed = phoneNumberConfirmed;
}
public User twoFactorEnabled(Boolean twoFactorEnabled) {
this.twoFactorEnabled = twoFactorEnabled;
return this;
}
/**
* Get twoFactorEnabled
* @return twoFactorEnabled
**/
@ApiModelProperty(value = "")
public Boolean isTwoFactorEnabled() {
return twoFactorEnabled;
}
public void setTwoFactorEnabled(Boolean twoFactorEnabled) {
this.twoFactorEnabled = twoFactorEnabled;
}
public User lockoutEnd(OffsetDateTime lockoutEnd) {
this.lockoutEnd = lockoutEnd;
return this;
}
/**
* Get lockoutEnd
* @return lockoutEnd
**/
@ApiModelProperty(value = "")
public OffsetDateTime getLockoutEnd() {
return lockoutEnd;
}
public void setLockoutEnd(OffsetDateTime lockoutEnd) {
this.lockoutEnd = lockoutEnd;
}
public User lockoutEnabled(Boolean lockoutEnabled) {
this.lockoutEnabled = lockoutEnabled;
return this;
}
/**
* Get lockoutEnabled
* @return lockoutEnabled
**/
@ApiModelProperty(value = "")
public Boolean isLockoutEnabled() {
return lockoutEnabled;
}
public void setLockoutEnabled(Boolean lockoutEnabled) {
this.lockoutEnabled = lockoutEnabled;
}
public User accessFailedCount(Integer accessFailedCount) {
this.accessFailedCount = accessFailedCount;
return this;
}
/**
* Get accessFailedCount
* @return accessFailedCount
**/
@ApiModelProperty(value = "")
public Integer getAccessFailedCount() {
return accessFailedCount;
}
public void setAccessFailedCount(Integer accessFailedCount) {
this.accessFailedCount = accessFailedCount;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
User user = (User) o;
return Objects.equals(this.isOnline, user.isOnline) &&
Objects.equals(this.isUsingBlacklist, user.isUsingBlacklist) &&
Objects.equals(this.isUsingWhitelist, user.isUsingWhitelist) &&
Objects.equals(this.blacklist, user.blacklist) &&
Objects.equals(this.whitelist, user.whitelist) &&
Objects.equals(this.department, user.department) &&
Objects.equals(this.ldapLogin, user.ldapLogin) &&
Objects.equals(this.title, user.title) &&
Objects.equals(this.firstName, user.firstName) &&
Objects.equals(this.lastName, user.lastName) &&
Objects.equals(this.isActive, user.isActive) &&
Objects.equals(this.tutorTab, user.tutorTab) &&
Objects.equals(this.coordinates, user.coordinates) &&
Objects.equals(this.id, user.id) &&
Objects.equals(this.userName, user.userName) &&
Objects.equals(this.normalizedUserName, user.normalizedUserName) &&
Objects.equals(this.email, user.email) &&
Objects.equals(this.normalizedEmail, user.normalizedEmail) &&
Objects.equals(this.emailConfirmed, user.emailConfirmed) &&
Objects.equals(this.passwordHash, user.passwordHash) &&
Objects.equals(this.securityStamp, user.securityStamp) &&
Objects.equals(this.concurrencyStamp, user.concurrencyStamp) &&
Objects.equals(this.phoneNumber, user.phoneNumber) &&
Objects.equals(this.phoneNumberConfirmed, user.phoneNumberConfirmed) &&
Objects.equals(this.twoFactorEnabled, user.twoFactorEnabled) &&
Objects.equals(this.lockoutEnd, user.lockoutEnd) &&
Objects.equals(this.lockoutEnabled, user.lockoutEnabled) &&
Objects.equals(this.accessFailedCount, user.accessFailedCount);
}
@Override
public int hashCode() {
return Objects.hash(isOnline, isUsingBlacklist, isUsingWhitelist, blacklist, whitelist, department, ldapLogin, title, firstName, lastName, isActive, tutorTab, coordinates, id, userName, normalizedUserName, email, normalizedEmail, emailConfirmed, passwordHash, securityStamp, concurrencyStamp, phoneNumber, phoneNumberConfirmed, twoFactorEnabled, lockoutEnd, lockoutEnabled, accessFailedCount);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class User {\n");
sb.append(" isOnline: ").append(toIndentedString(isOnline)).append("\n");
sb.append(" isUsingBlacklist: ").append(toIndentedString(isUsingBlacklist)).append("\n");
sb.append(" isUsingWhitelist: ").append(toIndentedString(isUsingWhitelist)).append("\n");
sb.append(" blacklist: ").append(toIndentedString(blacklist)).append("\n");
sb.append(" whitelist: ").append(toIndentedString(whitelist)).append("\n");
sb.append(" department: ").append(toIndentedString(department)).append("\n");
sb.append(" ldapLogin: ").append(toIndentedString(ldapLogin)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n");
sb.append(" tutorTab: ").append(toIndentedString(tutorTab)).append("\n");
sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" userName: ").append(toIndentedString(userName)).append("\n");
sb.append(" normalizedUserName: ").append(toIndentedString(normalizedUserName)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" normalizedEmail: ").append(toIndentedString(normalizedEmail)).append("\n");
sb.append(" emailConfirmed: ").append(toIndentedString(emailConfirmed)).append("\n");
sb.append(" passwordHash: ").append(toIndentedString(passwordHash)).append("\n");
sb.append(" securityStamp: ").append(toIndentedString(securityStamp)).append("\n");
sb.append(" concurrencyStamp: ").append(toIndentedString(concurrencyStamp)).append("\n");
sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
sb.append(" phoneNumberConfirmed: ").append(toIndentedString(phoneNumberConfirmed)).append("\n");
sb.append(" twoFactorEnabled: ").append(toIndentedString(twoFactorEnabled)).append("\n");
sb.append(" lockoutEnd: ").append(toIndentedString(lockoutEnd)).append("\n");
sb.append(" lockoutEnabled: ").append(toIndentedString(lockoutEnabled)).append("\n");
sb.append(" accessFailedCount: ").append(toIndentedString(accessFailedCount)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,393 @@
package com.uam.wmi.findmytutor.model;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
import java.util.List;
import java.util.ArrayList;
import io.swagger.annotations.ApiModelProperty;
/**
* UserResponseModel
*/
public class UserResponseModel extends BaseResponse{
@SerializedName("id")
private String id = null;
@SerializedName("isOnline")
private Boolean isOnline = null;
@SerializedName("isUsingBlacklist")
private Boolean isUsingBlacklist = null;
@SerializedName("isUsingWhitelist")
private Boolean isUsingWhitelist = null;
@SerializedName("blacklist")
private List<String> blacklist = null;
@SerializedName("whitelist")
private List<String> whitelist = null;
@SerializedName("ldapLogin")
private String ldapLogin = null;
@SerializedName("title")
private String title = null;
@SerializedName("firstName")
private String firstName = null;
@SerializedName("lastName")
private String lastName = null;
@SerializedName("department")
private String department = null;
@SerializedName("userName")
private String userName = null;
@SerializedName("email")
private String email = null;
@SerializedName("isActive")
private Boolean isActive = null;
public UserResponseModel id(String id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@ApiModelProperty(value = "")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public UserResponseModel isOnline(Boolean isOnline) {
this.isOnline = isOnline;
return this;
}
/**
* Get isOnline
* @return isOnline
**/
@ApiModelProperty(value = "")
public Boolean isIsOnline() {
return isOnline;
}
public void setIsOnline(Boolean isOnline) {
this.isOnline = isOnline;
}
public UserResponseModel isUsingBlacklist(Boolean isUsingBlacklist) {
this.isUsingBlacklist = isUsingBlacklist;
return this;
}
/**
* Get isUsingBlacklist
* @return isUsingBlacklist
**/
@ApiModelProperty(value = "")
public Boolean isIsUsingBlacklist() {
return isUsingBlacklist;
}
public void setIsUsingBlacklist(Boolean isUsingBlacklist) {
this.isUsingBlacklist = isUsingBlacklist;
}
public UserResponseModel isUsingWhitelist(Boolean isUsingWhitelist) {
this.isUsingWhitelist = isUsingWhitelist;
return this;
}
/**
* Get isUsingWhitelist
* @return isUsingWhitelist
**/
@ApiModelProperty(value = "")
public Boolean isIsUsingWhitelist() {
return isUsingWhitelist;
}
public void setIsUsingWhitelist(Boolean isUsingWhitelist) {
this.isUsingWhitelist = isUsingWhitelist;
}
public UserResponseModel blacklist(List<String> blacklist) {
this.blacklist = blacklist;
return this;
}
public UserResponseModel addBlacklistItem(String blacklistItem) {
if (this.blacklist == null) {
this.blacklist = new ArrayList<String>();
}
this.blacklist.add(blacklistItem);
return this;
}
/**
* Get blacklist
* @return blacklist
**/
@ApiModelProperty(value = "")
public List<String> getBlacklist() {
return blacklist;
}
public void setBlacklist(List<String> blacklist) {
this.blacklist = blacklist;
}
public UserResponseModel whitelist(List<String> whitelist) {
this.whitelist = whitelist;
return this;
}
public UserResponseModel addWhitelistItem(String whitelistItem) {
if (this.whitelist == null) {
this.whitelist = new ArrayList<String>();
}
this.whitelist.add(whitelistItem);
return this;
}
/**
* Get whitelist
* @return whitelist
**/
@ApiModelProperty(value = "")
public List<String> getWhitelist() {
return whitelist;
}
public void setWhitelist(List<String> whitelist) {
this.whitelist = whitelist;
}
public UserResponseModel ldapLogin(String ldapLogin) {
this.ldapLogin = ldapLogin;
return this;
}
/**
* Get ldapLogin
* @return ldapLogin
**/
@ApiModelProperty(value = "")
public String getLdapLogin() {
return ldapLogin;
}
public void setLdapLogin(String ldapLogin) {
this.ldapLogin = ldapLogin;
}
public UserResponseModel title(String title) {
this.title = title;
return this;
}
/**
* Get title
* @return title
**/
@ApiModelProperty(value = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public UserResponseModel firstName(String firstName) {
this.firstName = firstName;
return this;
}
/**
* Get firstName
* @return firstName
**/
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public UserResponseModel lastName(String lastName) {
this.lastName = lastName;
return this;
}
/**
* Get lastName
* @return lastName
**/
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public UserResponseModel department(String department) {
this.department = department;
return this;
}
/**
* Get department
* @return department
**/
@ApiModelProperty(value = "")
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public UserResponseModel userName(String userName) {
this.userName = userName;
return this;
}
/**
* Get userName
* @return userName
**/
@ApiModelProperty(value = "")
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public UserResponseModel email(String email) {
this.email = email;
return this;
}
/**
* Get email
* @return email
**/
@ApiModelProperty(value = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public UserResponseModel isActive(Boolean isActive) {
this.isActive = isActive;
return this;
}
/**
* Get isActive
* @return isActive
**/
@ApiModelProperty(value = "")
public Boolean isIsActive() {
return isActive;
}
public void setIsActive(Boolean isActive) {
this.isActive = isActive;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UserResponseModel userResponseModel = (UserResponseModel) o;
return Objects.equals(this.id, userResponseModel.id) &&
Objects.equals(this.isOnline, userResponseModel.isOnline) &&
Objects.equals(this.isUsingBlacklist, userResponseModel.isUsingBlacklist) &&
Objects.equals(this.isUsingWhitelist, userResponseModel.isUsingWhitelist) &&
Objects.equals(this.blacklist, userResponseModel.blacklist) &&
Objects.equals(this.whitelist, userResponseModel.whitelist) &&
Objects.equals(this.ldapLogin, userResponseModel.ldapLogin) &&
Objects.equals(this.title, userResponseModel.title) &&
Objects.equals(this.firstName, userResponseModel.firstName) &&
Objects.equals(this.lastName, userResponseModel.lastName) &&
Objects.equals(this.department, userResponseModel.department) &&
Objects.equals(this.userName, userResponseModel.userName) &&
Objects.equals(this.email, userResponseModel.email) &&
Objects.equals(this.isActive, userResponseModel.isActive);
}
@Override
public int hashCode() {
return Objects.hash(id, isOnline, isUsingBlacklist, isUsingWhitelist, blacklist, whitelist, ldapLogin, title, firstName, lastName, department, userName, email, isActive);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UserResponseModel {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" isOnline: ").append(toIndentedString(isOnline)).append("\n");
sb.append(" isUsingBlacklist: ").append(toIndentedString(isUsingBlacklist)).append("\n");
sb.append(" isUsingWhitelist: ").append(toIndentedString(isUsingWhitelist)).append("\n");
sb.append(" blacklist: ").append(toIndentedString(blacklist)).append("\n");
sb.append(" whitelist: ").append(toIndentedString(whitelist)).append("\n");
sb.append(" ldapLogin: ").append(toIndentedString(ldapLogin)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
sb.append(" department: ").append(toIndentedString(department)).append("\n");
sb.append(" userName: ").append(toIndentedString(userName)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,75 @@
package com.uam.wmi.findmytutor.network;
import android.content.Context;
import android.text.TextUtils;
import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import com.uam.wmi.findmytutor.utils.PrefUtils;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class ApiClient {
private static Retrofit retrofit = null;
private static int REQUEST_TIMEOUT = 60;
private static OkHttpClient okHttpClient;
private static final String BASE_URL = "https://s416084.projektstudencki.pl/develop/";
public static Retrofit getClient(Context context) {
if (okHttpClient == null)
initOkHttp(context);
if (retrofit == null) {
retrofit = new Retrofit.Builder()
.baseUrl(BASE_URL)
.client(okHttpClient)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.build();
}
return retrofit;
}
private static void initOkHttp(final Context context) {
OkHttpClient.Builder httpClient = new OkHttpClient().newBuilder()
.connectTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS)
.readTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS)
.writeTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS);
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
httpClient.addInterceptor(interceptor);
httpClient.addInterceptor(new Interceptor() {
@Override
public Response intercept(Chain chain) throws IOException {
Request original = chain.request();
Request.Builder requestBuilder = original.newBuilder()
.addHeader("Accept", "application/json")
.addHeader("Content-Type", "application/json");
// Adding Authorization token (API Key)
// Requests will be denied without API key
if (!TextUtils.isEmpty(PrefUtils.getApiKey(context))) {
requestBuilder.addHeader("Authorization", PrefUtils.getApiKey(context));
}
Request request = requestBuilder.build();
return chain.proceed(request);
}
});
okHttpClient = httpClient.build();
}
};

View File

@ -1,32 +0,0 @@
package com.uam.wmi.findmytutor.network;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
public abstract class NetworkConnectionInterceptor implements Interceptor {
public abstract boolean isInternetAvailable();
public abstract void onInternetUnavailable();
public abstract void onCacheUnavailable();
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
if (!isInternetAvailable()) {
onInternetUnavailable();
request = request.newBuilder().header("Cache-Control",
"public, only-if-cached, max-stale=" + 60 * 60 * 24).build();
Response response = chain.proceed(request);
if (response.cacheResponse() == null) {
onCacheUnavailable();
}
return response;
}
return chain.proceed(request);
}
}

View File

@ -1,71 +0,0 @@
package com.uam.wmi.findmytutor.network;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class RetrofitClientInstance {
private static Retrofit retrofit;
private static final String BASE_URL = "https://s416084.projektstudencki.pl/develop/";
public static Retrofit getRetrofitLoginInstance() {
if (retrofit == null) {
retrofit = new retrofit2.Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
}
return retrofit;
}
public static Retrofit getRetrofitInstance() {
if (retrofit == null) {
retrofit = new retrofit2.Retrofit.Builder()
.baseUrl(BASE_URL)
.client(provideOkHttpClient())
.addConverterFactory(GsonConverterFactory.create())
.build();
}
return retrofit;
}
private static OkHttpClient provideOkHttpClient() {
OkHttpClient.Builder okhttpClientBuilder = new OkHttpClient.Builder();
okhttpClientBuilder.connectTimeout(30, TimeUnit.SECONDS);
okhttpClientBuilder.readTimeout(30, TimeUnit.SECONDS);
okhttpClientBuilder.writeTimeout(30, TimeUnit.SECONDS);
return okhttpClientBuilder.build();
}
//
// private OkHttpClient provideokHttpClient() {
// OkHttpClient.Builder okhttpClientBuilder = new OkHttpClient.Builder();
// okhttpClientBuilder.connectTimeout(30, TimeUnit.SECONDS);
// okhttpClientBuilder.readTimeout(30, TimeUnit.SECONDS);
// okhttpClientBuilder.writeTimeout(30, TimeUnit.SECONDS);
//
// okhttpClientBuilder.addInterceptor(new NetworkConnectionInterceptor() {
// @Override
// public boolean isInternetAvailable() {
// return this.isInternetAvailable();
// }
//
// @Override
// public void onInternetUnavailable() {
// if (mInternetConnectionListener != null) {
// mInternetConnectionListener.onInternetUnavailable();
// }
// }
//
// @Override
// public void onCacheUnavailable() {
// if (mInternetConnectionListener != null) {
// mInternetConnectionListener.onCacheUnavailable();
// }
// }
// });
// }
}

View File

@ -0,0 +1,46 @@
package com.uam.wmi.findmytutor.service;
import com.uam.wmi.findmytutor.model.Coordinate;
import java.util.List;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
public interface CoordinateService {
@GET("api/coordinates")
Call<List<Coordinate>> getAllCoordinates();
@GET("api/coordinates/{id}")
Call<Coordinate> getCoordinatesById(@Path("id") String id);
@GET("api/coordinates/user/{userId}")
Call<List<Coordinate>> getCoordinatesByUserId(@Path("userId") String userId);
@GET("api/coordinates/userTop/{userId}")
Call<List<Coordinate>> getTopCoordinatesByUserId(@Path("userId") String userId);
@GET("api/coordinates/top")
Call<List<Coordinate>> getTopCoordinates();
@GET("api/coordinates/top/online")
Call<List<Coordinate>> getOnlineCoordinates();
@POST("api/coordinates")
Call<ResponseBody> postCoordinate(@Body Coordinate coordinate);
@PUT("api/coordinates/{id}")
Call<Coordinate> putCoordinatesById(@Path("id") String id);
@DELETE("api/coordinates/{id}")
Call<Coordinate> deleteCoordinatesById(@Path("id") String id);
}

View File

@ -3,7 +3,7 @@ package com.uam.wmi.findmytutor.service;
import com.uam.wmi.findmytutor.model.JwtToken;
import com.uam.wmi.findmytutor.model.LdapUser;
import retrofit2.Call;
import io.reactivex.Single;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
@ -12,15 +12,15 @@ import retrofit2.http.Path;
public interface LdapService {
@POST("api/ldap/fakeValidate")
Call<JwtToken> fakeValidate(@Body LdapUser user);
Single<JwtToken> fakeValidate(@Body LdapUser user);
@POST("api/ldap/validate")
Call<JwtToken> validate(@Body LdapUser user);
Single<JwtToken> validate(@Body LdapUser user);
@GET("api/ldap/getUserData/{login}")
Call<LdapUser> getUserDataByLogin(@Path("login") String userLogin);
Single<LdapUser> getUserDataByLogin(@Path("login") String userLogin);
@GET("api/ldap/getUserData/email/{email}")
Call<LdapUser> getUserDataByMail(@Path("email") String userMail);
Single<LdapUser> getUserDataByMail(@Path("email") String userMail);
}

View File

@ -1,4 +0,0 @@
package com.uam.wmi.findmytutor.service;
public interface Session {
}

View File

@ -0,0 +1,77 @@
package com.uam.wmi.findmytutor.service;
import com.uam.wmi.findmytutor.model.IsUsingListBool;
import com.uam.wmi.findmytutor.model.PagedResult;
import com.uam.wmi.findmytutor.model.StudentIdModel;
import com.uam.wmi.findmytutor.model.User;
import java.util.List;
import io.reactivex.Completable;
import io.reactivex.Single;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
public interface UserService {
@GET("api/users")
Single <List<User>> getAllUsers();
@POST("api/users")
Completable createUser(@Body User user);
@GET("api/users/page/{pageNum}")
Single <PagedResult> getPagedUsers(@Path("pageNum") String pageNum );
@GET("api/users/tutors/page/{pageNum}")
Single <PagedResult> getPagedTutors(@Path("pageNum") String pageNum);
@GET("api/users/students/page/{pageNum}")
Single<PagedResult> getPagedStudents(@Path("pageNum") String pageNum);
@GET("api/users/{id}")
Single<User> getUserByID(@Path("id") String userID);
@PUT("api/users/{id}")
Completable updateUserByID(@Path("id") String userID, @Body User user);
@DELETE("api/users/{id}")
Completable deleteUserByID(@Path("id") String userID);
@GET("api/users/userLogin/{ldapLogin}")
Single<String> getUserLdapLogin(@Path("ldapLogin") String ldapLogin);
@PUT("api/users/setActive/{userID}")
Completable setUserActive(@Path("userID") String userID);
@PUT("api/users/setInActive/{userID}")
Completable setUserInActive(@Path("userID") String userID);
@GET("api/users/blacklist/{tutorID}")
Single<List<User>> getTutorBlacklistedByID(@Path("tutorID") String tutorID);
@PUT("api/users/blacklist/{tutorID}")
Completable setTutorBlacklist(@Path("tutorID") String tutorID, @Body IsUsingListBool isUsing);
@POST("api/users/blacklist/{tutorID}")
Completable addStudentToBlacklist(@Path("tutorID") String tutorID, @Body StudentIdModel student);
@DELETE("api/users/blacklist/{tutorID}")
Completable removeStudentFromBlacklist(@Path("tutorID") String tutorID, @Body StudentIdModel student);
@GET("api/users/whitelist/{tutorID}")
Single<List<User>> getTutorwhitelistedByID(@Path("tutorID") String tutorID);
@PUT("api/users/whitelist/{tutorID}")
Completable setTutorWhitelist(@Path("tutorID") String tutorID, @Body IsUsingListBool isUsing);
@POST("api/users/whitelist/{tutorID}")
Completable addStudentTowhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student);
@DELETE("api/users/whitelist/{tutorID}")
Completable removeStudentFromWhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student);
}

View File

@ -0,0 +1,98 @@
package com.uam.wmi.findmytutor.utils;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.TypedValue;
import android.view.View;
public class MyDividerItemDecoration extends RecyclerView.ItemDecoration {
private static final int[] ATTRS = new int[]{
android.R.attr.listDivider
};
public static final int HORIZONTAL_LIST = LinearLayoutManager.HORIZONTAL;
public static final int VERTICAL_LIST = LinearLayoutManager.VERTICAL;
private Drawable mDivider;
private int mOrientation;
private Context context;
private int margin;
public MyDividerItemDecoration(Context context, int orientation, int margin) {
this.context = context;
this.margin = margin;
final TypedArray a = context.obtainStyledAttributes(ATTRS);
mDivider = a.getDrawable(0);
a.recycle();
setOrientation(orientation);
}
public void setOrientation(int orientation) {
if (orientation != HORIZONTAL_LIST && orientation != VERTICAL_LIST) {
throw new IllegalArgumentException("invalid orientation");
}
mOrientation = orientation;
}
@Override
public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) {
if (mOrientation == VERTICAL_LIST) {
drawVertical(c, parent);
} else {
drawHorizontal(c, parent);
}
}
public void drawVertical(Canvas c, RecyclerView parent) {
final int left = parent.getPaddingLeft();
final int right = parent.getWidth() - parent.getPaddingRight();
final int childCount = parent.getChildCount();
for (int i = 0; i < childCount; i++) {
final View child = parent.getChildAt(i);
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();
final int top = child.getBottom() + params.bottomMargin;
final int bottom = top + mDivider.getIntrinsicHeight();
mDivider.setBounds(left + dpToPx(margin), top, right - dpToPx(margin), bottom);
mDivider.draw(c);
}
}
public void drawHorizontal(Canvas c, RecyclerView parent) {
final int top = parent.getPaddingTop();
final int bottom = parent.getHeight() - parent.getPaddingBottom();
final int childCount = parent.getChildCount();
for (int i = 0; i < childCount; i++) {
final View child = parent.getChildAt(i);
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();
final int left = child.getRight() + params.rightMargin;
final int right = left + mDivider.getIntrinsicHeight();
mDivider.setBounds(left, top + dpToPx(margin), right, bottom - dpToPx(margin));
mDivider.draw(c);
}
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
if (mOrientation == VERTICAL_LIST) {
outRect.set(0, 0, 0, mDivider.getIntrinsicHeight());
} else {
outRect.set(0, 0, mDivider.getIntrinsicWidth(), 0);
}
}
private int dpToPx(int dp) {
Resources r = context.getResources();
return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, r.getDisplayMetrics()));
}
}

View File

@ -0,0 +1,27 @@
package com.uam.wmi.findmytutor.utils;
import android.content.Context;
import android.content.SharedPreferences;
public class PrefUtils {
/**
* Storing API Key in shared preferences to
* add it in header part of every retrofit request
*/
public PrefUtils() {
}
private static SharedPreferences getSharedPreferences(Context context) {
return context.getSharedPreferences("APP_PREF", Context.MODE_PRIVATE);
}
public static void storeApiKey(Context context, String apiKey) {
SharedPreferences.Editor editor = getSharedPreferences(context).edit();
editor.putString("API_KEY", apiKey);
editor.commit();
}
public static String getApiKey(Context context) {
return getSharedPreferences(context).getString("API_KEY", null);
}
}

View File

@ -0,0 +1,54 @@
package com.uam.wmi.findmytutor.utils;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
public class RecyclerTouchListener implements RecyclerView.OnItemTouchListener {
private ClickListener clicklistener;
private GestureDetector gestureDetector;
public RecyclerTouchListener(Context context, final RecyclerView recycleView, final ClickListener clicklistener) {
this.clicklistener = clicklistener;
gestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onSingleTapUp(MotionEvent e) {
return true;
}
@Override
public void onLongPress(MotionEvent e) {
View child = recycleView.findChildViewUnder(e.getX(), e.getY());
if (child != null && clicklistener != null) {
clicklistener.onLongClick(child, recycleView.getChildAdapterPosition(child));
}
}
});
}
@Override
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
View child = rv.findChildViewUnder(e.getX(), e.getY());
if (child != null && clicklistener != null && gestureDetector.onTouchEvent(e)) {
clicklistener.onClick(child, rv.getChildAdapterPosition(child));
}
return false;
}
@Override
public void onTouchEvent(RecyclerView rv, MotionEvent e) {
}
@Override
public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
}
public interface ClickListener {
void onClick(View view, int position);
void onLongClick(View view, int position);
}
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/colorWhite"
android:state_checked="true"/>
<item android:color="@color/colorWhiteTransparent" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

View File

@ -64,6 +64,12 @@
</android.support.design.widget.TextInputLayout>
<Switch
android:id="@+id/tutor_login_switch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Login as Tutor" />
<Button
android:id="@+id/email_sign_in_button"
style="?android:textAppearanceSmall"

View File

@ -2,31 +2,68 @@
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.MainActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--<com.mapbox.mapboxsdk.maps.MapView-->
<!--android:id="@+id/mapView"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--mapbox:mapbox_cameraTargetLat="52.466799"-->
<!--mapbox:mapbox_cameraTargetLng="16.927002"-->
<!--mapbox:mapbox_cameraZoom="17"-->
<!--mapbox:mapbox_styleUrl="mapbox://styles/domagalsky/cjiyzrqjp05l72rmj6ntvv2n8">-->
<!--</com.mapbox.mapboxsdk.maps.MapView>-->
<android.support.design.widget.FloatingActionButton
android:id="@+id/logoutButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:backgroundTint="@android:color/holo_red_dark"
app:srcCompat="@android:drawable/ic_lock_power_off" />
<include layout="@layout/content_main" />
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
</android.support.design.widget.AppBarLayout>
<include
android:id="@+id/include"
layout="@layout/content_main" />
<include layout="@layout/content_main" />
<FrameLayout
android:id="@+id/main_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_dialog_email" />
</FrameLayout>
<TextView
android:id="@+id/textView"
<android.support.design.widget.BottomNavigationView
android:id="@+id/main_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView" />
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
app:itemBackground="@color/colorPrimaryDark"
app:itemIconTint="@color/nav_item_colors"
app:itemTextColor="@color/nav_item_colors"
app:layout_anchor="@+id/include"
app:layout_anchorGravity="bottom|center"
app:menu="@menu/nav_items"
/>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
tools:context=".activity.MapFragment">
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible"
mapbox:mapbox_cameraTargetLat="52.466799"
mapbox:mapbox_cameraTargetLng="16.927002"
mapbox:mapbox_cameraZoom="17"
mapbox:mapbox_styleUrl="mapbox://styles/domagalsky/cjiyzrqjp05l72rmj6ntvv2n8">
</com.mapbox.mapboxsdk.maps.MapView>
</FrameLayout>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.NotificationFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Notification fragment" />
</FrameLayout>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.ProfileFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Profile Frag" />
</FrameLayout>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="80dp"
android:clickable="true"
android:paddingBottom="@dimen/dimen_10"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingTop="@dimen/dimen_10">
<TextView
android:id="@+id/firstName"
android:layout_width="match_parent"
android:layout_height="14dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="13dp"
android:textColor="@color/note_list_text"
android:textSize="@dimen/note_list_text" />
<TextView
android:id="@+id/lastName"
android:layout_width="match_parent"
android:layout_height="14dp"
android:layout_below="@+id/firstName"
android:layout_centerHorizontal="true"
android:textColor="@color/note_list_text"
android:textSize="@dimen/note_list_text" />
<TextView
android:id="@+id/isOnline"
android:layout_width="match_parent"
android:layout_height="14dp"
android:layout_below="@+id/lastName"
android:layout_centerHorizontal="true"
android:textColor="@color/note_list_text"
android:textSize="@dimen/note_list_text" />
</RelativeLayout>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/nav_profile"
android:icon="@drawable/outline_person_white_24dp"
android:title="@string/nav_profile" />
<item
android:id="@+id/nav_map"
android:icon="@drawable/outline_map_white_24dp"
android:title="@string/nav_map" />
<item
android:id="@+id/nav_notif"
android:icon="@drawable/outline_notifications_white_24dp"
android:title="@string/nav_notif" />
</menu>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="title_activity_login">Zaloguj</string>
<string name="prompt_password">Hasło (opcjonalne)</string>
<string name="action_sign_in_short">Zaloguj</string>
<string name="error_incorrect_password">Nieprawidłowe hasło</string>
<string name="error_invalid_password">Hasło jest zbyt krótkie</string>
<string name="error_invalid_email">Nieprawidłowy mail</string>
<string name="error_field_required">To pole jest wymagane</string>
</resources>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="mdcolor_400">
<item name="red_400" type="color">#e84e40</item>
<item name="pink_400" type="color">#ec407a</item>
<item name="purple_400" type="color">#ab47bc</item>
<item name="deep_purple_400" type="color">#7e57c2</item>
<item name="indigo_400" type="color">#5c6bc0</item>
<item name="blue_400" type="color">#738ffe</item>
<item name="light_blue_400" type="color">#29b6f6</item>
<item name="cyan_400" type="color">#26c6da</item>
<item name="teal_400" type="color">#26a69a</item>
<item name="green_400" type="color">#2baf2b</item>
<item name="light_green_400" type="color">#9ccc65</item>
<item name="lime_400" type="color">#d4e157</item>
<item name="yellow_400" type="color">#ffee58</item>
<item name="orange_400" type="color">#ffa726</item>
<item name="deep_orange_400" type="color">#ff7043</item>
<item name="brown_400" type="color">#8d6e63</item>
<item name="grey_400" type="color">#bdbdbd</item>
<item name="blue_grey_400" type="color">#78909c</item>
</array>
<array name="mdcolor_500">
<item name="red_500" type="color">#e51c23</item>
<item name="pink_500" type="color">#e91e63</item>
<item name="purple_500" type="color">#9c27b0</item>
<item name="deep_purple_500" type="color">#673ab7</item>
<item name="indigo_500" type="color">#3f51b5</item>
<item name="blue_500" type="color">#5677fc</item>
<item name="light_blue_500" type="color">#03a9f4</item>
<item name="cyan_500" type="color">#00bcd4</item>
<item name="teal_500" type="color">#009688</item>
<item name="green_500" type="color">#259b24</item>
<item name="light_green_500" type="color">#8bc34a</item>
<item name="lime_500" type="color">#cddc39</item>
<item name="yellow_500" type="color">#ffeb3b</item>
<item name="orange_500" type="color">#ff9800</item>
<item name="deep_orange_500" type="color">#ff5722</item>
<item name="brown_500" type="color">#795548</item>
<item name="grey_500" type="color">#9e9e9e</item>
<item name="blue_grey_500" type="color">#607d8b</item>
</array>
</resources>

View File

@ -3,4 +3,13 @@
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="msg_no_notes">#999</color>
<color name="hint_enter_note">#89c3c3c3</color>
<color name="timestamp">#858585</color>
<color name="note_list_text">#232323</color>
<color name="colorWhite">#ffffff</color>
<color name="colorWhiteTransparent">#80ffffff</color>
</resources>

View File

@ -3,4 +3,18 @@
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<!-- Tutors list -->
<dimen name="activity_margin">16dp</dimen>
<dimen name="dot_margin_right">10dp</dimen>
<dimen name="msg_no_notes">26sp</dimen>
<dimen name="margin_top_no_notes">120dp</dimen>
<dimen name="lbl_new_note_title">20sp</dimen>
<dimen name="dimen_10">10dp</dimen>
<dimen name="input_new_note">20sp</dimen>
<dimen name="dot_height">10dp</dimen>
<dimen name="dot_text_size">40sp</dimen>
<dimen name="timestamp">14sp</dimen>
<dimen name="note_list_text">13sp</dimen>
</resources>

View File

@ -1,11 +1,23 @@
<resources>
<string name="app_name">FindMyTutor</string>
<string name="app_name" translatable="false">FindMyTutor</string>
<string name="title_activity_login">Sign in</string>
<string name="title_activity_startup">StartUp Activity</string>
<string name="title_activity_startup" translatable="false">StartUp Activity</string>
<!-- Menu -->
<string name="nav_map">Map</string>
<string name="nav_notif">Notification</string>
<string name="nav_profile">Profile</string>
<!-- Tutors list -->
<string name="action_settings">Settings</string>
<string name="activity_title_home">Notes</string>
<string name="msg_no_notes">No notes found!</string>
<string name="lbl_new_note_title">New Note</string>
<string name="hint_enter_note">Enter your note!</string>
<!-- Strings related to login -->
<string name="prompt_email">Email</string>
<string name="prompt_email" translatable="false">Email</string>
<string name="prompt_password">Password (optional)</string>
<string name="action_sign_in">Sign in or register</string>
<string name="action_sign_in_short">Sign in</string>
@ -16,5 +28,6 @@
<string name="permission_rationale">"Contacts permissions are needed for providing email
completions."
</string>
<string name="title_activity_main">MainActivity</string>
<string name="title_activity_main" translatable="false">MainActivity</string>
<string name="access_token" translatable="false">pk.eyJ1IjoiZG9tYWdhbHNreSIsImEiOiJjamd4am4zazYwNXo1MzBxeDZtYjA4d2s4In0.KzNdhc9V_-SYe14AZ-q3Ew</string>
</resources>

View File

@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong