diff --git a/banco/.gitignore b/banco/.gitignore
new file mode 100644
index 00000000..2b75303a
--- /dev/null
+++ b/banco/.gitignore
@@ -0,0 +1,13 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/banco/.idea/encodings.xml b/banco/.idea/encodings.xml
new file mode 100644
index 00000000..15a15b21
--- /dev/null
+++ b/banco/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/banco/.idea/gradle.xml b/banco/.idea/gradle.xml
new file mode 100644
index 00000000..2996d531
--- /dev/null
+++ b/banco/.idea/gradle.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/banco/.idea/misc.xml b/banco/.idea/misc.xml
new file mode 100644
index 00000000..9fdea7e6
--- /dev/null
+++ b/banco/.idea/misc.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/banco/.idea/runConfigurations.xml b/banco/.idea/runConfigurations.xml
new file mode 100644
index 00000000..7f68460d
--- /dev/null
+++ b/banco/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/banco/.idea/vcs.xml b/banco/.idea/vcs.xml
new file mode 100644
index 00000000..94a25f7f
--- /dev/null
+++ b/banco/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/banco/app/.gitignore b/banco/app/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/banco/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/banco/app/build.gradle b/banco/app/build.gradle
new file mode 100644
index 00000000..6b356ba4
--- /dev/null
+++ b/banco/app/build.gradle
@@ -0,0 +1,57 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 28
+ // buildToolsVersion rootProject.buildToolsVersion
+ defaultConfig {
+ applicationId "com.bank.services"
+ minSdkVersion 19
+ targetSdkVersion 28
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ // dataBinding {enabled = true }
+}
+
+dependencies {
+
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+
+ implementation 'com.android.support:recyclerview-v7:28.0.0'
+ implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+ implementation 'com.android.support.constraint:constraint-layout:1.0.3'
+
+ implementation 'com.google.code.gson:gson:2.7'
+
+ androidTestImplementation 'com.android.support.test:runner:1.0.2'
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+
+ testImplementation 'junit:junit:4.12'
+ testImplementation 'org.mockito:mockito-core:2.27.0'
+ //testImplementation 'org.mockito:mockito-core:' + rootProject.mockitoVersion;
+
+
+ implementation fileTree(dir: 'libs/', include: ['*.jar'])
+
+}
+
+
+/*
+sourceSets {
+ main {
+ res.srcDirs = [
+ file("src/main/res/templates/").listFiles(),
+ "src/main/res/templates",
+ "src/main/res"
+ ]
+ }
+}
+*/
\ No newline at end of file
diff --git a/banco/app/libs/activation.jar b/banco/app/libs/activation.jar
new file mode 100644
index 00000000..614a03cd
Binary files /dev/null and b/banco/app/libs/activation.jar differ
diff --git a/banco/app/libs/additionnal.jar b/banco/app/libs/additionnal.jar
new file mode 100644
index 00000000..aeb9611f
Binary files /dev/null and b/banco/app/libs/additionnal.jar differ
diff --git a/banco/app/libs/mail.jar b/banco/app/libs/mail.jar
new file mode 100644
index 00000000..ea594fdd
Binary files /dev/null and b/banco/app/libs/mail.jar differ
diff --git a/banco/app/proguard-rules.pro b/banco/app/proguard-rules.pro
new file mode 100644
index 00000000..f1b42451
--- /dev/null
+++ b/banco/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# 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
diff --git a/banco/app/src/androidTest/java/br/banco/services/ExampleInstrumentedTest.java b/banco/app/src/androidTest/java/br/banco/services/ExampleInstrumentedTest.java
new file mode 100644
index 00000000..43a1049a
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package br.banco.services;
+
+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 Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("br.banco.services", appContext.getPackageName());
+ }
+}
diff --git a/banco/app/src/androidTest/java/br/banco/services/app/alert/AlertTest.java b/banco/app/src/androidTest/java/br/banco/services/app/alert/AlertTest.java
new file mode 100644
index 00000000..c6ead220
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/app/alert/AlertTest.java
@@ -0,0 +1,22 @@
+package br.banco.services.app.alert;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class AlertTest {
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void getArea() {
+ }
+}
\ No newline at end of file
diff --git a/banco/app/src/androidTest/java/br/banco/services/app/alert/AlertViewTest.java b/banco/app/src/androidTest/java/br/banco/services/app/alert/AlertViewTest.java
new file mode 100644
index 00000000..f017f252
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/app/alert/AlertViewTest.java
@@ -0,0 +1,50 @@
+package br.banco.services.app.alert;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class AlertViewTest {
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void onCreate() {
+ }
+
+ @Test
+ public void onResume() {
+ }
+
+ @Test
+ public void updateAlertView() {
+ }
+
+ @Test
+ public void checkInternet() {
+ }
+
+ @Test
+ public void drawView() {
+ }
+
+ @Test
+ public void showProgressBar() {
+ }
+
+ @Test
+ public void hideProgressBar() {
+ }
+
+ @Test
+ public void onKeyDown() {
+ }
+}
\ No newline at end of file
diff --git a/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorEmailTest.java b/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorEmailTest.java
new file mode 100644
index 00000000..7a40579f
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorEmailTest.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2015, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package br.banco.services.app.utils;
+
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+
+public class ValidatorEmailTest {
+
+ // true
+
+ @Test
+ public void ValidatorEmail_Com_Dominio_True() {
+ assertTrue(ValidatorEmail.isValidEmail("name@email.com"));
+ }
+
+ @Test
+ public void ValidatorEmail_Com_Dominio_Subdominio_True() {
+ assertTrue(ValidatorEmail.isValidEmail("name@email.co.uk"));
+ }
+
+ // false
+
+ @Test
+ public void ValidatorEmail_Sem_dominio_False() {
+ assertFalse(ValidatorEmail.isValidEmail("name@email"));
+ }
+
+ @Test
+ public void ValidatorEmail_Com_Dois_Pontos_False() {
+ assertFalse(ValidatorEmail.isValidEmail("name@email..com"));
+ }
+
+ @Test
+ public void ValidatorEmail_Sem_Nome_De_Usuario_False() {
+ assertFalse(ValidatorEmail.isValidEmail("@email.com"));
+ }
+
+ @Test
+ public void ValidatorEmail_Com_Email_Vazio_False() {
+ assertFalse(ValidatorEmail.isValidEmail(""));
+ }
+
+ @Test
+ public void ValidatorEmail_Com_Email_Nulo_false() {
+ assertFalse(ValidatorEmail.isValidEmail(null));
+ }
+}
diff --git a/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorNameTest.java b/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorNameTest.java
new file mode 100644
index 00000000..8df05d28
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorNameTest.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2015, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package br.banco.services.app.utils;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+
+
+public class ValidatorNameTest {
+
+ // false -------------------------------
+
+ //haveWords
+
+ @Test
+ public void ValidatorName_Com_Caracteres_Especiais_Retorna_False() {
+ assertFalse(ValidatorName.haveWords("##"));
+ }
+ @Test
+ public void ValidatorName_Com_Numeros_Retorna_False() {
+ assertFalse(ValidatorName.haveWords("123456"));
+ }
+ @Test
+ public void ValidatorName_Com_Espaco_Branco_Retorna_False() {
+ assertFalse(ValidatorName.haveWords(" "));
+ }
+ @Test
+ public void ValidatorName_Com_Nulo_Retorna_False() {
+ assertFalse(ValidatorName.haveWords(null));
+ }
+ //haveSize
+ @Test
+ public void ValidatorName_Menor_Que_02_Letras_Retorna_False() {
+ assertFalse(ValidatorName.haveSize("J"));
+ }
+ @Test
+ public void ValidatorName_Maior_Que_25_Letras_Retorna_False() {
+ assertFalse(ValidatorName.haveSize("Inconstitucionalissimamente")); // 27 letras
+ }
+ //haveParts
+ @Test
+ public void ValidatorName_Menor_Que_02_Palavras_Retorna_False() {
+ assertFalse(ValidatorName.haveParts("Jhon")); // 1
+ }
+ @Test
+ public void ValidatorName_Maior_Que_4_Palavras_Retorna_False() {
+ assertFalse(ValidatorName.haveParts("Jhon Doe Smith Jhonson Junior")); // 5
+ }
+ // retorno final
+ @Test
+ public void ValidatorName_Nome_Com_01_Palavra_Retorna_False() {
+ assertFalse(ValidatorName.isValidName("Jhon")); // 1
+ }
+ @Test
+ public void ValidatorName_Nome_Com_05_Palavra_Retorna_False() {
+ assertFalse(ValidatorName.isValidName("Jhon Doe Smith Jhonson Junior")); // 5
+ }
+
+ @Test
+ public void ValidatorName_Nome_Com_Caracteres_Especiais_Retorna_False() {
+ assertFalse(ValidatorName.isValidName("Jhon Doe ##"));
+ }
+ @Test
+ public void ValidatorName_Nome_Com_Numeros_Retorna_False() {
+ assertFalse(ValidatorName.isValidName("Jhon Doe 12345"));
+ }
+ @Test
+
+ public void ValidatorName_Nome_Com_Ponto_Retorna_False() {
+ assertFalse(ValidatorName.isValidName("Jhon D. Smith"));
+ }
+ // True -------------------------------
+
+
+
+
+}
\ No newline at end of file
diff --git a/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorPhoneTest.java b/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorPhoneTest.java
new file mode 100644
index 00000000..591ad366
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorPhoneTest.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2015, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package br.banco.services.app.utils;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+
+public class ValidatorPhoneTest {
+
+ // false -------------------------------
+
+
+ @Test
+ public void ValidatorPhone_Com_Caracteres_Especiais_Retorna_False() {
+ assertFalse(ValidatorPhone.isPhoneNumeric("##"));
+ }
+
+ @Test
+ public void ValidatorPhone_Com_Espaco_Branco_Retorna_False() {
+ assertFalse(ValidatorPhone.isPhoneNumeric(" "));
+ }
+
+ @Test
+ public void ValidatorPhone_Com_Nulo_Retorna_False() {
+ assertFalse(ValidatorPhone.isPhoneNumeric(null));
+ }
+
+
+ @Test
+ public void ValidatorPhone_Menor_Que_10_Numeros_Retorna_False() {
+ assertFalse(ValidatorPhone.isPhoneNumeric("991234567")); // 7
+ }
+
+
+ @Test
+ public void ValidatorPhone_Maior_Que_13_Numeros_Retorna_False() {
+ assertFalse(ValidatorPhone.isPhoneNumeric("55995555777799")); //14
+ }
+
+
+ //true
+
+ @Test
+ public void ValidatorPhone_Igual_10_Numeros_Retorna_True() {
+ assertTrue(ValidatorPhone.isPhoneNumeric("1155555555")); // 10
+ }
+
+ @Test
+ public void ValidatorPhone_Igual_13_Numeros_Retorna_True() {
+ assertTrue(ValidatorPhone.isPhoneNumeric("5599555577779")); // 13
+ }
+
+ // True -------------------------------
+
+
+
+
+
+}
\ No newline at end of file
diff --git a/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorURLTest.java b/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorURLTest.java
new file mode 100644
index 00000000..f475da80
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/app/utils/ValidatorURLTest.java
@@ -0,0 +1,26 @@
+package br.banco.services.app.utils;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class ValidatorURLTest {
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void isValid() {
+ }
+
+ @Test
+ public void isValidURL() {
+ }
+}
\ No newline at end of file
diff --git a/banco/app/src/androidTest/java/br/banco/services/fund/data/template/FromScreenTest.java b/banco/app/src/androidTest/java/br/banco/services/fund/data/template/FromScreenTest.java
new file mode 100644
index 00000000..52dccad3
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/fund/data/template/FromScreenTest.java
@@ -0,0 +1,12 @@
+package br.banco.services.fund.data.template;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class FromScreenTest {
+
+ @Test
+ public void getName() {
+ }
+}
\ No newline at end of file
diff --git a/banco/app/src/androidTest/java/br/banco/services/fund/detail/DetailModelTest.java b/banco/app/src/androidTest/java/br/banco/services/fund/detail/DetailModelTest.java
new file mode 100644
index 00000000..4320d3ce
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/fund/detail/DetailModelTest.java
@@ -0,0 +1,64 @@
+package br.banco.services.fund.detail;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import br.banco.services.app.utils.ValidatorName;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class DetailModelTest {
+
+ DetailModel model;
+ @Before
+ public void setUp() throws Exception{
+ model = new DetailModel();
+ }
+
+ @Test public void getOrigin() {
+
+ // model.setOrigin(99);
+ assertNotNull(model.getOrigin());
+
+ model.setOrigin(0);
+ assertEquals(0, model.getOrigin());
+
+ model.setOrigin(1);
+ assertEquals(1, model.getOrigin());
+
+ model.setOrigin(555);
+ assertEquals(0, model.getOrigin());
+
+ }
+
+ @Test public void getLocation() {
+
+ assertNotNull(model.getLocation());
+
+ model.setLocation(0+555);
+ assertEquals(0, model.getLocation());
+
+ model.setLocation(0);
+ assertEquals(0, model.getLocation());
+
+ model.setLocation(-555);
+ assertEquals(0, model.getLocation());
+
+ model.setLocation(1);
+ assertEquals(1, model.getLocation());
+
+ model.setLocation(555);
+ assertEquals(0, model.getLocation());
+
+ }
+
+ @Test(expected=java.lang.ArithmeticException.class)
+ public void getOrigin_DivideByZero() {
+ model.setLocation(555 / 0);
+ assertEquals(0, model.getOrigin());
+ }
+
+
+}
\ No newline at end of file
diff --git a/banco/app/src/androidTest/java/br/banco/services/fund/detail/DetailViewTest.java b/banco/app/src/androidTest/java/br/banco/services/fund/detail/DetailViewTest.java
new file mode 100644
index 00000000..59263f2e
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/fund/detail/DetailViewTest.java
@@ -0,0 +1,35 @@
+package br.banco.services.fund.detail;
+
+import android.util.Log;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class DetailViewTest {
+
+ DetailView detailView;
+
+ @Before
+ public void setUp() throws Exception {
+ detailView = new DetailView();
+ }
+
+
+
+ @Test
+ public void checkInternet() {
+
+ String INTERNET = (detailView.checkInternet()) ? "SIM" : "NAO";
+
+ // Log.e("TESTSUNIT","INTERNET = " + INTERNET);
+ //assertTrue(detailView.checkInternet());
+ // assertFalse(detailView.checkInternet());
+ }
+
+
+
+
+
+}
\ No newline at end of file
diff --git a/banco/app/src/androidTest/java/br/banco/services/fund/domain/FundTest.java b/banco/app/src/androidTest/java/br/banco/services/fund/domain/FundTest.java
new file mode 100644
index 00000000..671d12e2
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/fund/domain/FundTest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2015, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package br.banco.services.fund.domain;
+
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import br.banco.services.app.utils.ValidatorName;
+
+
+
+public class FundTest {
+
+ //haveWords -------------------------------
+
+ //@Test(expected = IllegalArgumentException.class)
+ @Test
+ public void Com_Caracteres_Especiais_Retorna_False() {
+ assertFalse(ValidatorName.haveWords("##"));
+ }
+
+ @Test
+ public void Com_Letras_Retorna_True() {
+ assertTrue(ValidatorName.haveWords("Zeus FUND Name Debentures"));
+ }
+
+}
\ No newline at end of file
diff --git a/banco/app/src/androidTest/java/br/banco/services/fund/interactor/ConvertJsonTest.java b/banco/app/src/androidTest/java/br/banco/services/fund/interactor/ConvertJsonTest.java
new file mode 100644
index 00000000..eaf31dba
--- /dev/null
+++ b/banco/app/src/androidTest/java/br/banco/services/fund/interactor/ConvertJsonTest.java
@@ -0,0 +1,14 @@
+package br.banco.services.fund.interactor;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class ConvertJsonTest {
+
+ @Test
+ public void convertStringJson() {
+
+
+ }
+}
\ No newline at end of file
diff --git a/banco/app/src/main/AndroidManifest.xml b/banco/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..dc24e7f4
--- /dev/null
+++ b/banco/app/src/main/AndroidManifest.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/banco/app/src/main/java/br/banco/services/BasePresenter.java b/banco/app/src/main/java/br/banco/services/BasePresenter.java
new file mode 100644
index 00000000..4ab7d89b
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/BasePresenter.java
@@ -0,0 +1,6 @@
+package br.banco.services;
+
+public interface BasePresenter {
+
+ void start();
+}
diff --git a/banco/app/src/main/java/br/banco/services/BaseView.java b/banco/app/src/main/java/br/banco/services/BaseView.java
new file mode 100644
index 00000000..5dfb6d55
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/BaseView.java
@@ -0,0 +1,6 @@
+ package br.banco.services;
+
+public interface BaseView {
+
+ void start();
+}
diff --git a/banco/app/src/main/java/br/banco/services/CheckDevice.java b/banco/app/src/main/java/br/banco/services/CheckDevice.java
new file mode 100644
index 00000000..09753bf0
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/CheckDevice.java
@@ -0,0 +1,62 @@
+ package br.banco.services;
+
+/**
+ *
+ * Sequencia de carregamento:
+ *
+ * FUND, CONTACT:
+ * View> Presenter-> Model> Screen> Rules> dbase[Json / Share / dbase]
+ * Rules[...] = 0 && msgCode <= 5 ) ? msgCode : 0;
+
+ MessageType type = MessageType.values()[msgCode];
+ IMessage message = type.returnMessage();
+ String[] alertValues = message.configDesign(context);
+
+ view.updateAlertView(alertValues);
+ }
+
+
+ public interface View{
+
+ void drawView();
+ void updateAlertView(String alertValues[]);
+ void showProgressBar();
+ void hideProgressBar();
+
+ }
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/alert/AlertView.java b/banco/app/src/main/java/br/banco/services/app/alert/AlertView.java
new file mode 100644
index 00000000..4b0f17b2
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/alert/AlertView.java
@@ -0,0 +1,200 @@
+ /*
+
+ recebe + carrega + mostra = mensagem
+ @FAZER: onResume() checar conexao + abrir home
+ */
+
+package br.banco.services.app.alert;
+
+ import android.graphics.Color;
+ import android.graphics.PorterDuff;
+ import android.os.Bundle;
+ import android.os.Handler;
+ import android.support.v7.app.AppCompatActivity;
+ import android.util.DisplayMetrics;
+ import android.util.Log;
+ import android.view.KeyEvent;
+ import android.view.View;
+ import android.widget.Button;
+ import android.widget.ProgressBar;
+ import android.widget.RelativeLayout;
+ import android.widget.TextView;
+
+ import br.banco.services.R;
+ import br.banco.services.app.utils.ConnectionChek;
+
+
+ public class AlertView extends AppCompatActivity implements AlertPresenter.View {
+
+ public String TAG = "ALERTA";
+ private AlertPresenter presenter;
+ private int messageCode = 0;
+ private ConnectionChek internet;
+
+
+ public TextView tvArea ;
+ public TextView tvTitle;
+ public TextView tvMessage;
+ public Button btAction;
+
+ private ProgressBar progressBar;
+ //private Toolbar toolbar;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_alerts);
+
+ initProgressBar();
+
+ if(getIntent().getExtras() != null) {
+ messageCode = getIntent().getExtras().getInt("messageCode");
+ }
+
+ drawView();
+ presenter = new AlertPresenter(this);
+
+ Log.d(TAG, "VIEW / "+getClass().getName()+" / onCreate -> START " );
+
+
+
+ }
+
+
+
+ @Override
+ public void onResume() {
+ super.onResume();
+
+ presenter.loadAlertView(messageCode, getApplicationContext());
+ Log.d(TAG, "VIEW / "+getClass().getName()+" / onResume -> START " );
+ }
+
+
+ @Override
+ public void updateAlertView(String[] alertValues) {
+
+ tvArea.setText(alertValues[0]);
+ tvTitle.setText(alertValues[1]);
+ tvMessage.setText(alertValues[2]);
+ btAction.setText(alertValues[3]);
+
+ if(alertValues[4].equals("buttonCircleDefault")){
+ btAction.setBackgroundResource( R.drawable.shape_circle_light);
+ btAction.setTextColor(Color.parseColor("#333333"));
+ }
+
+
+ if(messageCode==2){ // internet error
+
+ btAction.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v)
+ {
+ showProgressBar();
+
+ Handler handler = new Handler();
+ handler.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+
+ hideProgressBar();
+ if(checkInternet()){
+
+ //message.what.
+
+ Log.d(TAG, " VIEW / "+getClass().getName()+" / -> EXIT ") ;
+ finish();
+ }
+ }
+ }, 3000);
+
+ Log.d(TAG, " VIEW / "+getClass().getName()+" / onClick -> checkInternet") ;
+ }
+ });
+
+ }
+
+ }
+
+ public boolean checkInternet(){
+
+ internet = new ConnectionChek();
+
+ if(internet.isNetworkAvailable(getApplicationContext()) == true){
+ Log.d(TAG, " VIEW / "+getClass().getName()+" / checkInternet -> SUCESS") ;
+ return true;
+ }else{
+ Log.d(TAG, " VIEW / "+getClass().getName()+" / checkInternet -> ERROR") ;
+ return false;
+ }
+
+ }
+
+
+ @Override
+ public void drawView(){
+
+ tvArea = (TextView) findViewById(R.id.lbArea);
+ tvTitle = (TextView) findViewById(R.id.DT_fd_title);
+ tvMessage = (TextView) findViewById(R.id.DT_fd_fundName);
+ btAction = (Button) findViewById(R.id.btAction3);
+ }
+
+ @Override
+ public void showProgressBar() {
+ progressBar.setVisibility(View.VISIBLE);
+ }
+
+ @Override
+ public void hideProgressBar() {
+ progressBar.setVisibility(View.INVISIBLE);
+ }
+
+ private void initProgressBar() {
+
+ int marginTop = 0;
+ int marginLeft = 0;
+
+ // size
+ DisplayMetrics displayMetrics = new DisplayMetrics();
+ getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
+
+ int width = displayMetrics.widthPixels;
+ int height = displayMetrics.heightPixels;
+
+ marginTop = (height > 0) ? (height / 2) - 80 : 0 ;
+ marginLeft = (width > 0) ? (width / 2) - 80 : 0 ;
+
+ // bar
+ progressBar = new ProgressBar(this, null,
+ android.R.attr.progressBarStyleSmall);
+ progressBar.getIndeterminateDrawable()
+ .setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_IN);
+ progressBar.setIndeterminate(true);
+ progressBar.setBackgroundColor(Color.TRANSPARENT);
+
+ // layout
+ RelativeLayout layout = new RelativeLayout(this);
+
+ // params
+ RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(160, 160);
+ params.setMargins(marginLeft, marginTop, 0, 0);
+
+ this.addContentView(progressBar, params);
+ hideProgressBar();
+ }
+
+
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK) {
+
+ //Toast.makeText(getApplicationContext(), "quer fechar ?" , Toast.LENGTH_LONG).show();
+ finish();
+ overridePendingTransition(R.anim.an_entrar_esquerda, R.anim.an_sair_esquerda);
+ return false;
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+ }
diff --git a/banco/app/src/main/java/br/banco/services/app/config/ConfigServers.java b/banco/app/src/main/java/br/banco/services/app/config/ConfigServers.java
new file mode 100644
index 00000000..0a721e7b
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/config/ConfigServers.java
@@ -0,0 +1,47 @@
+/*
+ Endereços ficaram acessiveis para facilitar a mudança de servidores
+*/
+
+package br.banco.services.app.config;
+
+public final class ConfigServers {
+
+ public String contactAdress ="https://floating-mountain-50292.herokuapp.com/cells.json";
+ public String fundAdress ="https://floating-mountain-50292.herokuapp.com/fund.json";
+ public String AlertAdress ="";
+ public String MessageAdress ="";
+
+ public String getContactAdress() {
+ return contactAdress;
+ }
+
+ public void setContactAdress(String contactAdress) {
+ this.contactAdress = contactAdress;
+ }
+
+ public String getFundAdress() {
+ return fundAdress;
+ }
+
+ public void setFundAdress(String fundAdress) {
+ this.fundAdress = fundAdress;
+ }
+
+
+ public String getAlertAdress() {
+ return AlertAdress;
+ }
+
+ public void setAlertAdress(String alertAdress) {
+ AlertAdress = alertAdress;
+ }
+
+ public String getMessageAdress() {
+ return MessageAdress;
+ }
+
+ public void setMessageAdress(String messageAdress) {
+ MessageAdress = messageAdress;
+ }
+}
+
diff --git a/banco/app/src/main/java/br/banco/services/app/design/DrawProgressBar.java b/banco/app/src/main/java/br/banco/services/app/design/DrawProgressBar.java
new file mode 100644
index 00000000..4203c986
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/design/DrawProgressBar.java
@@ -0,0 +1,95 @@
+package br.banco.services.app.design;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Color;
+import android.graphics.PorterDuff;
+import android.util.DisplayMetrics;
+import android.view.Display;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.RelativeLayout;
+import android.view.Window;
+import android.view.WindowManager;
+
+public class DrawProgressBar {
+
+
+
+
+ public void initProgressBar2(Context context) {
+
+ ProgressBar progressBar;
+ int marginTop = 0;
+ int marginLeft = 0;
+
+ // size
+ DisplayMetrics displayMetrics = new DisplayMetrics();
+ // Display display = getWindowManager().getDefaultDisplay();
+
+ ((Activity)context).getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
+
+
+ //WindowManager window = new WindowManager();
+ // ((Activity) getContext()).getWindowManager().getDefaultDisplay().getMetrics(metrics);
+
+ // window.getDefaultDisplay().getW
+ //window.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
+
+
+ }
+
+
+ public void initProgressBar(Context context) {
+
+ int marginTop = 0;
+ int marginLeft = 0;
+ ProgressBar progressBar;
+
+ // size
+ DisplayMetrics displayMetrics = new DisplayMetrics();
+ // getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
+ //this.getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
+
+
+ int width = displayMetrics.widthPixels;
+ int height = displayMetrics.heightPixels;
+
+ marginTop = (height > 0) ? (height / 2) - 80 : 0 ;
+ marginLeft = (width > 0) ? (width / 2) - 80 : 0 ;
+
+ // bar
+ progressBar = new ProgressBar(context, null,
+ android.R.attr.progressBarStyleSmall);
+ progressBar.getIndeterminateDrawable()
+ .setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_IN);
+ progressBar.setIndeterminate(true);
+ progressBar.setBackgroundColor(Color.TRANSPARENT);
+
+ // layout
+ RelativeLayout layout = new RelativeLayout(context);
+
+ // params
+ RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(160, 160);
+ params.setMargins(marginLeft, marginTop, 0, 0);
+
+ // this.addContentView(progressBar, params);
+ // hideProgressBar();
+ }
+
+
+
+ public void showProgressBar(Context context, ProgressBar progressBar) {
+ progressBar.setVisibility(View.VISIBLE);
+ }
+
+ public void hideProgressBar(Context context,ProgressBar progressBar) {
+ progressBar.setVisibility(View.INVISIBLE);
+ }
+
+
+
+
+}
+
+
diff --git a/banco/app/src/main/java/br/banco/services/app/design/DrawTextView.java b/banco/app/src/main/java/br/banco/services/app/design/DrawTextView.java
new file mode 100644
index 00000000..3de3643c
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/design/DrawTextView.java
@@ -0,0 +1,12 @@
+package br.banco.services.app.design;
+
+public class DrawTextView {
+
+
+ String id;
+ String layout_width;
+ String layout_height;
+ String text;
+ String layout_centerInParent;
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/design/DrawView.java b/banco/app/src/main/java/br/banco/services/app/design/DrawView.java
new file mode 100644
index 00000000..51ca7ff0
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/design/DrawView.java
@@ -0,0 +1,38 @@
+package br.banco.services.app.design;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Color;
+
+import android.view.View;
+import android.widget.RelativeLayout;
+
+public class DrawView {
+
+
+
+
+
+ public View initView(Context context, View view) {
+
+ return view;
+ }
+
+
+
+ public View showinitView(Context context, View view) {
+ view.setVisibility(View.VISIBLE);
+ return view;
+ }
+
+ public View hideinitView(Context context,View view) {
+ view.setVisibility(View.INVISIBLE);
+ return view;
+ }
+
+
+
+
+}
+
+
diff --git a/banco/app/src/main/java/br/banco/services/app/design/TDrawTextView.java b/banco/app/src/main/java/br/banco/services/app/design/TDrawTextView.java
new file mode 100644
index 00000000..c2566c3f
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/design/TDrawTextView.java
@@ -0,0 +1,828 @@
+package br.banco.services.app.design;
+
+public class TDrawTextView {
+
+
+ String AallowUndo_p;
+ String autoLink_p;
+ String autoSizeMaxTextSize_p;
+ String autoSizeMinTextSize_p;
+ String autoSizePresetSizes_p;
+ String autoSizeStepGranularity_p;
+ String autoSizeTextType_p;
+ String autoText_p;
+ String breakStrategy_p;
+ String bufferType_p;
+ String capitalize_p;
+ String cursorVisibl_p;
+ String digits_p;
+ String drawableBottom_p;
+ String drawableEnd_p;
+ String drawableLeft_p;
+ String drawablePadding_p;
+ String drawableRight_p;
+ String drawableStart_p;
+ String drawableTint_p;
+ String drawableTintMode_p;
+ String drawableTop_p;
+ String editable_p;
+ String editorExtras_p;
+ String elegantTextHeight_p;
+ String ellipsiz_p;
+ String ems_p;
+ String enabled_p;
+ String fallbackLineSpacing_p;
+ String firstBaselineToTopHeight_p;
+ String fontFamily_p;
+ String fontFeatureSettings_p;
+ String fontVariationSettings_p;
+ String freezesText_p;
+ String gravity_p;
+ String height_p;
+ String hint_p;
+ String hyphenationFrequency_p;
+ String imeActionId_p;
+ String imeActionLabel_p;
+ String imeOption_p;
+ String includeFontPadding_p;
+ String inputMethod_p;
+ String inputType_p;
+ String justificationMode_p;
+ String lastBaselineToBottomHeight_p;
+ String letterSpacing_p;
+ String lineHeight_p;
+ String lineSpacingExtra_p;
+ String lineSpacingMultiplier_p;
+ String lines_p;
+ String linksClickable_p;
+ String marqueeRepeatLimit_p;
+ String maxEms_p;
+ String maxHeight_p;
+ String maxLength_p;
+ String maxLines_p;
+ String maxWidth_p;
+ String minEms_p;
+ String minHeight_p;
+ String minLines_p;
+ String minWidth_p;
+ String numeric_p;
+ String password_p;
+ String phoneNumber_p;
+ String privateImeOptions_p;
+ String scrollHorizontally_p;
+ String selectAllOnFocus_p;
+ String shadowColor_p;
+ String shadowDx_p;
+ String shadowDy_p;
+ String shadowRadius_p;
+ String singleLine_p;
+ String text_p;
+ String textAllCaps_p;
+ String textAppearance_p;
+ String textColor_p;
+ String textColorHighlight_p;
+ String textColorHint_p;
+ String textColorLink_p;
+ String textCursorDrawable_p;
+ String textFontWeight_p;
+ String textIsSelectable_p;
+ String textScaleX_p;
+ String textSelectHandle_p;
+ String textSelectHandleLeft_p;
+ String textSelectHandleRight_p;
+ int textSize_p;
+ String textStyle_p;
+ String typeface_p;
+ String width_p;
+
+
+ public String getAallowUndo_p() {
+ return AallowUndo_p;
+ }
+
+ public void setAallowUndo_p(String aallowUndo_p) {
+ AallowUndo_p = aallowUndo_p;
+ }
+
+ public String getAutoLink_p() {
+ return autoLink_p;
+ }
+
+ public void setAutoLink_p(String autoLink_p) {
+ this.autoLink_p = autoLink_p;
+ }
+
+
+ public String getAutoSizeMaxTextSize_p() {
+ return autoSizeMaxTextSize_p;
+ }
+
+ public void setAutoSizeMaxTextSize_p(String autoSizeMaxTextSize_p) {
+ this.autoSizeMaxTextSize_p = autoSizeMaxTextSize_p;
+ }
+
+ public String getAutoSizeMinTextSize_p() {
+ return autoSizeMinTextSize_p;
+ }
+
+ public void setAutoSizeMinTextSize_p(String autoSizeMinTextSize_p) {
+ this.autoSizeMinTextSize_p = autoSizeMinTextSize_p;
+ }
+
+
+ public String getAutoSizePresetSizes_p() {
+ return autoSizePresetSizes_p;
+ }
+
+ public void setAutoSizePresetSizes_p(String autoSizePresetSizes_p) {
+ this.autoSizePresetSizes_p = autoSizePresetSizes_p;
+ }
+
+ public String getAutoSizeStepGranularity_p() {
+ return autoSizeStepGranularity_p;
+ }
+
+ public void setAutoSizeStepGranularity_p(String autoSizeStepGranularity_p) {
+ this.autoSizeStepGranularity_p = autoSizeStepGranularity_p;
+ }
+
+ public String getAutoSizeTextType_p() {
+ return autoSizeTextType_p;
+ }
+
+ public void setAutoSizeTextType_p(String autoSizeTextType_p) {
+ this.autoSizeTextType_p = autoSizeTextType_p;
+ }
+
+ public String getAutoText_p() {
+ return autoText_p;
+ }
+
+ public void setAutoText_p(String autoText_p) {
+ this.autoText_p = autoText_p;
+ }
+
+ public String getBreakStrategy_p() {
+ return breakStrategy_p;
+ }
+
+ public void setBreakStrategy_p(String breakStrategy_p) {
+ this.breakStrategy_p = breakStrategy_p;
+ }
+
+ public String getBufferType_p() {
+ return bufferType_p;
+ }
+
+ public void setBufferType_p(String bufferType_p) {
+ this.bufferType_p = bufferType_p;
+ }
+
+ public String getCapitalize_p() {
+ return capitalize_p;
+ }
+
+ public void setCapitalize_p(String capitalize_p) {
+ this.capitalize_p = capitalize_p;
+ }
+
+ public String getCursorVisibl_p() {
+ return cursorVisibl_p;
+ }
+
+ public void setCursorVisibl_p(String cursorVisibl_p) {
+ this.cursorVisibl_p = cursorVisibl_p;
+ }
+
+ public String getDigits_p() {
+ return digits_p;
+ }
+
+ public void setDigits_p(String digits_p) {
+ this.digits_p = digits_p;
+ }
+
+ public String getDrawableBottom_p() {
+ return drawableBottom_p;
+ }
+
+ public void setDrawableBottom_p(String drawableBottom_p) {
+ this.drawableBottom_p = drawableBottom_p;
+ }
+
+ public String getDrawableEnd_p() {
+ return drawableEnd_p;
+ }
+
+ public void setDrawableEnd_p(String drawableEnd_p) {
+ this.drawableEnd_p = drawableEnd_p;
+ }
+
+ public String getDrawableLeft_p() {
+ return drawableLeft_p;
+ }
+
+ public void setDrawableLeft_p(String drawableLeft_p) {
+ this.drawableLeft_p = drawableLeft_p;
+ }
+
+ public String getDrawablePadding_p() {
+ return drawablePadding_p;
+ }
+
+ public void setDrawablePadding_p(String drawablePadding_p) {
+ this.drawablePadding_p = drawablePadding_p;
+ }
+
+ public String getDrawableRight_p() {
+ return drawableRight_p;
+ }
+
+ public void setDrawableRight_p(String drawableRight_p) {
+ this.drawableRight_p = drawableRight_p;
+ }
+
+ public String getDrawableStart_p() {
+ return drawableStart_p;
+ }
+
+ public void setDrawableStart_p(String drawableStart_p) {
+ this.drawableStart_p = drawableStart_p;
+ }
+
+ public String getDrawableTint_p() {
+ return drawableTint_p;
+ }
+
+ public void setDrawableTint_p(String drawableTint_p) {
+ this.drawableTint_p = drawableTint_p;
+ }
+
+ public String getDrawableTintMode_p() {
+ return drawableTintMode_p;
+ }
+
+ public void setDrawableTintMode_p(String drawableTintMode_p) {
+ this.drawableTintMode_p = drawableTintMode_p;
+ }
+
+ public String getDrawableTop_p() {
+ return drawableTop_p;
+ }
+
+ public void setDrawableTop_p(String drawableTop_p) {
+ this.drawableTop_p = drawableTop_p;
+ }
+
+ public String getEditable_p() {
+ return editable_p;
+ }
+
+ public void setEditable_p(String editable_p) {
+ this.editable_p = editable_p;
+ }
+
+ public String getEditorExtras_p() {
+ return editorExtras_p;
+ }
+
+ public void setEditorExtras_p(String editorExtras_p) {
+ this.editorExtras_p = editorExtras_p;
+ }
+
+ public String getElegantTextHeight_p() {
+ return elegantTextHeight_p;
+ }
+
+ public void setElegantTextHeight_p(String elegantTextHeight_p) {
+ this.elegantTextHeight_p = elegantTextHeight_p;
+ }
+
+ public String getEllipsiz_p() {
+ return ellipsiz_p;
+ }
+
+ public void setEllipsiz_p(String ellipsiz_p) {
+ this.ellipsiz_p = ellipsiz_p;
+ }
+
+ public String getEms_p() {
+ return ems_p;
+ }
+
+ public void setEms_p(String ems_p) {
+ this.ems_p = ems_p;
+ }
+
+ public String getEnabled_p() {
+ return enabled_p;
+ }
+
+ public void setEnabled_p(String enabled_p) {
+ this.enabled_p = enabled_p;
+ }
+
+ public String getFallbackLineSpacing_p() {
+ return fallbackLineSpacing_p;
+ }
+
+ public void setFallbackLineSpacing_p(String fallbackLineSpacing_p) {
+ this.fallbackLineSpacing_p = fallbackLineSpacing_p;
+ }
+
+ public String getFirstBaselineToTopHeight_p() {
+ return firstBaselineToTopHeight_p;
+ }
+
+ public void setFirstBaselineToTopHeight_p(String firstBaselineToTopHeight_p) {
+ this.firstBaselineToTopHeight_p = firstBaselineToTopHeight_p;
+ }
+
+ public String getFontFamily_p() {
+ return fontFamily_p;
+ }
+
+ public void setFontFamily_p(String fontFamily_p) {
+ this.fontFamily_p = fontFamily_p;
+ }
+
+ public String getFontFeatureSettings_p() {
+ return fontFeatureSettings_p;
+ }
+
+ public void setFontFeatureSettings_p(String fontFeatureSettings_p) {
+ this.fontFeatureSettings_p = fontFeatureSettings_p;
+ }
+
+ public String getFontVariationSettings_p() {
+ return fontVariationSettings_p;
+ }
+
+ public void setFontVariationSettings_p(String fontVariationSettings_p) {
+ this.fontVariationSettings_p = fontVariationSettings_p;
+ }
+
+ public String getFreezesText_p() {
+ return freezesText_p;
+ }
+
+ public void setFreezesText_p(String freezesText_p) {
+ this.freezesText_p = freezesText_p;
+ }
+
+ public String getGravity_p() {
+ return gravity_p;
+ }
+
+ public void setGravity_p(String gravity_p) {
+ this.gravity_p = gravity_p;
+ }
+
+ public String getHeight_p() {
+ return height_p;
+ }
+
+ public void setHeight_p(String height_p) {
+ this.height_p = height_p;
+ }
+
+ public String getHint_p() {
+ return hint_p;
+ }
+
+ public void setHint_p(String hint_p) {
+ this.hint_p = hint_p;
+ }
+
+ public String getHyphenationFrequency_p() {
+ return hyphenationFrequency_p;
+ }
+
+ public void setHyphenationFrequency_p(String hyphenationFrequency_p) {
+ this.hyphenationFrequency_p = hyphenationFrequency_p;
+ }
+
+ public String getImeActionId_p() {
+ return imeActionId_p;
+ }
+
+ public void setImeActionId_p(String imeActionId_p) {
+ this.imeActionId_p = imeActionId_p;
+ }
+
+ public String getImeActionLabel_p() {
+ return imeActionLabel_p;
+ }
+
+ public void setImeActionLabel_p(String imeActionLabel_p) {
+ this.imeActionLabel_p = imeActionLabel_p;
+ }
+
+ public String getImeOption_p() {
+ return imeOption_p;
+ }
+
+ public void setImeOption_p(String imeOption_p) {
+ this.imeOption_p = imeOption_p;
+ }
+
+ public String getIncludeFontPadding_p() {
+ return includeFontPadding_p;
+ }
+
+ public void setIncludeFontPadding_p(String includeFontPadding_p) {
+ this.includeFontPadding_p = includeFontPadding_p;
+ }
+
+ public String getInputMethod_p() {
+ return inputMethod_p;
+ }
+
+ public void setInputMethod_p(String inputMethod_p) {
+ this.inputMethod_p = inputMethod_p;
+ }
+
+ public String getInputType_p() {
+ return inputType_p;
+ }
+
+ public void setInputType_p(String inputType_p) {
+ this.inputType_p = inputType_p;
+ }
+
+ public String getJustificationMode_p() {
+ return justificationMode_p;
+ }
+
+ public void setJustificationMode_p(String justificationMode_p) {
+ this.justificationMode_p = justificationMode_p;
+ }
+
+ public String getLastBaselineToBottomHeight_p() {
+ return lastBaselineToBottomHeight_p;
+ }
+
+ public void setLastBaselineToBottomHeight_p(String lastBaselineToBottomHeight_p) {
+ this.lastBaselineToBottomHeight_p = lastBaselineToBottomHeight_p;
+ }
+
+ public String getLetterSpacing_p() {
+ return letterSpacing_p;
+ }
+
+ public void setLetterSpacing_p(String letterSpacing_p) {
+ this.letterSpacing_p = letterSpacing_p;
+ }
+
+ public String getLineHeight_p() {
+ return lineHeight_p;
+ }
+
+ public void setLineHeight_p(String lineHeight_p) {
+ this.lineHeight_p = lineHeight_p;
+ }
+
+ public String getLineSpacingExtra_p() {
+ return lineSpacingExtra_p;
+ }
+
+ public void setLineSpacingExtra_p(String lineSpacingExtra_p) {
+ this.lineSpacingExtra_p = lineSpacingExtra_p;
+ }
+
+ public String getLineSpacingMultiplier_p() {
+ return lineSpacingMultiplier_p;
+ }
+
+ public void setLineSpacingMultiplier_p(String lineSpacingMultiplier_p) {
+ this.lineSpacingMultiplier_p = lineSpacingMultiplier_p;
+ }
+
+ public String getLines_p() {
+ return lines_p;
+ }
+
+ public void setLines_p(String lines_p) {
+ this.lines_p = lines_p;
+ }
+
+ public String getLinksClickable_p() {
+ return linksClickable_p;
+ }
+
+ public void setLinksClickable_p(String linksClickable_p) {
+ this.linksClickable_p = linksClickable_p;
+ }
+
+ public String getMarqueeRepeatLimit_p() {
+ return marqueeRepeatLimit_p;
+ }
+
+ public void setMarqueeRepeatLimit_p(String marqueeRepeatLimit_p) {
+ this.marqueeRepeatLimit_p = marqueeRepeatLimit_p;
+ }
+
+ public String getMaxEms_p() {
+ return maxEms_p;
+ }
+
+ public void setMaxEms_p(String maxEms_p) {
+ this.maxEms_p = maxEms_p;
+ }
+
+ public String getMaxHeight_p() {
+ return maxHeight_p;
+ }
+
+ public void setMaxHeight_p(String maxHeight_p) {
+ this.maxHeight_p = maxHeight_p;
+ }
+
+ public String getMaxLength_p() {
+ return maxLength_p;
+ }
+
+ public void setMaxLength_p(String maxLength_p) {
+ this.maxLength_p = maxLength_p;
+ }
+
+ public String getMaxLines_p() {
+ return maxLines_p;
+ }
+
+ public void setMaxLines_p(String maxLines_p) {
+ this.maxLines_p = maxLines_p;
+ }
+
+ public String getMaxWidth_p() {
+ return maxWidth_p;
+ }
+
+ public void setMaxWidth_p(String maxWidth_p) {
+ this.maxWidth_p = maxWidth_p;
+ }
+
+ public String getMinEms_p() {
+ return minEms_p;
+ }
+
+ public void setMinEms_p(String minEms_p) {
+ this.minEms_p = minEms_p;
+ }
+
+ public String getMinHeight_p() {
+ return minHeight_p;
+ }
+
+ public void setMinHeight_p(String minHeight_p) {
+ this.minHeight_p = minHeight_p;
+ }
+
+ public String getMinLines_p() {
+ return minLines_p;
+ }
+
+ public void setMinLines_p(String minLines_p) {
+ this.minLines_p = minLines_p;
+ }
+
+ public String getMinWidth_p() {
+ return minWidth_p;
+ }
+
+ public void setMinWidth_p(String minWidth_p) {
+ this.minWidth_p = minWidth_p;
+ }
+
+ public String getNumeric_p() {
+ return numeric_p;
+ }
+
+ public void setNumeric_p(String numeric_p) {
+ this.numeric_p = numeric_p;
+ }
+
+ public String getPassword_p() {
+ return password_p;
+ }
+
+ public void setPassword_p(String password_p) {
+ this.password_p = password_p;
+ }
+
+ public String getPhoneNumber_p() {
+ return phoneNumber_p;
+ }
+
+ public void setPhoneNumber_p(String phoneNumber_p) {
+ this.phoneNumber_p = phoneNumber_p;
+ }
+
+ public String getPrivateImeOptions_p() {
+ return privateImeOptions_p;
+ }
+
+ public void setPrivateImeOptions_p(String privateImeOptions_p) {
+ this.privateImeOptions_p = privateImeOptions_p;
+ }
+
+ public String getScrollHorizontally_p() {
+ return scrollHorizontally_p;
+ }
+
+ public void setScrollHorizontally_p(String scrollHorizontally_p) {
+ this.scrollHorizontally_p = scrollHorizontally_p;
+ }
+
+ public String getSelectAllOnFocus_p() {
+ return selectAllOnFocus_p;
+ }
+
+ public void setSelectAllOnFocus_p(String selectAllOnFocus_p) {
+ this.selectAllOnFocus_p = selectAllOnFocus_p;
+ }
+
+ public String getShadowColor_p() {
+ return shadowColor_p;
+ }
+
+ public void setShadowColor_p(String shadowColor_p) {
+ this.shadowColor_p = shadowColor_p;
+ }
+
+ public String getShadowDx_p() {
+ return shadowDx_p;
+ }
+
+ public void setShadowDx_p(String shadowDx_p) {
+ this.shadowDx_p = shadowDx_p;
+ }
+
+ public String getShadowDy_p() {
+ return shadowDy_p;
+ }
+
+ public void setShadowDy_p(String shadowDy_p) {
+ this.shadowDy_p = shadowDy_p;
+ }
+
+ public String getShadowRadius_p() {
+ return shadowRadius_p;
+ }
+
+ public void setShadowRadius_p(String shadowRadius_p) {
+ this.shadowRadius_p = shadowRadius_p;
+ }
+
+ public String getSingleLine_p() {
+ return singleLine_p;
+ }
+
+ public void setSingleLine_p(String singleLine_p) {
+ this.singleLine_p = singleLine_p;
+ }
+
+ public String getText_p() {
+ return text_p;
+ }
+
+ public void setText_p(String text_p) {
+ this.text_p = text_p;
+ }
+
+ public String getTextAllCaps_p() {
+ return textAllCaps_p;
+ }
+
+ public void setTextAllCaps_p(String textAllCaps_p) {
+ this.textAllCaps_p = textAllCaps_p;
+ }
+
+ public String getTextAppearance_p() {
+ return textAppearance_p;
+ }
+
+ public void setTextAppearance_p(String textAppearance_p) {
+ this.textAppearance_p = textAppearance_p;
+ }
+
+ public String getTextColor_p() {
+ return textColor_p;
+ }
+
+ public void setTextColor_p(String textColor_p) {
+ this.textColor_p = textColor_p;
+ }
+
+ public String getTextColorHighlight_p() {
+ return textColorHighlight_p;
+ }
+
+ public void setTextColorHighlight_p(String textColorHighlight_p) {
+ this.textColorHighlight_p = textColorHighlight_p;
+ }
+
+ public String getTextColorHint_p() {
+ return textColorHint_p;
+ }
+
+ public void setTextColorHint_p(String textColorHint_p) {
+ this.textColorHint_p = textColorHint_p;
+ }
+
+ public String getTextColorLink_p() {
+ return textColorLink_p;
+ }
+
+ public void setTextColorLink_p(String textColorLink_p) {
+ this.textColorLink_p = textColorLink_p;
+ }
+
+ public String getTextCursorDrawable_p() {
+ return textCursorDrawable_p;
+ }
+
+ public void setTextCursorDrawable_p(String textCursorDrawable_p) {
+ this.textCursorDrawable_p = textCursorDrawable_p;
+ }
+
+ public String getTextFontWeight_p() {
+ return textFontWeight_p;
+ }
+
+ public void setTextFontWeight_p(String textFontWeight_p) {
+ this.textFontWeight_p = textFontWeight_p;
+ }
+
+ public String getTextIsSelectable_p() {
+ return textIsSelectable_p;
+ }
+
+ public void setTextIsSelectable_p(String textIsSelectable_p) {
+ this.textIsSelectable_p = textIsSelectable_p;
+ }
+
+ public String getTextScaleX_p() {
+ return textScaleX_p;
+ }
+
+ public void setTextScaleX_p(String textScaleX_p) {
+ this.textScaleX_p = textScaleX_p;
+ }
+
+ public String getTextSelectHandle_p() {
+ return textSelectHandle_p;
+ }
+
+ public void setTextSelectHandle_p(String textSelectHandle_p) {
+ this.textSelectHandle_p = textSelectHandle_p;
+ }
+
+ public String getTextSelectHandleLeft_p() {
+ return textSelectHandleLeft_p;
+ }
+
+ public void setTextSelectHandleLeft_p(String textSelectHandleLeft_p) {
+ this.textSelectHandleLeft_p = textSelectHandleLeft_p;
+ }
+
+ public String getTextSelectHandleRight_p() {
+ return textSelectHandleRight_p;
+ }
+
+ public void setTextSelectHandleRight_p(String textSelectHandleRight_p) {
+ this.textSelectHandleRight_p = textSelectHandleRight_p;
+ }
+
+ public int getTextSize_p() {
+ return textSize_p;
+ }
+
+ public void setTextSize_p(int textSize_p) {
+ this.textSize_p = textSize_p;
+ }
+
+ public String getTextStyle_p() {
+ return textStyle_p;
+ }
+
+ public void setTextStyle_p(String textStyle_p) {
+ this.textStyle_p = textStyle_p;
+ }
+
+ public String getTypeface_p() {
+ return typeface_p;
+ }
+
+ public void setTypeface_p(String typeface_p) {
+ this.typeface_p = typeface_p;
+ }
+
+ public String getWidth_p() {
+ return width_p;
+ }
+
+ public void setWidth_p(String width_p) {
+ this.width_p = width_p;
+ }
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/message/IMessage.java b/banco/app/src/main/java/br/banco/services/app/message/IMessage.java
new file mode 100644
index 00000000..75413a81
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/message/IMessage.java
@@ -0,0 +1,10 @@
+package br.banco.services.app.message;
+
+import android.content.Context;
+
+public interface IMessage {
+
+ public String[] configDesign(Context context);
+
+}
+
diff --git a/banco/app/src/main/java/br/banco/services/app/message/Message.java b/banco/app/src/main/java/br/banco/services/app/message/Message.java
new file mode 100644
index 00000000..d745d051
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/message/Message.java
@@ -0,0 +1,24 @@
+package br.banco.services.app.message;
+/*
+ Mostra as mensagens de sistema: Erro, Internet...
+*/
+import android.content.Context;
+
+public class Message implements IMessage{
+
+ public Context context;
+ public String[] message;
+ public IMessage imessage;
+
+ public Message(IMessage imessage){
+ this.imessage = imessage;
+ }
+
+ public String[] configDesign(Context context){
+ return message;
+ }
+
+ public String[] configPernalized(Context context){
+ return imessage.configDesign(context);
+ }
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/message/MessageConfig.java b/banco/app/src/main/java/br/banco/services/app/message/MessageConfig.java
new file mode 100644
index 00000000..8d550ae5
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/message/MessageConfig.java
@@ -0,0 +1,18 @@
+package br.banco.services.app.message;
+
+import android.content.Context;
+import android.support.v7.app.AppCompatActivity;
+
+import br.banco.services.R;
+
+public class MessageConfig extends AppCompatActivity implements IMessage {
+
+ private Context b;
+
+ public String[] configDesign(Context a) {
+ this.b = a;
+ return b.getResources().getStringArray(R.array.alert_unknown_error);
+ }
+
+}
+
diff --git a/banco/app/src/main/java/br/banco/services/app/message/MessageError.java b/banco/app/src/main/java/br/banco/services/app/message/MessageError.java
new file mode 100644
index 00000000..4b7e5d11
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/message/MessageError.java
@@ -0,0 +1,17 @@
+package br.banco.services.app.message;
+
+import android.content.Context;
+import android.support.v7.app.AppCompatActivity;
+
+import br.banco.services.R;
+
+public class MessageError extends AppCompatActivity implements IMessage {
+
+ private Context b;
+
+ public String[] configDesign(Context a) {
+ this.b = a;
+ return b.getResources().getStringArray(R.array.alert_unknown_error);
+ }
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/message/MessageLoad.java b/banco/app/src/main/java/br/banco/services/app/message/MessageLoad.java
new file mode 100644
index 00000000..25b5b7e8
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/message/MessageLoad.java
@@ -0,0 +1,17 @@
+package br.banco.services.app.message;
+
+import android.content.Context;
+import android.support.v7.app.AppCompatActivity;
+
+import br.banco.services.R;
+
+public class MessageLoad extends AppCompatActivity implements IMessage {
+
+ private Context b;
+
+ public String[] configDesign(Context a) {
+ this.b = a;
+ return b.getResources().getStringArray(R.array.alert_loading_app);
+ }
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/message/MessageNormal.java b/banco/app/src/main/java/br/banco/services/app/message/MessageNormal.java
new file mode 100644
index 00000000..d4928766
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/message/MessageNormal.java
@@ -0,0 +1,17 @@
+package br.banco.services.app.message;
+
+import android.content.Context;
+import android.support.v7.app.AppCompatActivity;
+
+import br.banco.services.R;
+
+public class MessageNormal extends AppCompatActivity implements IMessage {
+
+ private Context b;
+
+ public String[] configDesign(Context a) {
+ this.b = a;
+ return b.getResources().getStringArray(R.array.alert_connection_error);
+ }
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/message/MessageSend.java b/banco/app/src/main/java/br/banco/services/app/message/MessageSend.java
new file mode 100644
index 00000000..7460b6a5
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/message/MessageSend.java
@@ -0,0 +1,17 @@
+package br.banco.services.app.message;
+
+import android.content.Context;
+import android.support.v7.app.AppCompatActivity;
+
+import br.banco.services.R;
+
+public class MessageSend extends AppCompatActivity implements IMessage {
+
+ private Context b;
+
+ public String[] configDesign(Context a) {
+ this.b = a;
+ return b.getResources().getStringArray(R.array.alert_sending_app);
+ }
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/message/MessageSuccess.java b/banco/app/src/main/java/br/banco/services/app/message/MessageSuccess.java
new file mode 100644
index 00000000..da94c779
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/message/MessageSuccess.java
@@ -0,0 +1,17 @@
+package br.banco.services.app.message;
+
+import android.content.Context;
+import android.support.v7.app.AppCompatActivity;
+
+import br.banco.services.R;
+
+public class MessageSuccess extends AppCompatActivity implements IMessage {
+
+ private Context b;
+
+ public String[] configDesign(Context a) {
+ this.b = a;
+ return b.getResources().getStringArray(R.array.alert_connection_sucess);
+ }
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/message/MessageType.java b/banco/app/src/main/java/br/banco/services/app/message/MessageType.java
new file mode 100644
index 00000000..9b710bbc
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/message/MessageType.java
@@ -0,0 +1,49 @@
+package br.banco.services.app.message;
+/*
+Enumera os tipos de mensagens de sistema
+ */
+public enum MessageType {
+
+ LOAD {
+ @Override
+ public IMessage returnMessage() {
+ return new MessageLoad();
+ }
+ },
+ CONFIG {
+ @Override
+ public IMessage returnMessage() {
+ return new MessageConfig();
+ }
+ },
+ NORMAL {
+ @Override
+ public IMessage returnMessage() {
+ return new MessageNormal();
+ }
+ },
+ SUCESS {
+ @Override
+ public IMessage returnMessage() {
+ return new MessageSuccess();
+ }
+ },
+ ERROR {
+ @Override
+ public IMessage returnMessage() {
+ return new MessageError();
+ }
+ }
+ ,
+ SEND {
+ @Override
+ public IMessage returnMessage() {
+ return new MessageSend();
+ }
+ }
+
+ ;
+
+ public abstract IMessage returnMessage();
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/utils/CharacterCheck.java b/banco/app/src/main/java/br/banco/services/app/utils/CharacterCheck.java
new file mode 100644
index 00000000..212d8a14
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/utils/CharacterCheck.java
@@ -0,0 +1,55 @@
+package br.banco.services.app.utils;
+
+import android.util.Log;
+
+public final class CharacterCheck {
+
+ public int isNumber;
+ public long isLong;
+ public String Text;
+ public String Simbol;
+
+ public int getIsNumber(String isNumber) {
+ try {
+
+ Integer numberInt = Integer.valueOf(isNumber);
+ return numberInt;
+ }
+ catch (NumberFormatException e) {
+ Log.e("CONTACT", "ERROR = " + e.getMessage());
+ return 0;
+ }
+ }
+
+
+ public long getIsLong(String checkLong) {
+
+ try {
+
+ //Long numberLong = Long.parseLong(checkLong);
+ long numberLong = Long.valueOf(checkLong);
+ // Log.e("CONTACT", "SUCCESS = " + numberLong);
+ return numberLong;
+ }
+ catch (NumberFormatException e) {
+ //Log.e("CONTACT", "ERROR = " + e.getMessage());
+ return 0;
+ }
+ }
+
+ public String getText() {
+ return Text;
+ }
+
+ public void setText(String text) {
+ Text = text;
+ }
+
+ public String getSimbol() {
+ return Simbol;
+ }
+
+ public void setSimbol(String simbol) {
+ Simbol = simbol;
+ }
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/utils/ClassDetails.java b/banco/app/src/main/java/br/banco/services/app/utils/ClassDetails.java
new file mode 100644
index 00000000..e65f6a80
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/utils/ClassDetails.java
@@ -0,0 +1,41 @@
+package br.banco.services.app.utils;
+
+import android.os.Build;
+
+public final class ClassDetails {
+
+ private String ClassName;
+ private String MethodName;
+ private String MethodType;
+
+
+ public ClassDetails(){
+
+ // this.ClassName = getClass().getName();
+ //this.MethodName = getClass().getEnclosingMethod().getName();
+ }
+
+ public String getClassName() {
+ return ClassName;
+ }
+
+ public void setClassName(String className) {
+ ClassName = className;
+ }
+
+ public String getMethodName() {
+ return MethodName;
+ }
+
+ public void setMethodName(String methodName) {
+ MethodName = methodName;
+ }
+
+ public String getMethodType() {
+ return MethodType;
+ }
+
+ public void setMethodType(String methodType) {
+ MethodType = methodType;
+ }
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/utils/CompareClassAndData.java b/banco/app/src/main/java/br/banco/services/app/utils/CompareClassAndData.java
new file mode 100644
index 00000000..e46ae53d
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/utils/CompareClassAndData.java
@@ -0,0 +1,45 @@
+package br.banco.services.app.utils;
+
+import android.util.Log;
+
+import br.banco.services.fund.data.template.FromFund;
+import static br.banco.services.fund.domain.Configclass.SCREEN_CLASS;
+
+public class CompareClassAndData {
+
+
+ public boolean compareClassAndData(){
+
+ // comparar se as config da classe sao iguais aos dados
+ FromFund fromFund = new FromFund();
+
+ boolean nameAll = false;
+ boolean sizeAll = false;
+
+ try {
+
+ String fundName = fromFund.LOAD_DATA_NAME;
+ String className = SCREEN_CLASS.Name;
+
+ int fundSize = fromFund.LOAD_DATA_SIZE;
+ int classSize = SCREEN_CLASS.Size;
+
+ //name = SCREEN_CLASS.Name == fromFund.LOAD_DATA_NAME;
+ nameAll = fundName.equals(className);
+ sizeAll = fundSize == classSize;
+
+ // Log.d("FUND", "VIEW / nameAll -> " + className+ "=" + fundName);
+ // Log.d("FUND", "VIEW / sizeAll -> " + classSize+ "=" + fundSize);
+
+ }catch (Exception e){
+ Log.d("FUND", "VIEW / CompareClassAndData -> ERROR! -> " + e.getMessage());
+ }
+
+ return (nameAll && sizeAll) ;
+ }
+
+
+
+
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/utils/CompareClassAndJson.java b/banco/app/src/main/java/br/banco/services/app/utils/CompareClassAndJson.java
new file mode 100644
index 00000000..3fc014a6
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/utils/CompareClassAndJson.java
@@ -0,0 +1,49 @@
+package br.banco.services.app.utils;
+
+import android.util.Log;
+
+import org.json.JSONObject;
+
+import java.lang.reflect.Field;
+
+import br.banco.services.fund.data.template.FromFund;
+
+import static br.banco.services.fund.domain.Configclass.SCREEN_CLASS;
+
+public class CompareClassAndJson {
+
+
+ public boolean compareIF(JSONObject json, Class> clas){
+
+ boolean compare = false;
+
+ try {
+
+ Field[] fields = clas.getDeclaredFields();
+ int count = 0;
+ String jsonNames = null;
+ String fieldNames = null;
+
+ for(Field fieldName : fields){
+
+ //Class fielType = fieldName.getType();
+ jsonNames = json.names().getString(count);
+
+
+ Log.d("FUND", fieldName.getName() + " / " + jsonNames);
+
+ count++;
+ }
+
+ }catch (Exception e){
+ Log.d("FUND", "compareIF->ERROR->" + e.getMessage());
+ }
+
+ return compare ;
+ }
+
+
+
+
+
+}
diff --git a/banco/app/src/main/java/br/banco/services/app/utils/Connection.java b/banco/app/src/main/java/br/banco/services/app/utils/Connection.java
new file mode 100644
index 00000000..039ecc80
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/utils/Connection.java
@@ -0,0 +1,36 @@
+ /*
+ @fazer
+ implementar @ import android.net.NetworkCapabilities;
+ cehcar versao do android suporta este
+ */
+
+package br.banco.services.app.utils;
+
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+
+ public class Connection {
+
+ private static int TYPE_WIFI = 1;
+ private static int TYPE_MOBILE = 2;
+ private static int TYPE_NOT_CONNECTED = 0;
+
+ public static int getConnectivityStatus(Context context) {
+
+ ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
+ NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
+
+ switch (activeNetwork.getSubtype())
+ {
+
+ case ConnectivityManager.TYPE_WIFI:
+ return TYPE_WIFI;
+ case ConnectivityManager.TYPE_MOBILE:
+ return TYPE_MOBILE;
+ default:
+ return TYPE_NOT_CONNECTED;
+
+ }
+ }
+ }
diff --git a/banco/app/src/main/java/br/banco/services/app/utils/ConnectionChek.java b/banco/app/src/main/java/br/banco/services/app/utils/ConnectionChek.java
new file mode 100644
index 00000000..47764698
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/utils/ConnectionChek.java
@@ -0,0 +1,45 @@
+ /*
+ @fazer
+ implementar @ import android.net.NetworkCapabilities;
+ cehcar versao do android suporta este
+ */
+
+package br.banco.services.app.utils;
+
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+
+ public class ConnectionChek {
+
+
+ public static boolean isNetworkAvailable(Context context) {
+
+ try {
+ ConnectivityManager connectivityManager = (ConnectivityManager)
+ context.getSystemService(Context.CONNECTIVITY_SERVICE);
+
+ if (connectivityManager != null) {
+ NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();
+ return (activeNetwork != null && activeNetwork.isConnected());
+ } else {
+ return false;
+ }
+
+ }catch (Exception e){
+ return false;
+ }
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+ }
diff --git a/banco/app/src/main/java/br/banco/services/app/utils/JsonConvert.java b/banco/app/src/main/java/br/banco/services/app/utils/JsonConvert.java
new file mode 100644
index 00000000..27c1732a
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/utils/JsonConvert.java
@@ -0,0 +1,449 @@
+package br.banco.services.app.utils;
+import android.util.Log;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+// screen=str, info=array, downInfo=array , moreInfo=str
+
+public class JsonConvert {
+
+ public JSONObject objZero;
+ public JSONObject objOne ;
+ public JSONObject objTwo ;
+ public JSONObject objTree ;
+
+ JSONArray arrayOne;
+ JSONArray arrayTwo;
+
+
+
+ public ReactAplication RX;
+ public JsonConvert(){
+ RX = new ReactAplication();
+
+
+
+ }
+
+ //------------------ BUSCA OBJETOS ----------------
+
+
+ // level 3
+ public JSONObject searchLevelTree(String jsonString,
+ String clssString,
+ String fieldString,
+ int maxSize) {
+
+ String levelZero = clssString;
+ String nameZero = null;
+ String nameOne = null;
+
+ boolean resultOne = false;
+ boolean resultTwo = false;
+
+ try {
+
+ objZero = new JSONObject(jsonString);
+ nameZero = objZero.names().getString(0);
+
+ objOne = objZero.getJSONObject(nameZero);
+ // objTwo = objOne.getJSONArray(nameZero);
+
+ // Log.e("FUND","nameZero = " + nameZero);
+
+ resultOne = (jsonString.length()>0 && jsonString.length()< maxSize);
+ // resultTwo = (jsonString.length()>0 && jsonString.length()< maxSize);
+
+ String msgFlow = ("SEARCH:" +clssString +", " +
+ " RESULT:" + resultOne + "," +
+ " SIZE:"+jsonString.length()+"," +
+ " MAX SIZE:" + maxSize);
+
+ // RX.onNext("objZero.length():" + objZero.length());
+
+ if(resultOne) {
+
+ for (int i = 0; i < objOne.length(); i++) {
+
+ String key = objOne.names().getString(i) +"";
+ String val = objOne.get(objOne.names().getString(i)) + "";
+ // Log.v("FUND", "@KEY: " +key + " @VALUE:" + val);
+
+ if(key.equals(clssString+"")) {
+
+ // objTwo = objOne.getJSONArray(key);
+ objTwo = objOne.getJSONObject(key);
+ // Log.v("FUND", "@objTwo: " +key + " @length:" + objTwo.length());
+
+ for (int i2 = 0; i2 < objTwo.length(); i2++) {
+
+ String key2 = objTwo.names().getString(i2) +"";
+ String val2 = objTwo.get(objTwo.names().getString(i2)) + "";
+ //Log.v("FUND", "@KEY: " +key2 + " @VALUE:" + val2);
+
+ if(key2.equals(fieldString+"")) {
+
+ objTree = objTwo.getJSONObject(key2);
+ Log.v("FUND", "@objTree: " +key + " @length:" + objTree.length());
+
+ for (int i3 = 0; i3 < objTree.length(); i3++) {
+
+ String key3 = objTree.names().getString(i3) +"";
+ String val3 = objTree.get(objTree.names().getString(i3)) + "";
+
+ Log.v("FUND", "@KEY: " +key3 + " @VALUE:" + val3);
+
+ }
+
+ }
+
+
+ }
+
+ //nameOne = objZero.names().getString(0);
+ }
+
+ }
+
+ // RX.onNext(msgFlow);
+ RX.onNext("resultOne:" + resultOne);
+ }else{
+ RX.onNext("resultOne:" + resultOne);
+ }
+
+ }catch(JSONException e){
+ Log.e("FUND", e.getMessage());
+ // RX.onError(e);
+ }catch (Exception e){
+ RX.onError(e);
+ }
+
+ return objZero;
+ }
+
+
+ // level 1
+ public JSONObject searchLevelOne(String jsonString,
+ String clssString,
+ int maxSize) {
+
+ String levelZero = clssString;
+ String nameZero = null;
+ String nameOne = null;
+
+ boolean resultOne = false;
+ boolean resultTwo = false;
+
+ try {
+
+ objZero = new JSONObject(jsonString);
+ nameZero = objZero.names().getString(0);
+
+ objOne = objZero.getJSONObject(nameZero);
+ // objTwo = objOne.getJSONArray(nameZero);
+
+ // Log.e("FUND","nameZero = " + nameZero);
+
+ resultOne = (jsonString.length()>0 && jsonString.length()< maxSize);
+ // resultTwo = (jsonString.length()>0 && jsonString.length()< maxSize);
+
+ String msgFlow = ("SEARCH:" +clssString +", " +
+ " RESULT:" + resultOne + "," +
+ " SIZE:"+jsonString.length()+"," +
+ " MAX SIZE:" + maxSize);
+
+ // RX.onNext("objZero.length():" + objZero.length());
+
+ if(resultOne) {
+
+ for (int i = 0; i < objOne.length(); i++) {
+
+ String key = objOne.names().getString(i) +"";
+ String val = objOne.get(objOne.names().getString(i)) + "";
+ // Log.v("FUND", "@KEY: " +key + " @VALUE:" + val);
+
+ if(key.equals(clssString+"")) {
+
+ // objTwo = objOne.getJSONArray(key);
+ objTwo = objOne.getJSONObject(key);
+ Log.v("FUND", "@objTwo: " +key + " @length:" + objTwo.length());
+
+ for (int i2 = 0; i2 < objTwo.length(); i2++) {
+
+ String key2 = objTwo.names().getString(i2) +"";
+ String val2 = objTwo.get(objTwo.names().getString(i2)) + "";
+ Log.v("FUND", "@KEY: " +key2 + " @VALUE:" + val2);
+
+ }
+
+ //nameOne = objZero.names().getString(0);
+ }
+
+ }
+
+ // RX.onNext(msgFlow);
+ RX.onNext("resultOne:" + resultOne);
+ }else{
+ RX.onNext("resultOne:" + resultOne);
+ }
+
+ }catch(JSONException e){
+ Log.e("FUND", e.getMessage());
+ // RX.onError(e);
+ }catch (Exception e){
+ RX.onError(e);
+ }
+
+ return objZero;
+ }
+
+
+ // level 0
+ public JSONObject searchLevelZero(String jsonString,
+ String clssString,
+ int maxSize) {
+
+ String levelZero = clssString;
+ boolean resultOne = false;
+
+ try {
+
+ objZero = new JSONObject(jsonString);
+ objOne = objZero.getJSONObject(clssString);
+ objOne = objZero.getJSONObject(clssString);
+
+ resultOne = (jsonString.length()>0 && jsonString.length()< maxSize);
+
+ String msgFlow = ("SEARCH:" +clssString +", " +
+ " RESULT:" + resultOne + "," +
+ " SIZE:"+jsonString.length()+"," +
+ " MAX SIZE:" + maxSize);
+
+ if(resultOne) {
+
+ RX.onNext(msgFlow);
+
+ //Log.v("FUND", "" +mapKey + " = " + mapValue);
+
+ for (int i = 0; i < objOne.names().length(); i++) {
+
+ String key = objOne.names().getString(i) +"";
+ String val = objOne.get(objOne.names().getString(i)) + "";
+ Log.v("FUND", "KEY:" +key + " VALUE:" + val);
+
+ }
+
+ RX.onNext("SUCESSO");
+ }else{
+ RX.onNext("resultOne:" + resultOne);
+ }
+
+ }catch(JSONException e){
+ RX.onError(e);
+ }catch (Exception e){
+ RX.onError(e);
+ }
+
+ return objZero;
+ }
+
+
+
+ //------------------ BUSCA ARRAYS ----------------
+
+
+ //level 2
+ public JSONObject searchLevelOneArray(String jsonString,
+ String clssString,
+ int maxSize) {
+
+ String levelZero = clssString;
+ String nameZero = null;
+ String nameOne = null;
+
+ boolean resultOne = false;
+ boolean resultTwo = false;
+ JSONArray arraTwo;
+
+ try {
+
+ objZero = new JSONObject(jsonString);
+ nameZero = objZero.names().getString(0);
+ objOne = objZero.getJSONObject(nameZero);
+ // objTwo = objOne.getJSONArray(nameZero);
+ // Log.d("FUND","nameZero = " + nameZero);
+
+ resultOne = (jsonString.length()>0 && jsonString.length()< maxSize);
+ // resultTwo = (jsonString.length()>0 && jsonString.length()< maxSize);
+
+ String msgFlow = ("SEARCH:" +clssString +", " +
+ " RESULT:" + resultOne + "," +
+ " SIZE:"+jsonString.length()+"," +
+ " MAX SIZE:" + maxSize);
+
+ // RX.onNext("msgFlow:" + msgFlow);
+
+ if(resultOne) {
+
+ for (int i = 0; i < objOne.length(); i++) {
+
+ String key = objOne.names().getString(i) +"";
+ String val = objOne.get(objOne.names().getString(i)) + "";
+ //Log.v("FUND", "@KEY: " +key + " @VALUE:" + val);
+
+ //RX.onNext("msgFlow:" + msgFlow);
+ if(key.equals(clssString+"")) {
+
+ //objTwo = objOne.getJSONArray(key);
+ // objTwo = objOne.getJSONObject(key);
+ arrayOne = objOne.getJSONArray(key);
+ //Log.d("FUND", "@arrayOne: " +arrayOne + " @length:" + arrayOne.length() + "");
+
+ for (int i2 = 0; i2 < arrayOne.length(); i2++) {
+
+
+ // String key2 = objTwo.names().getString(i2) +"";
+ //String key2 = objTwo.names().getString(i2) +"";
+
+ Log.d( "FUND", "OBJ = " + arrayOne.get(i2).toString());
+
+ // String val2 = objTwo.get(objOne.names().getString(i)) + "";
+
+ // Log.v("FUND", "@KEY: " +key2 + " @VALUE:" + key2);
+
+ }
+
+ //nameOne = objZero.names().getString(0);
+ }
+
+ }
+
+ // RX.onNext(msgFlow);
+ RX.onNext("resultOne:" + resultOne);
+ }else{
+ RX.onNext("resultOne:" + resultOne);
+ }
+
+ }catch(JSONException e){
+ RX.onError(e);
+ }catch (Exception e){
+ RX.onError(e);
+ }
+
+ return objZero;
+ }
+
+
+
+
+ //level 3
+ public JSONObject searchLevelTreeArray(String jsonString,
+ String clssString,
+ String fieldString,
+ int maxSize) {
+
+ String levelZero = clssString;
+ String nameZero = null;
+ String nameOne = null;
+
+ boolean resultOne = false;
+ boolean resultTwo = false;
+ JSONArray arraTwo;
+
+ try {
+
+ objZero = new JSONObject(jsonString);
+ nameZero = objZero.names().getString(0);
+ objOne = objZero.getJSONObject(nameZero);
+ // objTwo = objOne.getJSONArray(nameZero);
+ // Log.d("FUND","nameZero = " + nameZero);
+
+ resultOne = (jsonString.length()>0 && jsonString.length()< maxSize);
+ // resultTwo = (jsonString.length()>0 && jsonString.length()< maxSize);
+
+ String msgFlow = ("SEARCH:" +clssString +", " +
+ " RESULT:" + resultOne + "," +
+ " SIZE:"+jsonString.length()+"," +
+ " MAX SIZE:" + maxSize);
+
+ // RX.onNext("msgFlow:" + msgFlow);
+
+ if(resultOne) {
+
+ for (int i = 0; i < objOne.length(); i++) {
+
+ String key = objOne.names().getString(i) +"";
+ String val = objOne.get(objOne.names().getString(i)) + "";
+ //Log.v("FUND", "@KEY: " +key + " @VALUE:" + val);
+
+ //RX.onNext("msgFlow:" + msgFlow);
+ if(key.equals(clssString+"")) {
+
+ //objTwo = objOne.getJSONArray(key);
+ // objTwo = objOne.getJSONObject(key);
+ arrayOne = objOne.getJSONArray(key);
+ //Log.d("FUND", "@arrayOne: " +arrayOne + " @length:" + arrayOne.length() + "");
+
+ for (int i2 = 0; i2 < arrayOne.length(); i2++) {
+
+ // String key2 = objTwo.names().getString(i2) +"";
+ //String key2 = objTwo.names().getString(i2) +"";
+
+ String key2 = arrayOne.get(i2).toString() +"";
+ Log.d( "FUND", "ARRAY = " + key2);
+
+ if(key2.equals(fieldString+"")) {
+
+
+ // nameZero = arrayOne.getString(key2.toS);
+
+ //objTwo = arrayOne.getJSONObject(key2);
+ // arrayTwo = arrayOne.getJSONArray(key2);
+ // JSONArray arrAtores = arrayTwo.getJSONObject();
+
+ //Log.d( "FUND", "objTwo = " + key2.length());
+
+ // for (int i3 = 0; i3< objTwo.length(); i3++) {
+
+ // String key2 = objTwo.names().getString(i3) +"";
+ //String key2 = objTwo.names().getString(i3) +"";
+
+ // Log.v("FUND", "@KEY: " + key2 + " @VALUE:" + key2);
+ // }
+
+ }
+
+ }
+
+ //nameOne = objZero.names().getString(0);
+ }
+
+ }
+
+ // RX.onNext(msgFlow);
+ RX.onNext("resultOne:" + resultOne);
+ }else{
+ RX.onNext("resultOne:" + resultOne);
+ }
+
+ }catch(JSONException e){
+ RX.onError(e);
+ }catch (Exception e){
+ RX.onError(e);
+ }
+
+ return objZero;
+ }
+
+
+
+
+
+
+
+
+
+}
+
diff --git a/banco/app/src/main/java/br/banco/services/app/utils/JsonConvertTypes.java b/banco/app/src/main/java/br/banco/services/app/utils/JsonConvertTypes.java
new file mode 100644
index 00000000..174bbab9
--- /dev/null
+++ b/banco/app/src/main/java/br/banco/services/app/utils/JsonConvertTypes.java
@@ -0,0 +1,261 @@
+package br.banco.services.app.utils;
+
+import android.util.Log;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+public class JsonConvertTypes {
+
+
+ public Map dataToMap = new HashMap();
+
+ public void convertTo(String origin) {
+
+
+
+ String className = "screen";
+ // origin = "xxxx";
+
+ JSONObject jsonObject = convertStringJson( origin, className );
+ // dataToMap = convertToMap(origin);
+
+ // String TES = convertClassName(jsonObject, className);
+
+ }
+
+
+
+ // OK
+
+
+ // OK
+ public JSONObject convertStringJson(String origin, String className) {
+
+ try{
+
+ if( origin.length() > 0 ) {
+
+ Log.d("FUND", "convertStringJson -> SUCESS");
+
+ JSONObject json = new JSONObject(origin);
+ JSONObject parts = json.getJSONObject(className);
+
+ return parts;
+ }
+ else {
+ return null;
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.d("FUND", "convertStringJson -> ERROR - >" + e.toString());
+ return null;
+ }
+
+ }
+
+ // OK
+ public String convertClassName(JSONObject json, String className){
+
+ String classFinal = "A";
+ // String ClassConvert = className.substring(0, 1).toUpperCase() + className.substring(1);
+
+ try {
+ JSONObject mainObj = json.getJSONObject("screen");
+
+ if (mainObj.length() == 10) {
+
+ for(int i = 0; i SUCESS" + classFinal );
+
+ } else {
+ Log.d("FUND", "convertClassName -> ERROR" );
+ return null;
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.d("FUND", "convertClassName -> ERROR - >" + e.toString());
+ return null;
+ }
+
+
+
+
+
+
+ /*
+
+ try {
+ // Field[] fields = classeTry.getFields();
+ //Object fieldType = field.getType();
+
+
+ Screen screen = new Screen();
+ Class classeTry = screen.getClass();
+
+
+
+ Field nameField = classeTry.getField("title");
+
+ Log.v("FUND", "convertClassName -> SUCESSO " + nameField);
+
+ } catch(NoSuchFieldException e) {
+ Log.v("FUND", "convertClassName -> ERRO -> " +e.toString() + " ");
+ }
+ */
+
+ return classFinal;
+ }
+
+
+ public static Map loadMap(JSONObject json) throws JSONException {
+
+ Map retMap = new HashMap();
+
+ if(json != JSONObject.NULL) {
+ retMap = jsonToMap(json);
+ }
+ return retMap;
+ }
+
+ public Map convertToMap(String origin){
+
+ Map dataToMap = new HashMap();
+ boolean error = false;
+
+ try {
+ JSONObject json = new JSONObject(origin);
+ JSONObject mainObj = json.getJSONObject("screen");
+
+ if (mainObj.length() == 10) {
+
+ for(int i = 0; i SUCESS" );
+
+ } else {
+ Log.d("FUND", "convertToMap -> ERROR < 10" );
+ return null;
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.d("FUND", "convertToMap -> ERROR - >" + e.toString());
+ return null;
+ }
+ return dataToMap;
+ }
+
+ public String jsonMapToSring (HashMap mainObj){
+
+ String destiny = null;
+
+ if (mainObj.size() == 10) {
+
+ for(int i = 0; i < mainObj.size(); i++){
+
+ String mapKey = mainObj.get(i) +"";
+ String mapValue = mainObj.get(i) + "";
+
+ dataToMap.put(mapKey, mapValue);
+
+ Log.v("FUND", "" +mapKey + " = " + mapValue);
+ }
+ Log.d("FUND", "convertToMap -> SUCESS" );
+
+ } else {
+ Log.d("FUND", "convertToMap -> ERROR < 10" );
+ return null;
+ }
+
+ return destiny;
+ }
+
+ public static Map jsonToMap(JSONObject object) throws JSONException {
+ Map map = new HashMap();
+
+ Iterator keysItr = object.keys();
+ while(keysItr.hasNext()) {
+ String key = keysItr.next();
+ Object value = object.get(key);
+
+ if(value instanceof JSONArray) {
+ value = jsonToList((JSONArray) value);
+ }
+
+ else if(value instanceof JSONObject) {
+ value = jsonToMap((JSONObject) value);
+ }
+ map.put(key, value);
+ }
+ return map;
+ }
+
+ public static List