Compare commits
5 Commits
master
...
apk_releas
Author | SHA1 | Date | |
---|---|---|---|
9d532b48da | |||
200ffa5e97 | |||
5ef2a188c6 | |||
48ba6f84a5 | |||
2ce65b1fe6 |
@ -1,29 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<Objective-C-extensions>
|
||||
<file>
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
|
||||
</file>
|
||||
<class>
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
|
||||
</class>
|
||||
<extensions>
|
||||
<pair source="cpp" header="h" fileNamingConvention="NONE" />
|
||||
<pair source="c" header="h" fileNamingConvention="NONE" />
|
||||
</extensions>
|
||||
</Objective-C-extensions>
|
||||
</code_scheme>
|
||||
</component>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/app/src/main/java/com/uam/wmi/findmytutor/activity/MapFragment.java" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="NullableNotNullManager">
|
||||
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
|
||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="7">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
|
||||
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
|
||||
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
|
||||
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myNotNulls">
|
||||
<value>
|
||||
<list size="6">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
|
||||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
|
||||
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
17
.project
17
.project
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>FindMyTutorAndroid</name>
|
||||
<comment>Project FindMyTutorAndroid created by Buildship.</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -1,2 +0,0 @@
|
||||
connection.project.dir=
|
||||
eclipse.preferences.version=1
|
BIN
app-debug.apk
Normal file
BIN
app-debug.apk
Normal file
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
66
app/.gitignore
vendored
66
app/.gitignore
vendored
@ -1,66 +0,0 @@
|
||||
# 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
|
23
app/.project
23
app/.project
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>app</name>
|
||||
<comment>Project app created by Buildship.</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -1,2 +0,0 @@
|
||||
connection.project.dir=..
|
||||
eclipse.preferences.version=1
|
@ -1,61 +0,0 @@
|
||||
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 22
|
||||
targetSdkVersion 27
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://dl.bintray.com/amulyakhare/maven'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.android.support:appcompat-v7:27.1.1'
|
||||
implementation 'com.android.support:design:27.1.1'
|
||||
implementation 'com.android.support:support-v4:27.1.1'
|
||||
implementation 'com.android.support:support-vector-drawable:27.1.1'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
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.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"
|
||||
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
||||
implementation 'com.auth0.android:jwtdecode:1.1.1'
|
||||
implementation 'com.annimon:stream:1.2.1'
|
||||
|
||||
}
|
21
app/proguard-rules.pro
vendored
21
app/proguard-rules.pro
vendored
@ -1,21 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
@ -1,26 +0,0 @@
|
||||
package com.uam.wmi.findmytutor;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.uam.wmi.findmytutor", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.uam.wmi.findmytutor">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
|
||||
|
||||
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".activity.StartupActivity"
|
||||
android:label="@string/title_activity_startup"
|
||||
android:launchMode="singleInstance"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.MapActivity"
|
||||
android:label="@string/title_activity_main"
|
||||
android:launchMode="singleTop" />
|
||||
<activity
|
||||
android:name=".activity.LoginActivity"
|
||||
android:excludeFromRecents="true"
|
||||
android:label="@string/title_activity_login"
|
||||
android:launchMode="singleTask"
|
||||
android:noHistory="true" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.SettingsActivity"
|
||||
android:label="@string/title_activity_settings" />
|
||||
|
||||
<service
|
||||
android:name=".service.BackgroundLocalizationService"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTop"
|
||||
android:enabled="true"
|
||||
/>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -1,112 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.activity;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.annotation.LayoutRes;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
|
||||
* to be used with AppCompat.
|
||||
*/
|
||||
public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
|
||||
|
||||
private AppCompatDelegate mDelegate;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
getDelegate().installViewFactory();
|
||||
getDelegate().onCreate(savedInstanceState);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
getDelegate().onPostCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
public ActionBar getSupportActionBar() {
|
||||
return getDelegate().getSupportActionBar();
|
||||
}
|
||||
|
||||
public void setSupportActionBar(@Nullable Toolbar toolbar) {
|
||||
getDelegate().setSupportActionBar(toolbar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuInflater getMenuInflater() {
|
||||
return getDelegate().getMenuInflater();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(@LayoutRes int layoutResID) {
|
||||
getDelegate().setContentView(layoutResID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(View view) {
|
||||
getDelegate().setContentView(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(View view, ViewGroup.LayoutParams params) {
|
||||
getDelegate().setContentView(view, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addContentView(View view, ViewGroup.LayoutParams params) {
|
||||
getDelegate().addContentView(view, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostResume() {
|
||||
super.onPostResume();
|
||||
getDelegate().onPostResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTitleChanged(CharSequence title, int color) {
|
||||
super.onTitleChanged(title, color);
|
||||
getDelegate().setTitle(title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
getDelegate().onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
getDelegate().onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
getDelegate().onDestroy();
|
||||
}
|
||||
|
||||
public void invalidateOptionsMenu() {
|
||||
getDelegate().invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
private AppCompatDelegate getDelegate() {
|
||||
if (mDelegate == null) {
|
||||
mDelegate = AppCompatDelegate.create(this, null);
|
||||
}
|
||||
return mDelegate;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,349 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.activity;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.design.widget.NavigationView;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.SearchView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.uam.wmi.findmytutor.R;
|
||||
import com.uam.wmi.findmytutor.service.BackgroundLocalizationService;
|
||||
import com.uam.wmi.findmytutor.utils.ActiveFragment;
|
||||
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
||||
|
||||
|
||||
public abstract class BaseActivity
|
||||
extends AppCompatActivity
|
||||
implements BottomNavigationView.OnNavigationItemSelectedListener {
|
||||
|
||||
protected static final int REQUEST_PERMISSIONS = 100;
|
||||
public DrawerLayout drawerLayout;
|
||||
protected BottomNavigationView navigationView;
|
||||
protected NavigationView drawerNavigationView;
|
||||
protected DrawerLayout sideDrawer;
|
||||
protected Toolbar toolbar;
|
||||
protected boolean isTutor;
|
||||
boolean boolean_permission;
|
||||
private ActionBarDrawerToggle actionBarDrawerToggle;
|
||||
private SharingFragment sharingFragment;
|
||||
private Fragment userListFragment;
|
||||
private ActiveFragment activeFragment = ActiveFragment.NONE;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(getContentViewId());
|
||||
drawerNavigationView = findViewById(R.id.nav_view);
|
||||
sideDrawer = findViewById(R.id.activity_container);
|
||||
|
||||
|
||||
drawerNavigationView.setNavigationItemSelectedListener(
|
||||
item -> {
|
||||
String itemName = (String) item.getTitle();
|
||||
Intent launchIntent;
|
||||
if (itemName.equals("Whitelist")) {
|
||||
/* launchIntent = new Intent(getApplicationContext(), WhitelistActivity.class);
|
||||
startActivity(launchIntent);*/
|
||||
} else if (itemName.equals("Blacklist")) {
|
||||
/* launchIntent = new Intent(getApplicationContext(), BlacklistActivity.class);
|
||||
startActivity(launchIntent);*/
|
||||
} else if (itemName.equals("Profile")) {
|
||||
/* launchIntent = new Intent(getApplicationContext(), ProfileActivity.class);
|
||||
startActivity(launchIntent);*/
|
||||
} else if (itemName.equals("Settings")) {
|
||||
launchIntent = new Intent(getApplicationContext(), SettingsActivity.class);
|
||||
startActivity(launchIntent);
|
||||
|
||||
} else if (itemName.equals("Log out")) {
|
||||
stopBackgroundLocalizationTask();
|
||||
|
||||
PrefUtils.cleanUserLocalStorage(getApplicationContext());
|
||||
Intent i = getBaseContext().getPackageManager()
|
||||
.getLaunchIntentForPackage(getBaseContext().getPackageName());
|
||||
if (i != null) {
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
}
|
||||
startActivity(i);
|
||||
finish();
|
||||
|
||||
}
|
||||
|
||||
sideDrawer.closeDrawers();
|
||||
|
||||
return true;
|
||||
}
|
||||
);
|
||||
|
||||
navigationView = findViewById(R.id.navigation);
|
||||
navigationView.setOnNavigationItemSelectedListener(this);
|
||||
sharingFragment = new SharingFragment();
|
||||
userListFragment = new UsersListFragment();
|
||||
|
||||
|
||||
isTutor = PrefUtils.getIsTutor(getApplicationContext());
|
||||
if (!isTutor) {
|
||||
navigationView.findViewById(R.id.nav_profile).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void stopBackgroundLocalizationTask() {
|
||||
Intent stopIntent = new Intent(getApplicationContext(), BackgroundLocalizationService.class);
|
||||
stopIntent.putExtra("request_stop", true);
|
||||
startService(stopIntent);
|
||||
}
|
||||
|
||||
public void startBackgroundLocalizationTask() {
|
||||
if ((ContextCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
|
||||
|
||||
if ((ActivityCompat.shouldShowRequestPermissionRationale(this, android.Manifest.permission.ACCESS_FINE_LOCATION))) {
|
||||
|
||||
} else {
|
||||
ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION
|
||||
|
||||
},
|
||||
REQUEST_PERMISSIONS);
|
||||
}
|
||||
} else {
|
||||
|
||||
Intent startIntent = new Intent(getApplicationContext(), BackgroundLocalizationService.class);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
startForegroundService(startIntent);
|
||||
} else {
|
||||
startService(startIntent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void handleBackgroundTaskLifeCycle() {
|
||||
if (PrefUtils.isEnableSharingLocalization(getApplicationContext())) {
|
||||
startBackgroundLocalizationTask();
|
||||
} else {
|
||||
stopBackgroundLocalizationTask();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(int layoutResID) {
|
||||
DrawerLayout fullView = (DrawerLayout) getLayoutInflater().inflate(R.layout.base_activity, null);
|
||||
FrameLayout activityContainer = fullView.findViewById(R.id.activity_content);
|
||||
getLayoutInflater().inflate(layoutResID, activityContainer, true);
|
||||
super.setContentView(fullView);
|
||||
|
||||
initToolbar();
|
||||
}
|
||||
|
||||
private void initToolbar() {
|
||||
toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
}
|
||||
|
||||
private void setUpNav() {
|
||||
|
||||
drawerLayout = findViewById(R.id.activity_container);
|
||||
actionBarDrawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
|
||||
drawerLayout.addDrawerListener(actionBarDrawerToggle);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayShowTitleEnabled(false);
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setHomeButtonEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
setUpNav();
|
||||
|
||||
actionBarDrawerToggle.syncState();
|
||||
|
||||
/* if (isTutor) {
|
||||
startLocalizationService();
|
||||
}*/
|
||||
}
|
||||
|
||||
/* public void startLocalizationService() {
|
||||
if ((ContextCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
|
||||
|
||||
if ((ActivityCompat.shouldShowRequestPermissionRationale(BaseActivity.this, android.Manifest.permission.ACCESS_FINE_LOCATION))) {
|
||||
|
||||
} else {
|
||||
ActivityCompat.requestPermissions(BaseActivity.this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION
|
||||
|
||||
},
|
||||
REQUEST_PERMISSIONS);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (isTutor) {
|
||||
Intent intent = new Intent(getApplicationContext(), BackgroundLocalizationService.class);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
startForegroundService(intent);
|
||||
} else {
|
||||
startService(intent);
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(), "Please enable the gps", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
actionBarDrawerToggle.onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.menu_main, menu);
|
||||
|
||||
MenuItem myActionMenuItem = menu.findItem(R.id.action_search);
|
||||
final SearchView searchView = (SearchView) myActionMenuItem.getActionView();
|
||||
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||
@Override
|
||||
public boolean onQueryTextSubmit(String input) {
|
||||
if (activeFragment.equals(ActiveFragment.USER_LIST)) {
|
||||
executeUserListSearch(input);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public boolean onQueryTextChange(String input) {
|
||||
if (activeFragment.equals(ActiveFragment.USER_LIST)) {
|
||||
executeUserListSearch(input);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void executeUserListSearch(String input) {
|
||||
((UsersListFragment) userListFragment).searchUser(input);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (actionBarDrawerToggle.onOptionsItemSelected(item)) {
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
|
||||
switch (requestCode) {
|
||||
case REQUEST_PERMISSIONS: {
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
boolean_permission = true;
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(), "Please allow the permission", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
updateNavigationBarState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
|
||||
private void removeFragment(Fragment fragment) {
|
||||
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
||||
fragmentTransaction.hide(fragment);
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||
|
||||
navigationView.postDelayed(() -> {
|
||||
int itemId = item.getItemId();
|
||||
|
||||
if (itemId == R.id.nav_map) {
|
||||
removeFragment(sharingFragment);
|
||||
removeFragment(userListFragment);
|
||||
} else if (itemId == R.id.nav_profile) {
|
||||
loadUserSettingsFragment();
|
||||
} else if (itemId == R.id.nav_user_list) {
|
||||
loadUserListFragment();
|
||||
}
|
||||
|
||||
}, 300);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void loadUserSettingsFragment() {
|
||||
activeFragment = ActiveFragment.SHARED_PREFERENCES;
|
||||
sharingFragment = SharingFragment.newInstance();
|
||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||
ft.replace(R.id.activity_content, sharingFragment);
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
private void loadUserListFragment() {
|
||||
activeFragment = ActiveFragment.USER_LIST;
|
||||
|
||||
userListFragment = UsersListFragment.newInstance();
|
||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||
ft.replace(R.id.activity_content, userListFragment);
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
|
||||
private void updateNavigationBarState() {
|
||||
int actionId = getNavigationMenuItemId();
|
||||
selectBottomNavigationBarItem(actionId);
|
||||
}
|
||||
|
||||
private void selectBottomNavigationBarItem(int itemId) {
|
||||
MenuItem item = navigationView.getMenu().findItem(itemId);
|
||||
item.setChecked(true);
|
||||
}
|
||||
|
||||
abstract int getNavigationMenuItemId();
|
||||
|
||||
abstract int getContentViewId();
|
||||
}
|
@ -1,239 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.activity;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Switch;
|
||||
|
||||
import com.auth0.android.jwt.Claim;
|
||||
import com.auth0.android.jwt.JWT;
|
||||
import com.jakewharton.retrofit2.adapter.rxjava2.HttpException;
|
||||
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.model.User;
|
||||
import com.uam.wmi.findmytutor.model.ValidateUser;
|
||||
import com.uam.wmi.findmytutor.network.ApiClient;
|
||||
import com.uam.wmi.findmytutor.service.LdapService;
|
||||
import com.uam.wmi.findmytutor.service.UserService;
|
||||
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
||||
import com.uam.wmi.findmytutor.utils.RestApiHelper;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.ResponseBody;
|
||||
|
||||
public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
// UI references.
|
||||
private AutoCompleteTextView mLoginNameView;
|
||||
private EditText mPasswordView;
|
||||
private View mProgressView;
|
||||
private View mLoginFormView;
|
||||
private LdapService ldapService;
|
||||
private UserService userService;
|
||||
private CompositeDisposable disposable = new CompositeDisposable();
|
||||
private Boolean isTutor = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login);
|
||||
mLoginNameView = findViewById(R.id.email);
|
||||
|
||||
ldapService = ApiClient.getClient(getApplicationContext())
|
||||
.create(LdapService.class);
|
||||
userService = ApiClient.getClient(getApplicationContext())
|
||||
.create(UserService.class);
|
||||
|
||||
mPasswordView = findViewById(R.id.password);
|
||||
mPasswordView.setOnEditorActionListener((textView, id, keyEvent) -> {
|
||||
if (id == EditorInfo.IME_ACTION_DONE || id == EditorInfo.IME_NULL) {
|
||||
attemptLogin();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
Switch tutorLogin = findViewById(R.id.tutor_login_switch);
|
||||
|
||||
tutorLogin.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
PrefUtils.storeIsTutor(getApplicationContext(), isChecked);
|
||||
});
|
||||
|
||||
Button mEmailSignInButton = findViewById(R.id.email_sign_in_button);
|
||||
mEmailSignInButton.setOnClickListener(view -> attemptLogin());
|
||||
|
||||
mLoginFormView = findViewById(R.id.login_form);
|
||||
mProgressView = findViewById(R.id.login_progress);
|
||||
}
|
||||
|
||||
|
||||
private void attemptLogin() {
|
||||
// Reset errors.
|
||||
mLoginNameView.setError(null);
|
||||
mPasswordView.setError(null);
|
||||
|
||||
// Store values at the time of the login attempt.
|
||||
String loginName = mLoginNameView.getText().toString();
|
||||
String password = mPasswordView.getText().toString();
|
||||
|
||||
boolean cancel = false;
|
||||
View focusView = null;
|
||||
|
||||
// Check for a valid email address.
|
||||
if (TextUtils.isEmpty(loginName)) {
|
||||
mLoginNameView.setError(getString(R.string.error_field_required));
|
||||
focusView = mLoginNameView;
|
||||
cancel = true;
|
||||
} else if (!isEmailValid(loginName)) {
|
||||
mLoginNameView.setError(getString(R.string.error_invalid_login_name));
|
||||
focusView = mLoginNameView;
|
||||
cancel = true;
|
||||
}
|
||||
|
||||
// Check for a valid password address.
|
||||
if (TextUtils.isEmpty(password)) {
|
||||
mPasswordView.setError(getString(R.string.error_field_required));
|
||||
focusView = mPasswordView;
|
||||
cancel = true;
|
||||
} else if (!isPasswordValid(password)) {
|
||||
mPasswordView.setError(getString(R.string.error_invalid_password));
|
||||
focusView = mPasswordView;
|
||||
cancel = true;
|
||||
}
|
||||
|
||||
if (cancel) {
|
||||
focusView.requestFocus();
|
||||
} else {
|
||||
showProgress(true);
|
||||
loginProcess(loginName, password);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isEmailValid(String loginName) {
|
||||
Pattern pattern = Pattern.compile("^s\\d+");
|
||||
Matcher matcher = pattern.matcher(loginName);
|
||||
return matcher.find();
|
||||
}
|
||||
|
||||
private boolean isPasswordValid(String password) {
|
||||
return password.length() > 4;
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
|
||||
private void showProgress(final boolean show) {
|
||||
int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);
|
||||
|
||||
|
||||
mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
|
||||
mLoginFormView.animate().setDuration(shortAnimTime).alpha(
|
||||
show ? 0 : 1).setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
mProgressView.animate().setDuration(shortAnimTime).alpha(
|
||||
show ? 1 : 0).setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void loginProcess(String email, String password) {
|
||||
Log.e("LOGIN", String.valueOf(PrefUtils.getIsTutor(getApplicationContext())));
|
||||
|
||||
//Fake validate
|
||||
LdapUser user = new LdapUser(email, password, "admin", (PrefUtils.getIsTutor(getApplicationContext())) ? "Tutor" : "Student", "string", "string", email);
|
||||
|
||||
// ValidateUser user = new ValidateUser(email, password);
|
||||
|
||||
// LDAP logging
|
||||
// disposable.add(ldapService.validate(user)
|
||||
|
||||
disposable.add(ldapService.fakeValidate(user)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(this::handleResponse, this::handleError));
|
||||
}
|
||||
|
||||
private void getUserProfile(String userId) {
|
||||
|
||||
disposable.add(userService.getUserByID(userId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(this::saveUserProfileToSharedPreferences, this::handleError));
|
||||
}
|
||||
|
||||
private void showSnackBarMessage(String message) {
|
||||
Snackbar.make(findViewById(R.id.login_form), message, Snackbar.LENGTH_LONG)
|
||||
.show();
|
||||
}
|
||||
|
||||
private void handleResponse(JwtToken jwtToken) {
|
||||
showProgress(false);
|
||||
|
||||
String token = jwtToken.getToken();
|
||||
JWT jwt = new JWT(token);
|
||||
Claim role = jwt.getClaim("nameid");
|
||||
|
||||
PrefUtils.storeIsLoggedIn(getApplicationContext(), true);
|
||||
PrefUtils.storeApiKey(getApplicationContext(), token);
|
||||
PrefUtils.storeUserId(getApplicationContext(), role.asString());
|
||||
|
||||
getUserProfile(role.asString());
|
||||
|
||||
Intent data = new Intent();
|
||||
String txt = "Main Activity";
|
||||
data.setData(Uri.parse(txt));
|
||||
setResult(RESULT_OK, data);
|
||||
finish();
|
||||
}
|
||||
|
||||
private void handleError(Throwable error) {
|
||||
showProgress(false);
|
||||
|
||||
if (error instanceof HttpException) {
|
||||
|
||||
ResponseBody responseBody = ((HttpException) error).response().errorBody();
|
||||
showSnackBarMessage(RestApiHelper.getErrorMessage(responseBody));
|
||||
|
||||
} else {
|
||||
showSnackBarMessage("Network Error !");
|
||||
}
|
||||
}
|
||||
|
||||
private void saveUserProfileToSharedPreferences(User user) {
|
||||
PrefUtils.storeUserFirstName(getApplicationContext(), user.getFirstName());
|
||||
PrefUtils.storeUserLastName(getApplicationContext(), user.getLastName());
|
||||
PrefUtils.storeUserName(getApplicationContext(), user.getUserName());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,279 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.activity;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.TypeEvaluator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mapbox.mapboxsdk.Mapbox;
|
||||
import com.mapbox.mapboxsdk.annotations.Marker;
|
||||
import com.mapbox.mapboxsdk.annotations.MarkerOptions;
|
||||
import com.mapbox.mapboxsdk.annotations.MarkerViewOptions;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
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.BackgroundLocalizationService;
|
||||
import com.uam.wmi.findmytutor.service.CoordinateService;
|
||||
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.annotations.NonNull;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.observers.DisposableSingleObserver;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
|
||||
public class MapActivity extends BaseActivity
|
||||
implements OnMapReadyCallback {
|
||||
|
||||
|
||||
String tag = "LifeCycleEvents";
|
||||
|
||||
|
||||
private MapView mapView;
|
||||
private MapboxMap mapboxMap;
|
||||
private int mInterval = 10000;
|
||||
private Handler mHandler;
|
||||
|
||||
private Map<String,Coordinate> coordsMap = new HashMap<>();
|
||||
|
||||
private CoordinateService coordinateService;
|
||||
private CompositeDisposable disposable = new CompositeDisposable();
|
||||
|
||||
private Runnable mStatusChecker;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
final SharedPreferences sharedPref = getSharedPreferences("fmtPrefs", Context.MODE_PRIVATE);
|
||||
final String authToken = sharedPref.getString("authToken",null);
|
||||
|
||||
mStatusChecker = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try{
|
||||
fetchTopCoords();
|
||||
} finally {
|
||||
mHandler.postDelayed(mStatusChecker, mInterval);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// fetching coords service
|
||||
coordinateService = ApiClient.getClient(getApplicationContext())
|
||||
.create(CoordinateService.class);
|
||||
mHandler = new Handler();
|
||||
Bundle extras = getIntent().getExtras();
|
||||
|
||||
Mapbox.getInstance(this, getString(R.string.access_token));
|
||||
|
||||
mapView = (MapView) findViewById(R.id.mapView);
|
||||
mapView.onCreate(savedInstanceState);
|
||||
mapView.getMapAsync(this);
|
||||
|
||||
//start background task
|
||||
startBackgroundLocalizationTask();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapReady(MapboxMap map) {
|
||||
mapboxMap = map;
|
||||
final Marker marker = mapboxMap.addMarker(new MarkerViewOptions()
|
||||
.position(new LatLng(52.466782,16.927549)));
|
||||
mStatusChecker.run();
|
||||
|
||||
mapboxMap.addOnMapClickListener(new MapboxMap.OnMapClickListener() {
|
||||
@Override
|
||||
public void onMapClick(@NonNull LatLng point) {
|
||||
|
||||
// When the user clicks on the map, we want to animate the marker to that
|
||||
// location.
|
||||
ValueAnimator markerAnimator = ObjectAnimator.ofObject(marker, "position",
|
||||
new LatLngEvaluator(), marker.getPosition(), point);
|
||||
markerAnimator.setDuration(2000);
|
||||
markerAnimator.start();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static class LatLngEvaluator implements TypeEvaluator<LatLng> {
|
||||
// Method is used to interpolate the marker animation.
|
||||
|
||||
private LatLng latLng = new LatLng();
|
||||
|
||||
@Override
|
||||
public LatLng evaluate(float fraction, LatLng startValue, LatLng endValue) {
|
||||
latLng.setLatitude(startValue.getLatitude()
|
||||
+ ((endValue.getLatitude() - startValue.getLatitude()) * fraction));
|
||||
latLng.setLongitude(startValue.getLongitude()
|
||||
+ ((endValue.getLongitude() - startValue.getLongitude()) * fraction));
|
||||
return latLng;
|
||||
}
|
||||
}
|
||||
|
||||
private void fetchTopCoords() {
|
||||
disposable.add(
|
||||
// coordinateService.getTopCoordinates()
|
||||
coordinateService.getOnlineCoordinates()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeWith(new DisposableSingleObserver<List<Coordinate>>() {
|
||||
@Override
|
||||
public void onSuccess(List<Coordinate> coordsList) {
|
||||
|
||||
|
||||
for (Coordinate element : coordsList) {
|
||||
String id = element.getUserId();
|
||||
Coordinate cord = coordsMap.get(id);
|
||||
|
||||
|
||||
Log.d("mapper", "a " + mapboxMap.getMarkerViewManager());
|
||||
Log.d("mapper", "b " + coordsMap.size());
|
||||
if (cord != null) {
|
||||
if (!cord.getLongitude().equals(element.getLongitude())
|
||||
) {
|
||||
Log.d("mapper", " cos sie zienilo ");
|
||||
Marker marker = mapboxMap.addMarker(new MarkerViewOptions()
|
||||
.title(cord.getUserId())
|
||||
.position(new LatLng(cord.getLatitude(),cord.getLongitude())));
|
||||
|
||||
ValueAnimator markerAnimator = ObjectAnimator.ofObject(marker, "position",
|
||||
new LatLngEvaluator(), marker.getPosition(), new LatLng(element.getLatitude(),element.getLongitude()));
|
||||
markerAnimator.setDuration(2000);
|
||||
markerAnimator.start();
|
||||
|
||||
|
||||
// coordsMap.replace(id,element);
|
||||
coordsMap.remove(id);
|
||||
coordsMap.put(id,element);
|
||||
} else if (!cord.getTimeStamp().equals(element.getTimeStamp())){
|
||||
Log.d("mapper", "update");
|
||||
Log.d("mapper", " "+cord.getTimeStamp());
|
||||
Log.d("mapper", " " + element.getTimeStamp());
|
||||
// coordsMap.replace(id,element);
|
||||
coordsMap.remove(id);
|
||||
coordsMap.put(id,element);
|
||||
}
|
||||
} else {
|
||||
coordsMap.put(id,element);
|
||||
mapboxMap.addMarker(new MarkerOptions().position(new LatLng(element.getLatitude(), element.getLongitude())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
Log.e("Error",e.toString());
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Add the mapView lifecycle to the activity's lifecycle methods
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mapView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
mapView.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
mapView.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mapView.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
mapView.onLowMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
mapView.onDestroy();
|
||||
mHandler.removeCallbacks(mStatusChecker);
|
||||
disposable.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
mapView.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*@Override
|
||||
public void startLocalizationService() {
|
||||
if ((ContextCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
|
||||
|
||||
if ((ActivityCompat.shouldShowRequestPermissionRationale(MapActivity.this, android.Manifest.permission.ACCESS_FINE_LOCATION))) {
|
||||
|
||||
} else {
|
||||
ActivityCompat.requestPermissions(MapActivity.this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION
|
||||
|
||||
},
|
||||
REQUEST_PERMISSIONS);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (isTutor) {
|
||||
Intent intent = new Intent(getApplicationContext(), BackgroundLocalizationService.class);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
startForegroundService(intent);
|
||||
} else {
|
||||
startService(intent);
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(), "Please enable the gps", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
return R.layout.activity_map;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getNavigationMenuItemId() {
|
||||
return R.id.nav_map;
|
||||
}
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.EditTextPreference;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.view.MenuItem;
|
||||
import com.uam.wmi.findmytutor.R;
|
||||
|
||||
|
||||
public class SettingsActivity extends AppCompatPreferenceActivity {
|
||||
private static final String TAG = SettingsActivity.class.getSimpleName();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
//getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
// load settings fragment
|
||||
getFragmentManager().beginTransaction().replace(android.R.id.content, new MainPreferenceFragment()).commit();
|
||||
}
|
||||
|
||||
public static class MainPreferenceFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.layout.pref_main);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
onBackPressed();
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private static void bindPreferenceSummaryToValue(Preference preference) {
|
||||
preference.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
|
||||
|
||||
sBindPreferenceSummaryToValueListener.onPreferenceChange(preference,
|
||||
PreferenceManager
|
||||
.getDefaultSharedPreferences(preference.getContext())
|
||||
.getString(preference.getKey(), ""));
|
||||
}
|
||||
|
||||
/**
|
||||
* A preference value change listener that updates the preference's summary
|
||||
* to reflect its new value.
|
||||
*/
|
||||
private static Preference.OnPreferenceChangeListener sBindPreferenceSummaryToValueListener = new Preference.OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
String stringValue = newValue.toString();
|
||||
|
||||
if (preference instanceof ListPreference) {
|
||||
// For list preferences, look up the correct display value in
|
||||
// the preference's 'entries' list.
|
||||
ListPreference listPreference = (ListPreference) preference;
|
||||
int index = listPreference.findIndexOfValue(stringValue);
|
||||
|
||||
// Set the summary to reflect the new value.
|
||||
preference.setSummary(
|
||||
index >= 0
|
||||
? listPreference.getEntries()[index]
|
||||
: null);
|
||||
|
||||
} else if (preference instanceof EditTextPreference) {
|
||||
if (preference.getKey().equals("key_gallery_name")) {
|
||||
// update the changed gallery name to summary filed
|
||||
preference.setSummary(stringValue);
|
||||
}
|
||||
} else {
|
||||
preference.setSummary(stringValue);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Email client intent to send support mail
|
||||
* Appends the necessary device information to email body
|
||||
* useful when providing support
|
||||
*/
|
||||
public static void sendFeedback(Context context) {
|
||||
String body = null;
|
||||
try {
|
||||
body = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName;
|
||||
body = "\n\n-----------------------------\nPlease don't remove this information\n Device OS: Android \n Device OS version: " +
|
||||
Build.VERSION.RELEASE + "\n App Version: " + body + "\n Device Brand: " + Build.BRAND +
|
||||
"\n Device Model: " + Build.MODEL + "\n Device Manufacturer: " + Build.MANUFACTURER;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
}
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setType("message/rfc822");
|
||||
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"team@findmytutor.com"});
|
||||
intent.putExtra(Intent.EXTRA_SUBJECT, "Query from android app");
|
||||
intent.putExtra(Intent.EXTRA_TEXT, body);
|
||||
context.startActivity(Intent.createChooser(intent, context.getString(R.string.choose_email_client)));
|
||||
}
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.uam.wmi.findmytutor.R;
|
||||
import com.uam.wmi.findmytutor.service.BackgroundLocalizationService;
|
||||
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.mapbox.mapboxsdk.Mapbox.getApplicationContext;
|
||||
|
||||
|
||||
public class SharingFragment extends PreferenceFragment {
|
||||
|
||||
@SuppressLint("ResourceType")
|
||||
@Override
|
||||
public void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.layout.pref_sharing);
|
||||
Preference manualStatus = findPreference("key_manual_status");
|
||||
Preference locationSharing = findPreference("key_sharing_enabled");
|
||||
|
||||
manualStatus.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
ListPreference lp = (ListPreference) findPreference("key_status_value");
|
||||
updateListPreference(lp, newValue, "manual_statuses");
|
||||
return true;
|
||||
});
|
||||
|
||||
locationSharing.setOnPreferenceChangeListener((buttonView, isChecked) -> {
|
||||
PrefUtils.storeEnableSharingLocalization(getApplicationContext(), (Boolean) isChecked);
|
||||
((MapActivity)getActivity()).handleBackgroundTaskLifeCycle();
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
public static SharingFragment newInstance() {
|
||||
return new SharingFragment();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = super.onCreateView(inflater, container, savedInstanceState);
|
||||
Objects.requireNonNull(view).setBackgroundColor(getResources().getColor(android.R.color.white));
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
protected void updateListPreference(ListPreference lp,Object newValue,String storageKey){
|
||||
CharSequence [] entries = lp.getEntries();
|
||||
Set<String> defaultEntries = new HashSet(Arrays.asList(entries));
|
||||
SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);
|
||||
Set <String> manualStatusSet = sharedPref.getStringSet(storageKey,defaultEntries);
|
||||
manualStatusSet.add((String) newValue);
|
||||
String [] manualStatusArr = manualStatusSet.toArray(new String[0]);
|
||||
Arrays.sort(manualStatusArr);
|
||||
setListPreferenceData(lp.getKey(),manualStatusArr);
|
||||
SharedPreferences.Editor editor = sharedPref.edit();
|
||||
editor.putStringSet(storageKey,manualStatusSet);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
protected void setListPreferenceData(String lp_name, String [] entries) {
|
||||
ListPreference lp = (ListPreference) findPreference(lp_name);
|
||||
lp.setEntries(entries);
|
||||
CharSequence[] entryValues = new CharSequence [entries.length];
|
||||
|
||||
for (int i = 0; i < entries.length; i++){
|
||||
entryValues[i] = Integer.toString(i+1);
|
||||
}
|
||||
|
||||
lp.setDefaultValue("1");
|
||||
lp.setEntryValues(entryValues);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
|
||||
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
||||
|
||||
public class StartupActivity extends AppCompatActivity {
|
||||
private static final int AUTHENTICATION_REQUEST_CODE = 666;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
if (PrefUtils.isLoggedIn(getApplicationContext())){
|
||||
Intent startupIntent = new Intent(this, MapActivity.class);
|
||||
startupIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(startupIntent);
|
||||
finish();
|
||||
} else {
|
||||
Intent loginIntent = new Intent(this, LoginActivity.class);
|
||||
startActivityForResult(loginIntent, AUTHENTICATION_REQUEST_CODE);
|
||||
}
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == AUTHENTICATION_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
|
||||
Intent startupIntent = new Intent(this, MapActivity.class);
|
||||
startupIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(startupIntent);
|
||||
}
|
||||
|
||||
finish();
|
||||
}
|
||||
}
|
@ -1,264 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.activity;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.CoordinatorLayout;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.DefaultItemAnimator;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.jakewharton.retrofit2.adapter.rxjava2.HttpException;
|
||||
import com.uam.wmi.findmytutor.R;
|
||||
import com.uam.wmi.findmytutor.adapters.TutorsListAdapter;
|
||||
|
||||
import com.uam.wmi.findmytutor.model.DutyHourViewModel;
|
||||
import com.uam.wmi.findmytutor.model.TutorTabViewModel;
|
||||
import com.uam.wmi.findmytutor.model.User;
|
||||
import com.uam.wmi.findmytutor.network.ApiClient;
|
||||
import com.uam.wmi.findmytutor.service.TutorTabApi;
|
||||
import com.uam.wmi.findmytutor.service.UserService;
|
||||
import com.uam.wmi.findmytutor.utils.MyDividerItemDecoration;
|
||||
import com.uam.wmi.findmytutor.utils.RecyclerTouchListener;
|
||||
import com.uam.wmi.findmytutor.utils.RestApiHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.observers.DisposableSingleObserver;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.ResponseBody;
|
||||
|
||||
import static com.mapbox.mapboxsdk.Mapbox.getApplicationContext;
|
||||
|
||||
public class UsersListFragment extends Fragment {
|
||||
private static final String TAG = UsersListFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.coordinator_layout)
|
||||
CoordinatorLayout coordinatorLayout;
|
||||
@BindView(R.id.recycler_view)
|
||||
RecyclerView recyclerView;
|
||||
@BindView(R.id.txt_empty_notes_view)
|
||||
TextView noNotesView;
|
||||
|
||||
private UserService userService;
|
||||
private TutorTabApi tutorTabService;
|
||||
private CompositeDisposable disposable = new CompositeDisposable();
|
||||
private TutorsListAdapter mAdapter;
|
||||
private List<User> tutorsList = new ArrayList<>();
|
||||
private List<User> tutorsFiltered = new ArrayList<>();
|
||||
|
||||
public UsersListFragment() {
|
||||
}
|
||||
|
||||
public static UsersListFragment newInstance() {
|
||||
return new UsersListFragment();
|
||||
}
|
||||
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
mAdapter = new TutorsListAdapter(getActivity().getApplicationContext(), tutorsFiltered);
|
||||
View view = inflater.inflate(R.layout.users_list, container, false);
|
||||
view.setBackgroundColor(getResources().getColor(android.R.color.white));
|
||||
return view;
|
||||
}
|
||||
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
ButterKnife.bind(this, view);
|
||||
|
||||
userService = ApiClient.getClient(getApplicationContext())
|
||||
.create(UserService.class);
|
||||
|
||||
tutorTabService = ApiClient.getClient(getActivity().getApplicationContext())
|
||||
.create(TutorTabApi.class);
|
||||
|
||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getActivity());
|
||||
recyclerView.setLayoutManager(mLayoutManager);
|
||||
recyclerView.setItemAnimator(new DefaultItemAnimator());
|
||||
recyclerView.addItemDecoration(new MyDividerItemDecoration(getActivity(), LinearLayoutManager.VERTICAL, 16));
|
||||
recyclerView.setAdapter(mAdapter);
|
||||
|
||||
fetchAllTutors();
|
||||
|
||||
recyclerView.addOnItemTouchListener(new RecyclerTouchListener(getActivity().getApplicationContext(),
|
||||
recyclerView, new RecyclerTouchListener.ClickListener() {
|
||||
@Override
|
||||
public void onClick(View view, final int position) {
|
||||
showNoteDialog(tutorsFiltered.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLongClick(View view, int position) {
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void searchUser(String textToSearch) {
|
||||
tutorsFiltered.clear();
|
||||
tutorsFiltered.addAll(Stream.of(tutorsList).filter(t ->
|
||||
t.toSearchAbleString().toLowerCase().contains(textToSearch.toLowerCase())).toList());
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private void showNoteDialog(final User user) {
|
||||
LayoutInflater layoutInflaterAndroid = LayoutInflater.from(getActivity().getApplicationContext());
|
||||
View view = layoutInflaterAndroid.inflate(R.layout.user_list_modal, null);
|
||||
|
||||
AlertDialog.Builder alertDialogBuilderUserInput = new AlertDialog.Builder(getActivity());
|
||||
alertDialogBuilderUserInput.setView(view);
|
||||
|
||||
alertDialogBuilderUserInput.setNegativeButton(R.string.cancel, (dialog, id) -> {
|
||||
// User cancelled the dialog
|
||||
});
|
||||
|
||||
TextView userName = view.findViewById(R.id.userName);
|
||||
ListView userDutyHours = view.findViewById(R.id.userDutyHours);
|
||||
TextView userDutyHoursTitle = view.findViewById(R.id.userDutyHoursTitle);
|
||||
TextView userNote = view.findViewById(R.id.userNote);
|
||||
TextView userRoom = view.findViewById(R.id.userRoom);
|
||||
TextView userEmail = view.findViewById(R.id.userEmail);
|
||||
TextView department = view.findViewById(R.id.userDepartment);
|
||||
|
||||
userName.setText(String.format("%s %s", user.getFirstName(), user.getLastName()));
|
||||
|
||||
disposable.add(
|
||||
tutorTabService.apiUsersTutorTabByTutorIdGet(user.getId())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeWith(new DisposableSingleObserver<TutorTabViewModel>() {
|
||||
@Override
|
||||
public void onSuccess(TutorTabViewModel tutorTabViewModel) {
|
||||
final AlertDialog alertDialog = alertDialogBuilderUserInput.create();
|
||||
List<String> dutyHoursList = Stream.of(tutorTabViewModel.getDutyHours())
|
||||
.map(DutyHourViewModel::getSummary).toList();
|
||||
|
||||
userRoom.setText(String.format("%s: %s", getString(R.string.userRoom), tutorTabViewModel.getRoom()));
|
||||
userEmail.setText(String.format("%s: %s", getString(R.string.userEmail), tutorTabViewModel.getEmailTutorTab()));
|
||||
userNote.setText(String.format("%s: %s", getString(R.string.userNote), tutorTabViewModel.getNote()));
|
||||
department.setText(String.format("%s: %s", getString(R.string.userDepartment), user.getDepartment()));
|
||||
userDutyHoursTitle.setText(String.format("%s:", getString(R.string.userDutyHoursHeader)));
|
||||
|
||||
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(getActivity(),
|
||||
android.R.layout.test_list_item, dutyHoursList);
|
||||
|
||||
userDutyHours.setAdapter(arrayAdapter);
|
||||
alertDialog.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
showError(e);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
private void fetchAllTutors() {
|
||||
disposable.add(
|
||||
userService.apiUsersGet()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.map(tutors -> {
|
||||
List<User> tutorsList = new ArrayList<>(tutors);
|
||||
|
||||
List<User> onlineTutors = Stream.of(tutorsList).filter(User::isIsOnline).toList();
|
||||
|
||||
List<User> activeNotOnlineTutors = Stream.of(tutorsList)
|
||||
.filter(t -> t.isIsActive() && !onlineTutors.contains(t)).toList();
|
||||
|
||||
List<User> notActiveTutors = Stream.of(tutorsList)
|
||||
.filterNot(User::isIsActive).toList();
|
||||
|
||||
Collections.sort(onlineTutors, this::sortByUserName);
|
||||
Collections.sort(activeNotOnlineTutors, this::sortByUserName);
|
||||
Collections.sort(notActiveTutors, this::sortByUserName);
|
||||
|
||||
List<User> sortedUserList = new ArrayList<>(onlineTutors);
|
||||
sortedUserList.addAll(activeNotOnlineTutors);
|
||||
sortedUserList.addAll(notActiveTutors);
|
||||
|
||||
return sortedUserList;
|
||||
})
|
||||
.subscribeWith(new DisposableSingleObserver<List<User>>() {
|
||||
@Override
|
||||
public void onSuccess(List<User> users) {
|
||||
tutorsList.clear();
|
||||
tutorsList.addAll(users);
|
||||
tutorsFiltered.addAll(users);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
toggleEmptyNotes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
showError(e);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
private int sortByUserName(User t1, User t2) {
|
||||
return t1.getFirstName().compareTo(t2.getFirstName());
|
||||
}
|
||||
|
||||
private void showError(Throwable e) {
|
||||
String message = e.toString();
|
||||
|
||||
if (e instanceof HttpException) {
|
||||
ResponseBody responseBody = ((HttpException) e).response().errorBody();
|
||||
message = RestApiHelper.getErrorMessage(responseBody);
|
||||
}
|
||||
|
||||
Snackbar.make(coordinatorLayout, message, Snackbar.LENGTH_LONG)
|
||||
.show();
|
||||
}
|
||||
|
||||
private void toggleEmptyNotes() {
|
||||
if (tutorsList.size() > 0) {
|
||||
noNotesView.setVisibility(View.GONE);
|
||||
} else {
|
||||
noNotesView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
disposable.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
fetchAllTutors();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
}
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.uam.wmi.findmytutor.R;
|
||||
import com.uam.wmi.findmytutor.model.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
|
||||
public class TutorsListAdapter extends RecyclerView.Adapter<TutorsListAdapter.MyViewHolder> {
|
||||
|
||||
private Context context;
|
||||
private List<User> tutorsList;
|
||||
|
||||
public TutorsListAdapter(Context context, List<User> tutors) {
|
||||
this.context = context;
|
||||
this.tutorsList = tutors;
|
||||
}
|
||||
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
@BindView(R.id.firstName)
|
||||
TextView firstName;
|
||||
|
||||
@BindView(R.id.lastName)
|
||||
TextView lastName;
|
||||
|
||||
@BindView(R.id.isOnline)
|
||||
TextView isOnline;
|
||||
|
||||
MyViewHolder(View view) {
|
||||
super(view);
|
||||
ButterKnife.bind(this, view);
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.tutor_list_row, parent, false);
|
||||
|
||||
return new MyViewHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
Drawable image = null;
|
||||
User tutor = tutorsList.get(position);
|
||||
|
||||
holder.firstName.setText(tutor.getFirstName());
|
||||
holder.lastName.setText(tutor.getLastName());
|
||||
|
||||
if(tutor.isIsOnline()) {
|
||||
image = context.getResources().getDrawable(R.drawable.online_user);
|
||||
} else {
|
||||
image = context.getResources().getDrawable(R.drawable.not_online);
|
||||
}
|
||||
|
||||
if(!tutor.isIsActive()){
|
||||
image = context.getResources().getDrawable(R.drawable.not_active_user);
|
||||
}
|
||||
|
||||
image.setBounds(0, 0, image.getIntrinsicWidth(), image.getIntrinsicHeight());
|
||||
holder.isOnline.setCompoundDrawables(image, null, null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return tutorsList.size();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
public class BaseResponse {
|
||||
String error;
|
||||
|
||||
public String getError() {
|
||||
return error;
|
||||
}
|
||||
}
|
@ -1,280 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
import android.util.Range;
|
||||
|
||||
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 {
|
||||
Range<Double> latitudeRange = Range.create(52.466709, 52.467007);
|
||||
Range<Double> longtitudeRange = Range.create(16.926159, 16.926976);
|
||||
|
||||
@SerializedName("coordinateId")
|
||||
private UUID coordinateId = null;
|
||||
|
||||
@SerializedName("latitude")
|
||||
private Double latitude;
|
||||
|
||||
@SerializedName("longitude")
|
||||
private Double longitude = null;
|
||||
|
||||
@SerializedName("altitude")
|
||||
private Double 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;
|
||||
|
||||
public Coordinate (Double latitude, Double longitude, Double altitude, String label, String userId) {
|
||||
//if (!latitudeRange.contains(latitude)) throw new IllegalArgumentException("Inappropriate latitude value" + latitude);
|
||||
//if (!longtitudeRange.contains(longitude)) throw new IllegalArgumentException("Inappropriate longitude value" + longitude);
|
||||
|
||||
this.latitude = latitude;
|
||||
this.longitude = longitude;
|
||||
this.altitude = altitude;
|
||||
this.label = label;
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Coordinate (Double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
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(Double latitude) {
|
||||
this.latitude = latitude;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get latitude
|
||||
* @return latitude
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public Double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(Double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public Coordinate longitude(Double longitude) {
|
||||
this.longitude = longitude;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get longitude
|
||||
* @return longitude
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public Double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(Double longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public Coordinate altitude(Double altitude) {
|
||||
this.altitude = altitude;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get altitude
|
||||
* @return altitude
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public Double getAltitude() {
|
||||
return altitude;
|
||||
}
|
||||
|
||||
public void setAltitude(Double 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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,192 +0,0 @@
|
||||
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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,127 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* DutyHourViewModel
|
||||
*/
|
||||
|
||||
public class DutyHourViewModel {
|
||||
@SerializedName("day")
|
||||
private String day = null;
|
||||
|
||||
@SerializedName("start")
|
||||
private String start = null;
|
||||
|
||||
@SerializedName("end")
|
||||
private String end = null;
|
||||
|
||||
public DutyHourViewModel 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 DutyHourViewModel 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 DutyHourViewModel 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;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DutyHourViewModel dutyHourViewModel = (DutyHourViewModel) o;
|
||||
return Objects.equals(this.day, dutyHourViewModel.day) &&
|
||||
Objects.equals(this.start, dutyHourViewModel.start) &&
|
||||
Objects.equals(this.end, dutyHourViewModel.end);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(day, start, end);
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return this.getDay() + " " + this.getStart() + " " + this.getEnd();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class DutyHourViewModel {\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("}");
|
||||
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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,20 +0,0 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,20 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class JwtToken {
|
||||
|
||||
@SerializedName("token")
|
||||
@Expose
|
||||
private String token;
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
}
|
@ -1,225 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* LdapUser
|
||||
*/
|
||||
|
||||
public class LdapUser extends BaseResponse {
|
||||
@SerializedName("login")
|
||||
private String login = null;
|
||||
|
||||
@SerializedName("password")
|
||||
private String password = null;
|
||||
|
||||
@SerializedName("department")
|
||||
private String department = null;
|
||||
|
||||
@SerializedName("title")
|
||||
private String title = null;
|
||||
|
||||
@SerializedName("firstName")
|
||||
private String firstName = null;
|
||||
|
||||
@SerializedName("lastName")
|
||||
private String lastName = null;
|
||||
|
||||
@SerializedName("email")
|
||||
private String email = null;
|
||||
|
||||
public LdapUser(String login, String password, String department, String title, String firstName, String lastName, String email) {
|
||||
this.login = login;
|
||||
this.password = password;
|
||||
this.department = department;
|
||||
this.title = title;
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
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;
|
||||
}
|
||||
|
||||
public void setLogin(String login) {
|
||||
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;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public LdapUser 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 LdapUser 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 LdapUser 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 LdapUser 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 LdapUser 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;
|
||||
}
|
||||
|
||||
|
||||
@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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
/*
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
@ -1,101 +0,0 @@
|
||||
|
||||
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<ReturnedTutors> 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<ReturnedTutors> getResults() {
|
||||
return results;
|
||||
}
|
||||
|
||||
public void setResults(List<ReturnedTutors> 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,89 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.uam.wmi.findmytutor.model.Results;
|
||||
|
||||
public class PagedResultReturnedTutors extends BaseResponse{
|
||||
|
||||
@SerializedName("results")
|
||||
@Expose
|
||||
private Results results;
|
||||
@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 Results getResults() {
|
||||
return results;
|
||||
}
|
||||
|
||||
public void setResults(Results 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,214 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
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")
|
||||
@Expose
|
||||
private List<UserResponseModel> results = null;
|
||||
|
||||
@SerializedName("currentPage")
|
||||
@Expose
|
||||
private Integer currentPage = null;
|
||||
|
||||
@SerializedName("pageCount")
|
||||
@Expose
|
||||
private Integer pageCount = null;
|
||||
|
||||
@SerializedName("pageSize")
|
||||
@Expose
|
||||
private Integer pageSize = null;
|
||||
|
||||
@SerializedName("rowCount")
|
||||
@Expose
|
||||
private Integer rowCount = null;
|
||||
|
||||
@SerializedName("firstRowOnPage")
|
||||
@Expose
|
||||
private Integer firstRowOnPage = null;
|
||||
|
||||
@SerializedName("lastRowOnPage")
|
||||
@Expose
|
||||
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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,164 +0,0 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class Results extends BaseResponse {
|
||||
|
||||
@SerializedName("tutors")
|
||||
@Expose
|
||||
private List<Tutor> tutors = null;
|
||||
@SerializedName("blacklistersTutors")
|
||||
@Expose
|
||||
private List<Object> blacklistersTutors = null;
|
||||
|
||||
public List<Tutor> getTutors() {
|
||||
return tutors;
|
||||
}
|
||||
|
||||
public void setTutors(List<Tutor> tutors) {
|
||||
this.tutors = tutors;
|
||||
}
|
||||
|
||||
public List<Object> getBlacklistersTutors() {
|
||||
return blacklistersTutors;
|
||||
}
|
||||
|
||||
public void setBlacklistersTutors(List<Object> blacklistersTutors) {
|
||||
this.blacklistersTutors = blacklistersTutors;
|
||||
}
|
||||
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class ReturnedTutors {
|
||||
|
||||
@SerializedName("id")
|
||||
@Expose
|
||||
private String id;
|
||||
@SerializedName("isOnline")
|
||||
@Expose
|
||||
private Boolean isOnline;
|
||||
@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 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;
|
||||
}
|
||||
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,109 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class Tutor {
|
||||
|
||||
@SerializedName("id")
|
||||
@Expose
|
||||
private String id;
|
||||
@SerializedName("isOnline")
|
||||
@Expose
|
||||
private Boolean isOnline;
|
||||
@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 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;
|
||||
}
|
||||
|
||||
}
|
@ -1,204 +0,0 @@
|
||||
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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,202 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* TutorTabViewModel
|
||||
*/
|
||||
|
||||
public class TutorTabViewModel {
|
||||
@SerializedName("tutorTabId")
|
||||
private UUID tutorTabId = null;
|
||||
|
||||
@SerializedName("userId")
|
||||
private String userId = null;
|
||||
|
||||
@SerializedName("room")
|
||||
private String room = "";
|
||||
|
||||
@SerializedName("emailTutorTab")
|
||||
private String emailTutorTab = "";
|
||||
|
||||
@SerializedName("note")
|
||||
private String note = "";
|
||||
|
||||
@SerializedName("dutyHours")
|
||||
private List<DutyHourViewModel> dutyHours = null;
|
||||
|
||||
public TutorTabViewModel 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 TutorTabViewModel userId(String userId) {
|
||||
this.userId = userId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get userId
|
||||
* @return userId
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public TutorTabViewModel 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 TutorTabViewModel 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 TutorTabViewModel note(String note) {
|
||||
this.note = note;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public String getNote() {
|
||||
if(note == null)
|
||||
return "";
|
||||
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public TutorTabViewModel dutyHours(List<DutyHourViewModel> dutyHours) {
|
||||
this.dutyHours = dutyHours;
|
||||
return this;
|
||||
}
|
||||
|
||||
public TutorTabViewModel addDutyHoursItem(DutyHourViewModel dutyHoursItem) {
|
||||
if (this.dutyHours == null) {
|
||||
this.dutyHours = new ArrayList<DutyHourViewModel>();
|
||||
}
|
||||
this.dutyHours.add(dutyHoursItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get dutyHours
|
||||
* @return dutyHours
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public List<DutyHourViewModel> getDutyHours() {
|
||||
return dutyHours;
|
||||
}
|
||||
|
||||
public void setDutyHours(List<DutyHourViewModel> dutyHours) {
|
||||
this.dutyHours = dutyHours;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
TutorTabViewModel tutorTabViewModel = (TutorTabViewModel) o;
|
||||
return Objects.equals(this.tutorTabId, tutorTabViewModel.tutorTabId) &&
|
||||
Objects.equals(this.userId, tutorTabViewModel.userId) &&
|
||||
Objects.equals(this.room, tutorTabViewModel.room) &&
|
||||
Objects.equals(this.emailTutorTab, tutorTabViewModel.emailTutorTab) &&
|
||||
Objects.equals(this.note, tutorTabViewModel.note) &&
|
||||
Objects.equals(this.dutyHours, tutorTabViewModel.dutyHours);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(tutorTabId, userId, room, emailTutorTab, note, dutyHours);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class TutorTabViewModel {\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(" note: ").append(toIndentedString(note)).append("\n");
|
||||
sb.append(" dutyHours: ").append(toIndentedString(dutyHours)).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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,764 +0,0 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
public String toSearchAbleString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getFirstName()).append(" ");
|
||||
sb.append(getLastName()).append(" ");
|
||||
sb.append(getDepartment()).append(" ");
|
||||
sb.append(getEmail());
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,393 +0,0 @@
|
||||
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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,94 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.model;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* ValidateUser
|
||||
*/
|
||||
|
||||
public class ValidateUser extends BaseResponse {
|
||||
@SerializedName("login")
|
||||
private String login = null;
|
||||
|
||||
@SerializedName("password")
|
||||
private String password = null;;
|
||||
|
||||
public ValidateUser(String login, String password) {
|
||||
this.login = login;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public ValidateUser login(String login) {
|
||||
this.login = login;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get login
|
||||
* @return login
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getLogin() {
|
||||
return login;
|
||||
}
|
||||
|
||||
public void setLogin(String login) {
|
||||
this.login = login;
|
||||
}
|
||||
|
||||
public ValidateUser password(String password) {
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ValidateUser ValidateUser = (ValidateUser) o;
|
||||
return Objects.equals(this.login, ValidateUser.login) &&
|
||||
Objects.equals(this.password, ValidateUser.password);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(login, password);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ValidateUser {\n");
|
||||
|
||||
sb.append(" login: ").append(toIndentedString(login)).append("\n");
|
||||
sb.append(" password: ").append(toIndentedString(password)).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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,76 +0,0 @@
|
||||
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)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.addCallAdapterFactory(RxJava2CallAdapterFactory.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", "Bearer " + PrefUtils.getApiKey(context));
|
||||
}
|
||||
|
||||
Request request = requestBuilder.build();
|
||||
return chain.proceed(request);
|
||||
}
|
||||
});
|
||||
|
||||
okHttpClient = httpClient.build();
|
||||
}
|
||||
};
|
@ -1,55 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.network;
|
||||
|
||||
import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.logging.HttpLoggingInterceptor;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
||||
public class RetrofitClientInstance {
|
||||
|
||||
private static final String BASE_URL = "https://s416084.projektstudencki.pl/develop/";
|
||||
|
||||
private static Retrofit.Builder builder
|
||||
= new Retrofit.Builder()
|
||||
.baseUrl(BASE_URL)
|
||||
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
|
||||
.addConverterFactory(GsonConverterFactory.create());
|
||||
|
||||
private static Retrofit retrofit = builder.build();
|
||||
|
||||
private static OkHttpClient.Builder httpClient
|
||||
= new OkHttpClient.Builder();
|
||||
|
||||
private static HttpLoggingInterceptor logging
|
||||
= new HttpLoggingInterceptor()
|
||||
.setLevel(HttpLoggingInterceptor.Level.BASIC);
|
||||
|
||||
public static <S> S createService(Class<S> serviceClass) {
|
||||
if (!httpClient.interceptors().contains(logging)) {
|
||||
httpClient.addInterceptor(logging);
|
||||
builder.client(httpClient.build());
|
||||
retrofit = builder.build();
|
||||
}
|
||||
return retrofit.create(serviceClass);
|
||||
}
|
||||
|
||||
public static <S> S createService(Class<S> serviceClass, final String token) {
|
||||
if (token != null) {
|
||||
httpClient.interceptors().clear();
|
||||
httpClient.addInterceptor(chain -> {
|
||||
Request original = chain.request();
|
||||
Request.Builder builder1 = original.newBuilder()
|
||||
.header("Authorization", "Bearer " + token);
|
||||
Request request = builder1.build();
|
||||
return chain.proceed(request);
|
||||
});
|
||||
builder.client(httpClient.build());
|
||||
retrofit = builder.build();
|
||||
}
|
||||
return retrofit.create(serviceClass);
|
||||
}
|
||||
}
|
||||
|
@ -1,324 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.service;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Color;
|
||||
import android.location.Criteria;
|
||||
import android.location.Location;
|
||||
import android.location.LocationManager;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.IBinder;
|
||||
import android.support.annotation.RequiresApi;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.util.Log;
|
||||
|
||||
import com.jakewharton.retrofit2.adapter.rxjava2.HttpException;
|
||||
import com.uam.wmi.findmytutor.model.Coordinate;
|
||||
import com.uam.wmi.findmytutor.network.ApiClient;
|
||||
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
||||
import com.uam.wmi.findmytutor.utils.RestApiHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.observers.DisposableSingleObserver;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.ResponseBody;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class BackgroundLocalizationService extends Service {
|
||||
|
||||
private static final String TAG = "MyLocationService";
|
||||
private static final int LOCATION_INTERVAL = 1000;
|
||||
private static final float LOCATION_DISTANCE = 5f;
|
||||
public static String str_receiver = "background.location.broadcast";
|
||||
private static long notify_interval = 10000;
|
||||
Location mLastLocation;
|
||||
|
||||
ArrayList<String> providers = new ArrayList<String>();
|
||||
LocationListener[] mLocationListeners;
|
||||
|
||||
private LocationManager mLocationManager = null;
|
||||
private Handler mHandler = new Handler();
|
||||
private HandlerThread mHandlerThread = null;
|
||||
private Runnable mStatusChecker;
|
||||
|
||||
public BackgroundLocalizationService() {
|
||||
providers.add(LocationManager.GPS_PROVIDER);
|
||||
providers.add(LocationManager.NETWORK_PROVIDER);
|
||||
providers.add(LocationManager.PASSIVE_PROVIDER);
|
||||
|
||||
mLocationListeners = new LocationListener[]{
|
||||
new LocationListener(LocationManager.GPS_PROVIDER),
|
||||
new LocationListener(LocationManager.NETWORK_PROVIDER),
|
||||
new LocationListener(LocationManager.PASSIVE_PROVIDER)
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent arg0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
Log.e(TAG, "onStartCommand");
|
||||
super.onStartCommand(intent, flags, startId);
|
||||
|
||||
//call startForeground first
|
||||
boolean stopService = false;
|
||||
|
||||
if (intent != null) {
|
||||
stopService = intent.getBooleanExtra("request_stop", false);
|
||||
}
|
||||
if (stopService) {
|
||||
stopForeground(true);
|
||||
stopSelf();
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
Log.e(TAG, "onCreate");
|
||||
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
startMyOwnForeground();
|
||||
else {
|
||||
Notification notification = new NotificationCompat.Builder(this, "NOTIFICATION_CHANNEL")
|
||||
.setContentText("Content").build();
|
||||
startForeground(1001, notification);
|
||||
}
|
||||
|
||||
initializeLocationManager();
|
||||
|
||||
Integer providerIndex = 0;
|
||||
|
||||
for (LocationListener listener : mLocationListeners) {
|
||||
try {
|
||||
mLocationManager.requestLocationUpdates(
|
||||
providers.get(providerIndex),
|
||||
LOCATION_INTERVAL,
|
||||
LOCATION_DISTANCE,
|
||||
listener
|
||||
);
|
||||
|
||||
} catch (java.lang.SecurityException ex) {
|
||||
Log.i(TAG, "fail to request location update, ignore", ex);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
Log.d(TAG, "network provider does not exist, " + ex.getMessage());
|
||||
}
|
||||
|
||||
providerIndex++;
|
||||
}
|
||||
|
||||
mStatusChecker = () -> {
|
||||
try {
|
||||
fn_getlocation();
|
||||
} finally {
|
||||
mHandler.postDelayed(mStatusChecker, notify_interval);
|
||||
}
|
||||
};
|
||||
|
||||
AsyncTask.execute(mStatusChecker);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
private void startMyOwnForeground() {
|
||||
|
||||
String NOTIFICATION_CHANNEL_ID = "com.example.simpleapp";
|
||||
String channelName = "My Background Service";
|
||||
NotificationChannel chan = new NotificationChannel(NOTIFICATION_CHANNEL_ID, channelName, NotificationManager.IMPORTANCE_NONE);
|
||||
chan.setLightColor(Color.BLUE);
|
||||
chan.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||
NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
assert manager != null;
|
||||
manager.createNotificationChannel(chan);
|
||||
|
||||
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID);
|
||||
Notification notification = notificationBuilder.setOngoing(true)
|
||||
.setContentTitle("App is running in background")
|
||||
.setPriority(NotificationManager.IMPORTANCE_MIN)
|
||||
.setCategory(Notification.CATEGORY_SERVICE)
|
||||
.build();
|
||||
startForeground(2, notification);
|
||||
}
|
||||
|
||||
private void fn_getlocation() {
|
||||
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
// TODO: Consider calling
|
||||
// ActivityCompat#requestPermissions
|
||||
// here to request the missing permissions, and then overriding
|
||||
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
|
||||
// int[] grantResults)
|
||||
// to handle the case where the user grants the permission. See the documentation
|
||||
// for ActivityCompat#requestPermissions for more details.
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> providers1 = mLocationManager.getProviders(true);
|
||||
Location bestLocation = null;
|
||||
|
||||
|
||||
for (String provider : providers1) {
|
||||
Location location = mLocationManager.getLastKnownLocation(provider);
|
||||
|
||||
if (location == null) {
|
||||
continue;
|
||||
}
|
||||
if (bestLocation == null || location.getAccuracy() < bestLocation.getAccuracy()) {
|
||||
bestLocation = location;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Log.e("Best localization:", String.valueOf(bestLocation));
|
||||
|
||||
if (bestLocation != null)
|
||||
fn_update(bestLocation);
|
||||
}
|
||||
|
||||
private void fn_update(Location location) {
|
||||
new Task(location).execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
Log.e(TAG, "onDestroy");
|
||||
|
||||
super.onDestroy();
|
||||
mHandler.removeCallbacks(mStatusChecker);
|
||||
|
||||
|
||||
if (mLocationManager != null) {
|
||||
for (LocationListener listener : mLocationListeners) {
|
||||
try {
|
||||
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
return;
|
||||
}
|
||||
mLocationManager.removeUpdates(listener);
|
||||
Log.i(TAG, "Removed");
|
||||
|
||||
} catch (Exception ex) {
|
||||
Log.i(TAG, "fail to remove location listener, ignore", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeLocationManager() {
|
||||
Log.e(TAG, "initializeLocationManager - LOCATION_INTERVAL: " + LOCATION_INTERVAL + " LOCATION_DISTANCE: " + LOCATION_DISTANCE);
|
||||
|
||||
if (mLocationManager == null) {
|
||||
mLocationManager = (LocationManager) getApplicationContext().getSystemService(Context.LOCATION_SERVICE);
|
||||
}
|
||||
}
|
||||
|
||||
private class LocationListener implements android.location.LocationListener {
|
||||
|
||||
public LocationListener(String provider) {
|
||||
Log.e(TAG, "LocationListener " + provider);
|
||||
mLastLocation = new Location(provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(Location location) {
|
||||
Log.e(TAG, "onLocationChanged: " + location);
|
||||
mLastLocation.set(location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderDisabled(String provider) {
|
||||
Log.e(TAG, "onProviderDisabled: " + provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderEnabled(String provider) {
|
||||
Log.e(TAG, "onProviderEnabled: " + provider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(String provider, int status, Bundle extras) {
|
||||
Log.e(TAG, "onStatusChanged: " + provider);
|
||||
}
|
||||
}
|
||||
|
||||
private class Task extends AsyncTask {
|
||||
private Double latitude;
|
||||
private Double longitude;
|
||||
private Double altitude;
|
||||
|
||||
private CompositeDisposable disposable = new CompositeDisposable();
|
||||
private CoordinateService coordinateService = ApiClient.getClient(getApplicationContext())
|
||||
.create(CoordinateService.class);
|
||||
|
||||
private Task(Location location) {
|
||||
latitude = location.getLatitude();
|
||||
longitude = location.getLongitude();
|
||||
altitude = location.getAltitude();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object doInBackground(Object[] objects) {
|
||||
|
||||
try {
|
||||
Coordinate coordinate = new Coordinate(
|
||||
latitude,
|
||||
longitude,
|
||||
altitude,
|
||||
PrefUtils.getUserFirstName(getApplicationContext()) + " " + PrefUtils.getUserLastName(getApplicationContext()),
|
||||
PrefUtils.getUserId(getApplicationContext())
|
||||
);
|
||||
|
||||
disposable.add(
|
||||
coordinateService
|
||||
.postCoordinate(coordinate)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeWith(new DisposableSingleObserver<Coordinate>() {
|
||||
@SuppressLint("LongLogTag")
|
||||
@Override
|
||||
public void onSuccess(Coordinate coord) {
|
||||
Log.e("CoordinateService onSuccess", String.valueOf(coord));
|
||||
}
|
||||
|
||||
@SuppressLint("LongLogTag")
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
Log.e("CoordinateService onError", e.getMessage());
|
||||
|
||||
if (e instanceof HttpException) {
|
||||
ResponseBody responseBody = ((HttpException) e).response().errorBody();
|
||||
Log.e("CoordinateService onError", RestApiHelper.getErrorMessage(responseBody));
|
||||
|
||||
}
|
||||
}
|
||||
}));
|
||||
} catch (IllegalArgumentException e) {
|
||||
Timber.e(String.valueOf(e));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.service;
|
||||
|
||||
import com.uam.wmi.findmytutor.model.Coordinate;
|
||||
import java.util.List;
|
||||
|
||||
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 CoordinateService {
|
||||
|
||||
@GET("api/coordinates")
|
||||
Single<List<Coordinate>> getAllCoordinates();
|
||||
|
||||
@GET("api/coordinates/{id}")
|
||||
Single<Coordinate> getCoordinatesById(@Path("id") String id);
|
||||
|
||||
@GET("api/coordinates/user/{userId}")
|
||||
Single<List<Coordinate>> getCoordinatesByUserId(@Path("userId") String userId);
|
||||
|
||||
@GET("api/coordinates/userTop/{userId}")
|
||||
Single<List<Coordinate>> getTopCoordinatesByUserId(@Path("userId") String userId);
|
||||
|
||||
@GET("api/coordinates/top")
|
||||
Single<List<Coordinate>> getTopCoordinates();
|
||||
|
||||
@GET("api/coordinates/top/online")
|
||||
Single<List<Coordinate>> getOnlineCoordinates();
|
||||
|
||||
@POST("api/coordinates")
|
||||
Single <Coordinate> postCoordinate(@Body Coordinate coordinate);
|
||||
|
||||
@PUT("api/coordinates/{id}")
|
||||
Single<Coordinate> putCoordinatesById(@Path("id") String id);
|
||||
|
||||
@DELETE("api/coordinates/{id}")
|
||||
Single<Coordinate> deleteCoordinatesById(@Path("id") String id);
|
||||
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.service;
|
||||
|
||||
import com.uam.wmi.findmytutor.model.JwtToken;
|
||||
import com.uam.wmi.findmytutor.model.LdapUser;
|
||||
import com.uam.wmi.findmytutor.model.ValidateUser;
|
||||
|
||||
import io.reactivex.Single;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Path;
|
||||
|
||||
public interface LdapService {
|
||||
|
||||
@POST("api/ldap/fakeValidate")
|
||||
Single<JwtToken> fakeValidate(@Body LdapUser user);
|
||||
|
||||
@POST("api/ldap/validate")
|
||||
Single<JwtToken> validate(@Body ValidateUser user);
|
||||
|
||||
@GET("api/ldap/getUserData/{login}")
|
||||
Single<LdapUser> getUserDataByLogin(@Path("login") String userLogin);
|
||||
|
||||
@GET("api/ldap/getUserData/email/{email}")
|
||||
Single<LdapUser> getUserDataByMail(@Path("email") String userMail);
|
||||
}
|
||||
|
@ -1,58 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.service;
|
||||
|
||||
|
||||
import com.uam.wmi.findmytutor.model.TutorTabViewModel;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.Single;
|
||||
import retrofit2.http.*;
|
||||
|
||||
|
||||
public interface TutorTabApi {
|
||||
/**
|
||||
* Scrap all tutor tabs
|
||||
* With this method, you can initialize tutor tabs scrapper. The effect will be: - all tutor tabs will be overwritten with data from the WMI source
|
||||
* @param tutorId (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@POST("api/users/scrapTutorTab/{tutorId}")
|
||||
Observable<Void> apiUsersScrapTutorTabByTutorIdPost(
|
||||
@retrofit2.http.Path("tutorId") String tutorId
|
||||
);
|
||||
|
||||
/**
|
||||
* Scrap all tutor tabs
|
||||
* With this method, you can initialize tutor tabs scrapper. The effect will be: - all tutor tabs will be overwritten with data from the WMI source
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@POST("api/users/scrapTutorTab")
|
||||
Observable<Void> apiUsersScrapTutorTabPost();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param tutorId (required)
|
||||
* @return Call<TutorTabViewModel>
|
||||
*/
|
||||
@GET("api/users/tutorTab/{tutorId}")
|
||||
Single<TutorTabViewModel> apiUsersTutorTabByTutorIdGet(
|
||||
@retrofit2.http.Path("tutorId") String tutorId
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param tutorId (required)
|
||||
* @param tutorTab (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({
|
||||
"Content-Type:application/json"
|
||||
})
|
||||
@PUT("api/users/tutorTab/{tutorId}")
|
||||
Observable<Void> apiUsersTutorTabByTutorIdPut(
|
||||
@retrofit2.http.Path("tutorId") String tutorId, @retrofit2.http.Body TutorTabViewModel tutorTab
|
||||
);
|
||||
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.service;
|
||||
|
||||
import com.uam.wmi.findmytutor.model.IsUsingListBool;
|
||||
import com.uam.wmi.findmytutor.model.PagedResultReturnedTutors;
|
||||
import com.uam.wmi.findmytutor.model.ReturnedTutors;
|
||||
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.Observable;
|
||||
import io.reactivex.Single;
|
||||
import retrofit2.Response;
|
||||
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();
|
||||
|
||||
@GET("api/users")
|
||||
Single <List<User>> apiUsersGet();
|
||||
|
||||
@POST("api/users")
|
||||
Completable createUser(@Body User user);
|
||||
|
||||
@GET("api/users/page/{pageNum}")
|
||||
Single <PagedResultReturnedTutors> getPagedUsers(@Path("pageNum") String pageNum );
|
||||
|
||||
@GET("api/users/tutors/page/{pageNum}")
|
||||
Single <PagedResultReturnedTutors> getPagedTutors(@Path("pageNum") Integer pageNum );
|
||||
|
||||
@GET("api/users/students/page/{pageNum}")
|
||||
Single<PagedResultReturnedTutors> 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);
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.utils;
|
||||
|
||||
public enum ActiveFragment {
|
||||
USER_LIST,
|
||||
SHARED_PREFERENCES,
|
||||
NONE
|
||||
}
|
||||
|
@ -1,98 +0,0 @@
|
||||
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, top, right, 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()));
|
||||
}
|
||||
}
|
@ -1,121 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
|
||||
import com.auth0.android.jwt.Claim;
|
||||
import com.auth0.android.jwt.JWT;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class PrefUtils {
|
||||
|
||||
public PrefUtils() {
|
||||
}
|
||||
|
||||
public static SharedPreferences getSharedPreferences(Context context) {
|
||||
return context.getSharedPreferences("APP_PREF", Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
|
||||
public static void getAllKeys(Context context){
|
||||
Map<String,?> keys = getSharedPreferences(context).getAll();
|
||||
|
||||
for(Map.Entry<String,?> entry : keys.entrySet()){
|
||||
Log.d("map values",entry.getKey() + ": " + entry.getValue().toString());
|
||||
}
|
||||
}
|
||||
|
||||
public static void cleanUserLocalStorage(Context context) {
|
||||
SharedPreferences preferences = getSharedPreferences(context);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.clear().apply();
|
||||
}
|
||||
|
||||
public static void storeApiKey(Context context, String apiKey) {
|
||||
SharedPreferences.Editor editor = getSharedPreferences(context).edit();
|
||||
editor.putString("API_KEY", apiKey);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static String getApiKey(Context context) {
|
||||
return getSharedPreferences(context).getString("API_KEY", null);
|
||||
}
|
||||
|
||||
public static void storeUserId(Context applicationContext, String userId) {
|
||||
SharedPreferences.Editor editor = getSharedPreferences(applicationContext).edit();
|
||||
editor.putString("USER_ID", userId);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static String getUserId(Context context) {
|
||||
return getSharedPreferences(context).getString("USER_ID", null);
|
||||
}
|
||||
|
||||
|
||||
public static String getUserStatus(Context context) {
|
||||
return getSharedPreferences(context).getString("USER_STATUS", "Android");
|
||||
}
|
||||
|
||||
public static void storeIsTutor(Context applicationContext, boolean isTutor) {
|
||||
SharedPreferences.Editor editor = getSharedPreferences(applicationContext).edit();
|
||||
editor.putBoolean("IS_TUTOR", isTutor);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static boolean getIsTutor(Context context) {
|
||||
return getSharedPreferences(context).getBoolean("IS_TUTOR", false);
|
||||
}
|
||||
|
||||
public static void storeIsLoggedIn(Context applicationContext, boolean isLogged) {
|
||||
SharedPreferences.Editor editor = getSharedPreferences(applicationContext).edit();
|
||||
editor.putBoolean("IS_LOGGED_IN", isLogged);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static boolean isLoggedIn(Context context) {
|
||||
return getSharedPreferences(context).getBoolean("IS_LOGGED_IN", false);
|
||||
}
|
||||
|
||||
public static boolean isEnableSharingLocalization(Context context) {
|
||||
return getSharedPreferences(context).getBoolean("IS_ENABLE_SHARING_LOCALIZATION", false);
|
||||
}
|
||||
|
||||
public static void storeEnableSharingLocalization(Context context,Boolean isChecked) {
|
||||
SharedPreferences.Editor editor = getSharedPreferences(context).edit();
|
||||
editor.putBoolean("IS_ENABLE_SHARING_LOCALIZATION", isChecked);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static void storeUserFirstName(Context context, String userName) {
|
||||
SharedPreferences.Editor editor = getSharedPreferences(context).edit();
|
||||
editor.putString("USER_FIRST_NAME", userName);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static String getUserFirstName(Context context) {
|
||||
return getSharedPreferences(context).getString("USER_FIRST_NAME", null);
|
||||
}
|
||||
|
||||
public static void storeUserLastName(Context context, String userLastName) {
|
||||
SharedPreferences.Editor editor = getSharedPreferences(context).edit();
|
||||
editor.putString("USER_LAST_NAME", userLastName);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static String getUserLastName(Context context) {
|
||||
return getSharedPreferences(context).getString("USER_LAST_NAME", null);
|
||||
}
|
||||
|
||||
public static void storeUserName(Context context, String userName) {
|
||||
SharedPreferences.Editor editor = getSharedPreferences(context).edit();
|
||||
editor.putString("USER_NAME", userName);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static String getUserName(Context context) {
|
||||
return getSharedPreferences(context).getString("USER_NAME", null);
|
||||
}
|
||||
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* Created by ravi on 21/02/18.
|
||||
*/
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
package com.uam.wmi.findmytutor.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Color;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.jakewharton.retrofit2.adapter.rxjava2.HttpException;
|
||||
import com.uam.wmi.findmytutor.R;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import okhttp3.ResponseBody;
|
||||
|
||||
public class RestApiHelper extends Activity {
|
||||
|
||||
public RestApiHelper() {
|
||||
}
|
||||
|
||||
public static String getErrorMessage(ResponseBody responseBody) {
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(responseBody.string());
|
||||
return jsonObject.getString("message");
|
||||
} catch (Exception e) {
|
||||
return e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void showError(Throwable e) {
|
||||
String message = e.toString();
|
||||
|
||||
if (e instanceof HttpException) {
|
||||
ResponseBody responseBody = ((HttpException) e).response().errorBody();
|
||||
message = RestApiHelper.getErrorMessage(responseBody);
|
||||
}
|
||||
|
||||
Snackbar snackbar = Snackbar.make(findViewById(R.id.activity_content), message, Snackbar.LENGTH_LONG);
|
||||
View sbView = snackbar.getView();
|
||||
TextView textView = sbView.findViewById(android.support.design.R.id.snackbar_text);
|
||||
textView.setTextColor(Color.BLUE);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<?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.
Before Width: | Height: | Size: 370 B |
Binary file not shown.
Before Width: | Height: | Size: 349 B |
Binary file not shown.
Before Width: | Height: | Size: 403 B |
@ -1,12 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
|
||||
</vector>
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" />
|
||||
</vector>
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" />
|
||||
</vector>
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
|
||||
</vector>
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" />
|
||||
</vector>
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" />
|
||||
</vector>
|
@ -1,34 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1" />
|
||||
</vector>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<solid android:color="@android:color/darker_gray" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
@ -1,170 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillColor="#26A69A"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
</vector>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M15.5 14h-0.79l-0.28-0.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-0.59 4.23-1.57l0.27 0.28 v0.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
|
||||
<path
|
||||
android:pathData="M0 0h24v24H0z" />
|
||||
</vector>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
|
||||
<path
|
||||
android:pathData="M0 0h20v20H0V0z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M15.95 10.78c0.03-0.25 0.05 -0.51 0.05 -0.78s-0.02-0.53-0.06-0.78l1.69-1.32c0.15-0.12 0.19 -0.34 0.1 -0.51l-1.6-2.77c-0.1-0.18-0.31-0.24-0.49-0.18l-1.99 0.8 c-0.42-0.32-0.86-0.58-1.35-0.78L12 2.34c-0.03-0.2-0.2-0.34-0.4-0.34H8.4c-0.2 0-0.36 0.14 -0.39 0.34 l-0.3 2.12c-0.49 0.2 -0.94 0.47 -1.35 0.78 l-1.99-0.8c-0.18-0.07-0.39 0-0.49 0.18 l-1.6 2.77c-0.1 0.18 -0.06 0.39 0.1 0.51 l1.69 1.32c-0.04 0.25 -0.07 0.52 -0.07 0.78 s0.02 0.53 0.06 0.78 L2.37 12.1c-0.15 0.12 -0.19 0.34 -0.1 0.51 l1.6 2.77c0.1 0.18 0.31 0.24 0.49 0.18 l1.99-0.8c0.42 0.32 0.86 0.58 1.35 0.78 l0.3 2.12c0.04 0.2 0.2 0.34 0.4 0.34 h3.2c0.2 0 0.37-0.14 0.39 -0.34l0.3-2.12c0.49-0.2 0.94 -0.47 1.35-0.78l1.99 0.8 c0.18 0.07 0.39 0 0.49-0.18l1.6-2.77c0.1-0.18 0.06 -0.39-0.1-0.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z" />
|
||||
</vector>
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
|
||||
<path android:pathData="M0 0h20v20H0V0z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M15.95 10.78c0.03-0.25 0.05 -0.51 0.05 -0.78s-0.02-0.53-0.06-0.78l1.69-1.32c0.15-0.12 0.19 -0.34 0.1 -0.51l-1.6-2.77c-0.1-0.18-0.31-0.24-0.49-0.18l-1.99 0.8 c-0.42-0.32-0.86-0.58-1.35-0.78L12 2.34c-0.03-0.2-0.2-0.34-0.4-0.34H8.4c-0.2 0-0.36 0.14 -0.39 0.34 l-0.3 2.12c-0.49 0.2 -0.94 0.47 -1.35 0.78 l-1.99-0.8c-0.18-0.07-0.39 0-0.49 0.18 l-1.6 2.77c-0.1 0.18 -0.06 0.39 0.1 0.51 l1.69 1.32c-0.04 0.25 -0.07 0.52 -0.07 0.78 s0.02 0.53 0.06 0.78 L2.37 12.1c-0.15 0.12 -0.19 0.34 -0.1 0.51 l1.6 2.77c0.1 0.18 0.31 0.24 0.49 0.18 l1.99-0.8c0.42 0.32 0.86 0.58 1.35 0.78 l0.3 2.12c0.04 0.2 0.2 0.34 0.4 0.34 h3.2c0.2 0 0.37-0.14 0.39 -0.34l0.3-2.12c0.49-0.2 0.94 -0.47 1.35-0.78l1.99 0.8 c0.18 0.07 0.39 0 0.49-0.18l1.6-2.77c0.1-0.18 0.06 -0.39-0.1-0.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z" />
|
||||
</vector>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0 0h24v24H0V0z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M13 8.2l-1-1-4 4-4-4-1 1 4 4-4 4 1 1 4-4 4 4 1-1-4-4 4-4zM19 1H9c-1.1 0-2 0.9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2V3c0-1.1-0.9-2-2-2z" />
|
||||
</vector>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0 0h24v24H0z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 0.9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1 0.89 2 2 2h14c1.1 0 2-0.9 2-2V5c0-1.1-0.9-2-2-2z" />
|
||||
</vector>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0 0h24v24H0z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-0.29 0-0.62 0.02 -0.97 0.05 1.16 0.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z" />
|
||||
</vector>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0 0h24v24H0z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M16.5 13c-1.2 0-3.07 0.34 -4.5 1-1.43-0.67-3.3-1-4.5-1C5.33 13 1 14.08 1 16.25V19h22v-2.75c0-2.17-4.33-3.25-6.5-3.25zm-4 4.5h-10v-1.25c0-0.54 2.56-1.75 5-1.75s5 1.21 5 1.75v1.25zm9 0H14v-1.25c0-0.46-0.2-0.86-0.52-1.22 0.88 -0.3 1.96-0.53 3.02-0.53 2.44 0 5 1.21 5 1.75v1.25zM7.5 12c1.93 0 3.5-1.57 3.5-3.5S9.43 5 7.5 5 4 6.57 4 8.5 5.57 12 7.5 12zm0-5.5c1.1 0 2 0.9 2 2s-0.9 2-2 2-2-0.9-2-2 0.9-2 2-2zm9 5.5c1.93 0 3.5-1.57 3.5-3.5S18.43 5 16.5 5 13 6.57 13 8.5s1.57 3.5 3.5 3.5zm0-5.5c1.1 0 2 0.9 2 2s-0.9 2-2 2-2-0.9-2-2 0.9-2 2-2z" />
|
||||
</vector>
|
@ -1,49 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="68dp"
|
||||
android:height="68dp"
|
||||
android:viewportWidth="68"
|
||||
android:viewportHeight="68">
|
||||
<path
|
||||
android:pathData="M56.3,44.2c-2.1,2.2 -4.6,3.9 -7.3,5.2c-1.5,0.7 -29,8.5 -40.7,11.8c-1,0.3 -1.9,0.5 -2.6,0.7c0.2,-0.7 0.4,-1.6 0.7,-2.6c2.9,-11.6 9.9,-38.9 10.5,-40.4c1.2,-2.7 2.9,-5.1 5,-7.3c9.1,-9.3 23.8,-10.2 33.7,-2.5c0.4,0.3 0.7,0.6 1.1,0.9c0.3,0.3 0.6,0.6 0.9,1C65.8,20.5 65.4,34.9 56.3,44.2z"
|
||||
android:strokeWidth="3"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M46.7,48.1"
|
||||
android:strokeWidth="3"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M24.8,29.7l1,1.8l3.5,-2l1.5,2.7l-3.5,2l2.2,3.9l-3.1,1.7l-6.2,-11l7,-4l1.6,2.7L24.8,29.7z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M28,22.9l1.4,2.5l2.9,-1.6l-1.4,-2.5L28,22.9zM30,26.5l4.8,8.5l1.2,-4.8l-3,-5.4L30,26.5z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M45,22.4l2.9,5.2L45,29.2l-2.7,-4.8c-0.6,-1 -1.2,-1.3 -1.9,-0.9c-0.9,0.5 -1.1,1.5 -0.5,2.5l2.6,4.5l-2.9,1.7l-4.8,-8.5l2.1,-1.2l0.9,0.6c0.2,-1.1 0.9,-2 2,-2.6C41.7,19.5 43.8,20.2 45,22.4z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M52.1,9.9l6.6,11.6l-2.2,1.2l-0.6,-0.5c-0.4,1 -1.1,1.8 -2,2.4c-2.6,1.5 -5.5,0.6 -7,-2c-1.5,-2.6 -0.7,-5.6 1.9,-7.1c0.8,-0.4 1.6,-0.6 2.4,-0.6l-1.9,-3.4L52.1,9.9zM53.6,18.8c-0.6,-1.1 -1.9,-1.5 -3,-0.9c-1.1,0.6 -1.4,1.9 -0.8,3c0.6,1.1 1.9,1.5 3,0.9S54.2,19.9 53.6,18.8z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M24.1,42.1l-3,1.7l4.7,8.3l-3,1.7L18,45.5l-3,1.7l-1.5,-2.7l9,-5.1L24.1,42.1z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M27.2,46.4l-2.7,-4.8l2.9,-1.7l2.7,4.7c0.5,0.9 1.3,1.2 2.1,0.7c0.8,-0.4 1,-1.2 0.4,-2.1l-2.7,-4.7l2.9,-1.7l2.7,4.8c1.3,2.4 0.6,4.9 -2,6.3C31.1,49.4 28.6,48.8 27.2,46.4z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M43.7,38.5l1.5,2.6l-2,1.1c-1.9,1.1 -3.7,0.6 -4.7,-1.3l-1.8,-3.2L35,38.6l-0.4,-0.7l1.5,-6.2l0.6,-0.3l1.4,2.5l2.1,-1.2l1.3,2.3l-2.1,1.2l1.5,2.7c0.3,0.6 0.9,0.8 1.5,0.4L43.7,38.5z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M43.6,36.4c-1.5,-2.6 -0.6,-5.7 2.2,-7.2c2.8,-1.6 5.8,-0.8 7.3,1.8c1.5,2.6 0.6,5.7 -2.2,7.2C48.1,39.8 45,39 43.6,36.4zM49.4,35.6c1.1,-0.6 1.4,-1.8 0.8,-2.9c-0.6,-1.1 -1.8,-1.5 -2.9,-0.9s-1.4,1.8 -0.8,2.9C47.1,35.8 48.3,36.2 49.4,35.6L49.4,35.6z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M57.5,22.8l1.5,2.7l-1.1,0.6c-1,0.6 -1.2,1.3 -0.6,2.4l2.4,4.3l-2.9,1.7L52,26l2,-1.1l1,0.7c0.2,-1 0.8,-1.7 1.8,-2.3L57.5,22.8z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M20.8,37.8l0.9,1.7L20.8,40L20,38.5c-0.2,-0.3 -0.3,-0.4 -0.5,-0.2c-0.3,0.1 -0.3,0.4 -0.1,0.7l0.8,1.5l-0.9,0.5l-0.9,-1.6c-0.2,-0.3 -0.3,-0.4 -0.5,-0.2c-0.2,0.1 -0.3,0.4 -0.1,0.7l0.8,1.5l-0.9,0.5l-1.5,-2.7l0.6,-0.4l0.3,0.2c0.1,-0.3 0.3,-0.6 0.6,-0.8c0.3,-0.2 0.7,-0.2 1,0c0.1,-0.3 0.3,-0.7 0.6,-0.9C19.8,37 20.5,37.2 20.8,37.8z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M22.3,35.7l0.3,1.8l-1.4,-1.1l-1,0.6l2.5,1.8c0,0.2 0,0.4 -0.1,0.5l0.5,0.8c0.5,-0.4 0.6,-0.8 0.5,-1.7l-0.3,-3.2L22.3,35.7z"/>
|
||||
</vector>
|
@ -1,5 +0,0 @@
|
||||
<vector android:height="24dp" android:tint="#252525"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#010101" android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
</vector>
|
@ -1,5 +0,0 @@
|
||||
<vector android:height="24dp" android:tint="#BD120A"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#010101" android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
</vector>
|
@ -1,5 +0,0 @@
|
||||
<vector android:height="24dp" android:tint="#0ABD48"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#010101" android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
</vector>
|
@ -1,5 +0,0 @@
|
||||
<vector android:height="24dp" android:tint="#0ABD48"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#010101" android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
</vector>
|
@ -1,9 +0,0 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:centerColor="#009688"
|
||||
android:endColor="#00695C"
|
||||
android:startColor="#4DB6AC"
|
||||
android:type="linear" />
|
||||
</shape>
|
@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context=".activity.LoginActivity">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:contentDescription="@string/logo_find_my_tutor"
|
||||
app:srcCompat="@drawable/logo_design_black2" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/login_progress"
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/login_form"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/email_login_form"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/prompt_login"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true" />
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/prompt_password"
|
||||
android:imeActionId="6"
|
||||
android:imeActionLabel="@string/action_sign_in_short"
|
||||
android:imeOptions="actionUnspecified"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true" />
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/tutor_login_switch"
|
||||
android:layout_width="192dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Login as Tutor" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/email_sign_in_button"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/action_log_in"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:visibility="visible"
|
||||
tools:openDrawer="start">
|
||||
|
||||
<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>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main_drawer">
|
||||
|
||||
|
||||
</android.support.design.widget.NavigationView>
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
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">
|
||||
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/logoutButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginRight="@dimen/fab_margin"
|
||||
android:layout_marginTop="77dp"
|
||||
app:backgroundTint="@android:color/holo_red_dark"
|
||||
app:srcCompat="@android:drawable/ic_lock_power_off" />
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/content_main" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/main_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
android:id="@+id/main_nav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
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>
|
||||
|
||||
<include
|
||||
layout="@layout/app_bar_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</android.support.v4.widget.DrawerLayout>
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.MapActivity">
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@+id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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>
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.StartupActivity">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/appBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_actionbar"
|
||||
android:elevation="4dp"
|
||||
android:padding="10dp"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
</android.support.design.widget.AppBarLayout>
|
@ -1,58 +0,0 @@
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/activity_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:id="@+id/cl_root_coordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/app_bar_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?actionBarSize">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/activity_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/navigation"/>
|
||||
|
||||
<include
|
||||
android:id="@id/navigation"
|
||||
layout="@layout/element_bottom_navigation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main_drawer">
|
||||
|
||||
|
||||
</android.support.design.widget.NavigationView>
|
||||
</android.support.v4.widget.DrawerLayout>
|
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".activity.MainActivity"
|
||||
tools:showIn="@layout/activity_main">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none"/>
|
||||
</RelativeLayout>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/navigation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/windowBackground"
|
||||
app:menu="@menu/nav_items"
|
||||
/>
|
@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:id="@+id/nav_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="160dp"
|
||||
android:background="@color/colorAccent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:padding="4dp"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/nav_header_imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:visibility="visible"
|
||||
app:srcCompat="@drawable/logo_design_black2" />
|
||||
|
||||
</LinearLayout>
|
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_category_general">
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_notifications_enabled"
|
||||
android:title="@string/title_notification" />
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:dialogTitle="@string/settings_language"
|
||||
android:entries="@array/language_entries"
|
||||
android:entryValues="@array/language_values"
|
||||
android:key="@string/key_language"
|
||||
android:summary="%s"
|
||||
android:title="@string/title_language" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
</PreferenceScreen>
|
@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:ignore="MissingDefaultResource"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<PreferenceCategory android:title="@string/settings_category_location">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:disableDependentsState="false"
|
||||
android:key="key_sharing_enabled"
|
||||
android:persistent="true"
|
||||
android:title="@string/title_sharing"/>
|
||||
<ListPreference
|
||||
android:defaultValue="1"
|
||||
android:dialogTitle="@string/settings_location_level"
|
||||
android:entries="@array/location_level_entries"
|
||||
android:entryValues="@array/location_levels_values"
|
||||
android:key="@string/key_location_level"
|
||||
android:summary="%s"
|
||||
android:title="@string/title_location_level" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:disableDependentsState="false"
|
||||
android:key="key_status_enabled"
|
||||
android:persistent="true"
|
||||
android:title="@string/status_switch_title"/>
|
||||
<ListPreference
|
||||
android:defaultValue="1"
|
||||
android:key="key_status_value"
|
||||
android:entries="@array/status_entries"
|
||||
android:entryValues="@array/status_values"
|
||||
android:summary="%s"
|
||||
android:title="@string/status_list_title" />
|
||||
<EditTextPreference
|
||||
android:key="key_manual_status"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/title_manual_status"
|
||||
/>
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:disableDependentsState="false"
|
||||
android:key="key_manual_location_enabled"
|
||||
android:persistent="true"
|
||||
android:title="@string/manual_location"/>
|
||||
<ListPreference
|
||||
android:defaultValue="1"
|
||||
android:key="manual_location_list_title"
|
||||
android:entries="@array/manual_location_entries"
|
||||
android:entryValues="@array/manual_location_values"
|
||||
android:summary="%s"
|
||||
android:title="@string/title_list_manual_location" />
|
||||
<EditTextPreference
|
||||
android:key="key_manual_location_custom"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/title_manual_location"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
@ -1,48 +0,0 @@
|
||||
<?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="90dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="@dimen/dimen_10"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="@dimen/dimen_10">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/firstName"
|
||||
android:layout_width="271dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="@color/note_list_text"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastName"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_below="@+id/firstName"
|
||||
android:layout_alignEnd="@+id/firstName"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:textColor="@color/note_list_text"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/isOnline"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_below="@+id/firstName"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:layout_toEndOf="@+id/firstName"
|
||||
android:textColor="@color/note_list_text"
|
||||
android:textSize="@dimen/note_list_text" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin">
|
||||
|
||||
<TextView android:id="@+id/userName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen_10"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:lineSpacingExtra="8sp"
|
||||
android:text="@string/lbl_new_note_title"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:textSize="@dimen/lbl_new_note_title"
|
||||
android:textStyle="normal" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userDepartment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="8sp"
|
||||
android:paddingTop="5dp"
|
||||
android:textColor="@color/note_list_text"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userRoom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="8sp"
|
||||
android:paddingTop="5dp"
|
||||
android:textColor="@color/note_list_text"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userEmail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="8sp"
|
||||
android:paddingTop="5dp"
|
||||
android:textColor="@color/note_list_text" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userDutyHoursTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="8sp"
|
||||
android:paddingTop="5dp"
|
||||
android:textColor="@color/note_list_text"
|
||||
tools:text="@string/dutyHours" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/userDutyHours"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingStart="@dimen/activity_margin"
|
||||
android:textColor="@color/colorAccent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userNote"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="8sp"
|
||||
android:paddingTop="5dp"
|
||||
android:textColor="@color/note_list_text" />
|
||||
|
||||
</LinearLayout>
|
@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/coordinator_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.UsersListFragment">
|
||||
|
||||
|
||||
<include layout="@layout/users_list_main" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
<RelativeLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".activity.UsersListFragment"
|
||||
tools:showIn="@layout/users_list_main">
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_empty_notes_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/margin_top_no_notes"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="@string/loading"
|
||||
android:textColor="@color/msg_no_notes"
|
||||
android:textSize="@dimen/msg_no_notes" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user