fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [1/2] incubator-fineract git commit: Fixing Fixed CWE582, CWE607 issues in account and infrastructure modules
Date Mon, 08 May 2017 06:55:07 GMT
Repository: incubator-fineract
Updated Branches:
  refs/heads/develop 0c658956b -> a8ac5555c


Fixing Fixed CWE582,CWE607 issues in account and infrastructure modules


Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/c72d2e02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/c72d2e02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/c72d2e02

Branch: refs/heads/develop
Commit: c72d2e02cd607d8c46a4e86a0449a45ac692546d
Parents: 8baf9f4
Author: ThisuraThejith <ttcphilips@gmail.com>
Authored: Sun Apr 30 00:26:49 2017 +0530
Committer: ThisuraThejith <ttcphilips@gmail.com>
Committed: Sun Apr 30 00:26:49 2017 +0530

----------------------------------------------------------------------
 .../AccrualAccountingDataValidator.java         |  1 +
 .../api/FinancialActivityAccountsConstants.java | 12 +++--
 .../data/JournalEntryDataValidator.java         |  2 +-
 .../ProvisioningEntriesApiConstants.java        | 12 +++--
 .../sms/serialization/SmsCampaignValidator.java | 14 +++---
 ...ExternalServiceConfigurationApiConstant.java |  3 +-
 .../api/GlobalConfigurationApiConstant.java     |  3 --
 .../data/GlobalConfigurationDataValidator.java  | 46 ++++++++++++--------
 .../data/PaginationParametersDataValidator.java |  2 +-
 .../dataqueries/api/DataTableApiConstant.java   |  2 -
 .../dataqueries/data/DataTableValidator.java    | 22 +++++-----
 .../ContentRepositoryUtils.java                 |  2 +-
 .../api/FineractEntityApiResourceConstants.java | 11 ++---
 .../data/FineractEntityDataValidator.java       | 24 ++++++++--
 .../hooks/api/HookApiConstants.java             |  4 +-
 .../jobs/api/SchedulerJobApiConstants.java      | 26 +++++------
 .../jobs/data/JobDetailDataValidator.java       |  8 +++-
 .../SpringSecurityPlatformSecurityContext.java  |  2 +-
 .../infrastructure/sms/SmsApiConstants.java     |  5 ---
 .../sms/data/SmsDataValidator.java              | 14 +++++-
 .../survey/api/LikelihoodApiConstants.java      |  6 +--
 .../survey/data/LikelihoodDataValidator.java    |  7 ++-
 .../core_db/V325__add_is_staff_client_data.sql  |  1 +
 23 files changed, 136 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java
index 659380e..e3f48c7 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java
@@ -28,6 +28,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.fineract.accounting.accrual.api.AccrualAccountingConstants;
 import org.apache.fineract.infrastructure.core.data.ApiParameterError;
 import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
 import org.apache.fineract.infrastructure.core.exception.InvalidJsonException;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsConstants.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsConstants.java
index 5f59759..418d0d4 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsConstants.java
@@ -23,9 +23,13 @@ import java.util.HashSet;
 import java.util.Set;
 
 public class FinancialActivityAccountsConstants {
-
-    public static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "financialActivityData",
-            "glAccountData", "glAccountOptions", "financialActivityOptions"));
-
+	private static final String idParamName = "id";
+	private static final String factivityDataParamName = "financialActivityData";
+	private static final String glAccountDataParamName = "glAccountData";
+	private static final String glAccountOptionsParamName = "glAccountOptions";
+	private static final String financialActivityOptionsParamName = "financialActivityOptions";
     public static final String resourceNameForPermission = "FINANCIALACTIVITYACCOUNT";
+	protected static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(idParamName, factivityDataParamName, glAccountDataParamName, glAccountOptionsParamName,
+					financialActivityOptionsParamName));
 }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryDataValidator.java
index 240ca9b..a97b393 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryDataValidator.java
@@ -42,7 +42,7 @@ public class JournalEntryDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
 
-    public static final Set<String> RUNNING_BALANCE_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+    private final Set<String> RUNNING_BALANCE_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
             Arrays.asList(JournalEntryJsonInputParams.OFFICE_ID.getValue()));
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/constant/ProvisioningEntriesApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/constant/ProvisioningEntriesApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/constant/ProvisioningEntriesApiConstants.java
index f5a2b06..69cfec4 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/constant/ProvisioningEntriesApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/constant/ProvisioningEntriesApiConstants.java
@@ -31,12 +31,16 @@ public interface ProvisioningEntriesApiConstants {
     public final static String JSON_LOCALE_PARAM = "locale" ;
     
     public final static String JSON_CREATEJOURNALENTRIES_PARAM = "createjournalentries" ;
+
+    public final static String PROVISIONINGENTRY_PARAM = "provisioningentry";
+
+    public final static String ENTRIES_PARAM = "entries";
     
-    Set<String> supportedParameters = new HashSet<>(Arrays.asList(JSON_DATE_PARAM, JSON_DATEFORMAT_PARAM,JSON_LOCALE_PARAM,
-            JSON_CREATEJOURNALENTRIES_PARAM));
+	Set<String> supportedParameters = new HashSet<>(
+			Arrays.asList(JSON_DATE_PARAM, JSON_DATEFORMAT_PARAM, JSON_LOCALE_PARAM, JSON_CREATEJOURNALENTRIES_PARAM));
     
-    Set<String> PROVISIONING_ENTRY_PARAMETERS = new HashSet<>(Arrays.asList("provisioningentry", "entries"));
+    Set<String> PROVISIONING_ENTRY_PARAMETERS = new HashSet<>(Arrays.asList(PROVISIONINGENTRY_PARAM, ENTRIES_PARAM));
 
-    Set<String> ALL_PROVISIONING_ENTRIES = new HashSet<>(Arrays.asList("provisioningentry"));
+    Set<String> ALL_PROVISIONING_ENTRIES = new HashSet<>(Arrays.asList(PROVISIONINGENTRY_PARAM));
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/serialization/SmsCampaignValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/serialization/SmsCampaignValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/serialization/SmsCampaignValidator.java
index 50339a0..dcc9a77 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/serialization/SmsCampaignValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/serialization/SmsCampaignValidator.java
@@ -70,22 +70,26 @@ public class SmsCampaignValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
 
-    public static final Set<String> supportedParams = new HashSet<>(Arrays.asList(campaignName, campaignType, localeParamName,
+    protected static final Set<String> supportedParams = new HashSet<>(Arrays.asList(campaignName, campaignType,
+            localeParamName,
             dateFormatParamName, runReportId, paramValue, message, recurrenceStartDate, activationDateParamName, submittedOnDateParamName,
             closureDateParamName, recurrenceParamName, providerId, triggerType, frequencyParamName, intervalParamName,
             repeatsOnDayParamName, triggerEntityType, triggerActionType, dateTimeFormat));
 
-    public static final Set<String> supportedParamsForUpdate = new HashSet<>(Arrays.asList(campaignName, campaignType, localeParamName,
+    protected static final Set<String> supportedParamsForUpdate = new HashSet<>(Arrays.asList(campaignName, campaignType,
+            localeParamName,
             dateFormatParamName, runReportId, paramValue, message, recurrenceStartDate, activationDateParamName, recurrenceParamName,
             providerId, triggerType, triggerEntityType, triggerActionType, dateTimeFormat));
 
-    public static final Set<String> ACTIVATION_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName, dateFormatParamName,
+    protected static final Set<String> ACTIVATION_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
+            dateFormatParamName,
             activationDateParamName));
 
-    public static final Set<String> CLOSE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName, dateFormatParamName,
+    protected static final Set<String> CLOSE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
+            dateFormatParamName,
             closureDateParamName));
 
-    public static final Set<String> PREVIEW_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(paramValue, message));
+    protected static final Set<String> PREVIEW_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(paramValue, message));
 
     @Autowired
     public SmsCampaignValidator(FromJsonHelper fromApiJsonHelper) {

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServiceConfigurationApiConstant.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServiceConfigurationApiConstant.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServiceConfigurationApiConstant.java
index f4a3af6..f517fbb 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServiceConfigurationApiConstant.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServiceConfigurationApiConstant.java
@@ -28,5 +28,6 @@ public class ExternalServiceConfigurationApiConstant {
     public static final String VALUE = "value";
     public static final String EXTERNAL_SERVICE_RESOURCE_NAME = "externalServiceConfiguration";
 
-    public static final Set<String> EXTERNAL_SERVICE_CONFIGURATION_DATA_PARAMETERS = new HashSet<>(Arrays.asList(NAME, VALUE));
+    protected static final Set<String> EXTERNAL_SERVICE_CONFIGURATION_DATA_PARAMETERS = new HashSet<>(Arrays.asList
+            (NAME, VALUE));
 }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiConstant.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiConstant.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiConstant.java
index b1a12fe..3fe0bd2 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiConstant.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiConstant.java
@@ -32,7 +32,4 @@ public class GlobalConfigurationApiConstant {
     public static final String localeParamName = "locale";
     public static final String dateFormatParamName = "dateFormat";
 
-    public static final Set<String> UPDATE_CONFIGURATION_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName, dateFormatParamName, 
-            ENABLED, VALUE, DATE_VALUE));
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationDataValidator.java
index 15376b5..500ffc1 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationDataValidator.java
@@ -18,16 +18,13 @@
  */
 package org.apache.fineract.infrastructure.configuration.data;
 
-import static org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationApiConstant.CONFIGURATION_RESOURCE_NAME;
-import static org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationApiConstant.ENABLED;
-import static org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationApiConstant.UPDATE_CONFIGURATION_DATA_PARAMETERS;
-import static org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationApiConstant.VALUE;
-import static org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationApiConstant.DATE_VALUE;
-
 import java.lang.reflect.Type;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.joda.time.LocalDate;
@@ -36,6 +33,7 @@ import org.apache.fineract.infrastructure.core.data.ApiParameterError;
 import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
 import org.apache.fineract.infrastructure.core.exception.InvalidJsonException;
 import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
+import org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationApiConstant;
 import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -47,6 +45,10 @@ import com.google.gson.reflect.TypeToken;
 public class GlobalConfigurationDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
+	private static final Set<String> UPDATE_CONFIGURATION_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(GlobalConfigurationApiConstant.localeParamName,
+					GlobalConfigurationApiConstant.dateFormatParamName, GlobalConfigurationApiConstant.ENABLED,
+					GlobalConfigurationApiConstant.VALUE, GlobalConfigurationApiConstant.DATE_VALUE));
 
     @Autowired
     public GlobalConfigurationDataValidator(final FromJsonHelper fromApiJsonHelper) {
@@ -61,23 +63,29 @@ public class GlobalConfigurationDataValidator {
         this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, UPDATE_CONFIGURATION_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
-        final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource(CONFIGURATION_RESOURCE_NAME);
+		final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
+				.resource(GlobalConfigurationApiConstant.CONFIGURATION_RESOURCE_NAME);
         final JsonElement element = this.fromApiJsonHelper.parse(json);
 
-        if (this.fromApiJsonHelper.parameterExists(ENABLED, element)) {
-            final boolean enabledBool = this.fromApiJsonHelper.extractBooleanNamed(ENABLED, element);
-            baseDataValidator.reset().parameter(ENABLED).value(enabledBool).validateForBooleanValue();
-        }
+		if (this.fromApiJsonHelper.parameterExists(GlobalConfigurationApiConstant.ENABLED, element)) {
+			final boolean enabledBool = this.fromApiJsonHelper
+					.extractBooleanNamed(GlobalConfigurationApiConstant.ENABLED, element);
+			baseDataValidator.reset().parameter(GlobalConfigurationApiConstant.ENABLED).value(enabledBool)
+					.validateForBooleanValue();
+		}
 
-        if (this.fromApiJsonHelper.parameterExists(VALUE, element)) {
-            final Long valueStr = this.fromApiJsonHelper.extractLongNamed(VALUE, element);
-            baseDataValidator.reset().parameter(ENABLED).value(valueStr).zeroOrPositiveAmount();
-        }
+		if (this.fromApiJsonHelper.parameterExists(GlobalConfigurationApiConstant.VALUE, element)) {
+			final Long valueStr = this.fromApiJsonHelper.extractLongNamed(GlobalConfigurationApiConstant.VALUE,
+					element);
+			baseDataValidator.reset().parameter(GlobalConfigurationApiConstant.ENABLED).value(valueStr)
+					.zeroOrPositiveAmount();
+		}
         
-        if (this.fromApiJsonHelper.parameterExists(DATE_VALUE, element)) {
-            final LocalDate dateValue = this.fromApiJsonHelper.extractLocalDateNamed(DATE_VALUE, element);
-            baseDataValidator.reset().parameter(DATE_VALUE).value(dateValue).notNull();
-        }
+		if (this.fromApiJsonHelper.parameterExists(GlobalConfigurationApiConstant.DATE_VALUE, element)) {
+			final LocalDate dateValue = this.fromApiJsonHelper
+					.extractLocalDateNamed(GlobalConfigurationApiConstant.DATE_VALUE, element);
+			baseDataValidator.reset().parameter(GlobalConfigurationApiConstant.DATE_VALUE).value(dateValue).notNull();
+		}
 
         if (!dataValidationErrors.isEmpty()) { throw new PlatformApiDataValidationException(dataValidationErrors); }
 

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParametersDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParametersDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParametersDataValidator.java
index 5c23f55..c1edb48 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParametersDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParametersDataValidator.java
@@ -30,7 +30,7 @@ import org.springframework.stereotype.Component;
 @Component
 public class PaginationParametersDataValidator {
 
-    public static Set<String> sortOrderValues = new HashSet<>(Arrays.asList("ASC", "DESC"));
+    private final Set<String> sortOrderValues = new HashSet<>(Arrays.asList("ASC", "DESC"));
 
     public void validateParameterValues(PaginationParameters parameters, final Set<String> supportedOrdeByValues, final String resourceName) {
 

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DataTableApiConstant.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DataTableApiConstant.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DataTableApiConstant.java
index 4b7958c..e629501 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DataTableApiConstant.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DataTableApiConstant.java
@@ -32,8 +32,6 @@ public class DataTableApiConstant {
 
     public static final String categoryParamName ="category";
     public static final String localParamName = "locale";
-    public static final Set<String> REGISTER_PARAMS = new HashSet<>(Arrays.asList(categoryParamName,localParamName));
-
     public static final String DATATABLE_RESOURCE_NAME ="dataTables";
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DataTableValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DataTableValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DataTableValidator.java
index f8172db..f26a722 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DataTableValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DataTableValidator.java
@@ -18,20 +18,18 @@
  */
 package org.apache.fineract.infrastructure.dataqueries.data;
 
-import static org.apache.fineract.infrastructure.dataqueries.api.DataTableApiConstant.CATEGORY_DEFAULT;
-import static org.apache.fineract.infrastructure.dataqueries.api.DataTableApiConstant.CATEGORY_PPI;
-import static org.apache.fineract.infrastructure.dataqueries.api.DataTableApiConstant.DATATABLE_RESOURCE_NAME;
-import static org.apache.fineract.infrastructure.dataqueries.api.DataTableApiConstant.REGISTER_PARAMS;
-import static org.apache.fineract.infrastructure.dataqueries.api.DataTableApiConstant.categoryParamName;
-
 import java.lang.reflect.Type;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.fineract.infrastructure.core.data.ApiParameterError;
 import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
 import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
+import org.apache.fineract.infrastructure.dataqueries.api.DataTableApiConstant;
 import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -43,6 +41,8 @@ import com.google.gson.reflect.TypeToken;
 public class DataTableValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
+	private final Set<String> REGISTER_PARAMS = new HashSet<>(
+			Arrays.asList(DataTableApiConstant.categoryParamName, DataTableApiConstant.localParamName));
 
     @Autowired
     public DataTableValidator(final FromJsonHelper fromApiJsonHelper) {
@@ -55,14 +55,14 @@ public class DataTableValidator {
         this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, REGISTER_PARAMS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
-        final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource(DATATABLE_RESOURCE_NAME);
+        final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource(DataTableApiConstant.DATATABLE_RESOURCE_NAME);
         final JsonElement element = this.fromApiJsonHelper.parse(json);
 
-        if (this.fromApiJsonHelper.parameterExists(categoryParamName, element)) {
+        if (this.fromApiJsonHelper.parameterExists(DataTableApiConstant.categoryParamName, element)) {
 
-            final Integer category = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(categoryParamName, element);
-            Object[] objectArray = new Integer[] { CATEGORY_PPI, CATEGORY_DEFAULT };
-            baseDataValidator.reset().parameter(categoryParamName).value(category).isOneOfTheseValues(objectArray);
+            final Integer category = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(DataTableApiConstant.categoryParamName, element);
+            Object[] objectArray = new Integer[] { DataTableApiConstant.CATEGORY_PPI, DataTableApiConstant.CATEGORY_DEFAULT };
+            baseDataValidator.reset().parameter(DataTableApiConstant.categoryParamName).value(category).isOneOfTheseValues(objectArray);
         }
 
         if (!dataValidationErrors.isEmpty()) { throw new PlatformApiDataValidationException(dataValidationErrors); }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentRepositoryUtils.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentRepositoryUtils.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentRepositoryUtils.java
index a455f55..3815779 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentRepositoryUtils.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentRepositoryUtils.java
@@ -32,7 +32,7 @@ import org.apache.fineract.infrastructure.documentmanagement.exception.ContentMa
 
 public class ContentRepositoryUtils {
 
-    public static Random random = new Random();
+    private static final Random random = new Random();
 
     public static enum IMAGE_MIME_TYPE {
         GIF("image/gif"), JPEG("image/jpeg"), PNG("image/png");

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResourceConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResourceConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResourceConstants.java
index 4788c52..53a54b7 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResourceConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResourceConstants.java
@@ -41,14 +41,9 @@ public class FineractEntityApiResourceConstants {
     public static final String ROLE_ACCESS_TO_LOAN_PRODUCTS = " role_access_to_loan_products ";
     public static final String ROLE_ACCESS_TO_SAVINGS_PRODUCTS = " role_access_to_savings_products ";
 
-    public static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(mappingTypes));
+    protected static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(mappingTypes));
 
-    public static final Set<String> FETCH_ENTITY_TO_ENTITY_MAPPINGS = new HashSet<>(Arrays.asList(mapId,relId,fromEnityType, toEntityType));
-
-    public static final Set<String> CREATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(fromEnityType,
-            toEntityType, startDate, LOCALE, DATE_FORMAT, endDate));
-
-    public static final Set<String> UPDATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(relId,fromEnityType,
-            toEntityType, startDate,LOCALE, DATE_FORMAT, endDate));
+    protected static final Set<String> FETCH_ENTITY_TO_ENTITY_MAPPINGS = new HashSet<>(Arrays.asList(mapId,relId,
+            fromEnityType, toEntityType));
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityDataValidator.java
index cc97dd8..ca9088d 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityDataValidator.java
@@ -20,8 +20,11 @@ package org.apache.fineract.infrastructure.entityaccess.data;
 
 import java.lang.reflect.Type;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.infrastructure.core.data.ApiParameterError;
@@ -41,6 +44,7 @@ import org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundExc
 import org.apache.fineract.useradministration.domain.Role;
 import org.apache.fineract.useradministration.domain.RoleRepository;
 import org.apache.fineract.useradministration.exception.RoleNotFoundException;
+import org.apache.fineract.infrastructure.entityaccess.api.FineractEntityApiResourceConstants;
 import org.joda.time.LocalDate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -48,6 +52,8 @@ import org.springframework.stereotype.Component;
 import com.google.gson.JsonElement;
 import com.google.gson.reflect.TypeToken;
 
+
+
 @Component
 public class FineractEntityDataValidator {
 
@@ -57,6 +63,16 @@ public class FineractEntityDataValidator {
     private final SavingsProductRepository savingsProductRepository;
     private final ChargeRepositoryWrapper chargeRepositoryWrapper;
     private final RoleRepository roleRepository;
+	private static final Set<String> CREATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+			FineractEntityApiResourceConstants.fromEnityType, FineractEntityApiResourceConstants.toEntityType,
+			FineractEntityApiResourceConstants.startDate, FineractEntityApiResourceConstants.LOCALE,
+			FineractEntityApiResourceConstants.DATE_FORMAT, FineractEntityApiResourceConstants.endDate));
+
+	private static final Set<String> UPDATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(FineractEntityApiResourceConstants.relId, FineractEntityApiResourceConstants.fromEnityType,
+					FineractEntityApiResourceConstants.toEntityType, FineractEntityApiResourceConstants.startDate,
+					FineractEntityApiResourceConstants.LOCALE, FineractEntityApiResourceConstants.DATE_FORMAT,
+					FineractEntityApiResourceConstants.endDate));
 
     @Autowired
     public FineractEntityDataValidator(final FromJsonHelper fromApiJsonHelper, final OfficeRepositoryWrapper officeRepositoryWrapper,
@@ -75,8 +91,8 @@ public class FineractEntityDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json,
-                FineractEntityApiResourceConstants.CREATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS);
+		this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json,
+				CREATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS);
         final JsonElement element = this.fromApiJsonHelper.parse(json);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
@@ -172,8 +188,8 @@ public class FineractEntityDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json,
-                FineractEntityApiResourceConstants.UPDATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS);
+		this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json,
+				UPDATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS);
         final JsonElement element = this.fromApiJsonHelper.parse(json);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiConstants.java
index 96d53d8..3a96a7a 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiConstants.java
@@ -62,12 +62,12 @@ public class HookApiConstants {
 
     public static final String templateNameParamName = "templateName";
 
-    public static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(
+    protected static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(
             Arrays.asList(nameParamName, displayNameParamName,
                     templateIdParamName, isActiveParamName, configParamName,
                     eventsParamName, templateNameParamName));
 
-    public static final Set<String> UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+    protected static final Set<String> UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
             Arrays.asList(nameParamName, displayNameParamName,
                     templateIdParamName, isActiveParamName, configParamName,
                     eventsParamName, templateNameParamName));

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiConstants.java
index e6683b5..eeb9a3a 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiConstants.java
@@ -45,19 +45,6 @@ public class SchedulerJobApiConstants {
     public static final String cronExpressionParamName = "cronExpression";
     public static final String schedulerStatusParamName = "active";
 
-    public static final Set<String> JOB_DETAIL_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(jobIdentifierParamName,
-            displayNameParamName, nextRunTimeParamName, initializingErrorParamName, cronExpressionParamName, jobActiveStatusParamName,
-            currentlyRunningParamName, lastRunHistoryObjParamName));
-
-    public static final Set<String> JOB_HISTORY_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(versionParamName,
-            jobRunStartTimeParamName, jobRunEndTimeParamName, statusParamName, jobRunErrorMessageParamName, triggerTypeParamName,
-            jobRunErrorLogParamName));
-
-    public static final Set<String> JOB_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(displayNameParamName,
-            jobActiveStatusParamName, cronExpressionParamName));
-
-    public static final Set<String> SCHEDULER_DETAIL_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(schedulerStatusParamName));
-
     public static final String COMMAND_EXECUTE_JOB = "executeJob";
     public static final String COMMAND_STOP_SCHEDULER = "stop";
     public static final String COMMAND_START_SCHEDULER = "start";
@@ -65,4 +52,17 @@ public class SchedulerJobApiConstants {
     public static final String JOB_ID = "jobId";
     public static final String JOB_RUN_HISTORY = "runhistory";
     public static final String SCHEDULER_STATUS_PATH = "scheduler";
+
+    protected static final Set<String> JOB_DETAIL_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList
+            (jobIdentifierParamName,
+            displayNameParamName, nextRunTimeParamName, initializingErrorParamName, cronExpressionParamName, jobActiveStatusParamName,
+            currentlyRunningParamName, lastRunHistoryObjParamName));
+
+    protected static final Set<String> JOB_HISTORY_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList
+            (versionParamName,
+            jobRunStartTimeParamName, jobRunEndTimeParamName, statusParamName, jobRunErrorMessageParamName, triggerTypeParamName,
+            jobRunErrorLogParamName));
+
+    protected static final Set<String> SCHEDULER_DETAIL_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList
+            (schedulerStatusParamName));
 }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailDataValidator.java
index bc58c7c..77462e0 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailDataValidator.java
@@ -20,8 +20,11 @@ package org.apache.fineract.infrastructure.jobs.data;
 
 import java.lang.reflect.Type;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.infrastructure.core.data.ApiParameterError;
@@ -40,6 +43,9 @@ import com.google.gson.reflect.TypeToken;
 public class JobDetailDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
+	private static final Set<String> JOB_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+			SchedulerJobApiConstants.displayNameParamName, SchedulerJobApiConstants.jobActiveStatusParamName,
+			SchedulerJobApiConstants.cronExpressionParamName));
 
     @Autowired
     public JobDetailDataValidator(final FromJsonHelper fromApiJsonHelper) {
@@ -51,7 +57,7 @@ public class JobDetailDataValidator {
 
         boolean atLeastOneParameterPassedForUpdate = false;
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SchedulerJobApiConstants.JOB_UPDATE_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, JOB_UPDATE_REQUEST_DATA_PARAMETERS);
         final JsonElement element = this.fromApiJsonHelper.parse(json);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/SpringSecurityPlatformSecurityContext.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/SpringSecurityPlatformSecurityContext.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/SpringSecurityPlatformSecurityContext.java
index d878f3d..3bd93c7 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/SpringSecurityPlatformSecurityContext.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/SpringSecurityPlatformSecurityContext.java
@@ -50,7 +50,7 @@ public class SpringSecurityPlatformSecurityContext implements PlatformSecurityCo
 
     private final ConfigurationDomainService configurationDomainService;
 
-    public static final List<CommandWrapper> EXEMPT_FROM_PASSWORD_RESET_CHECK = new ArrayList<CommandWrapper>() {
+    protected static final List<CommandWrapper> EXEMPT_FROM_PASSWORD_RESET_CHECK = new ArrayList<CommandWrapper>() {
 
         {
             add(new CommandWrapperBuilder().updateUser(null).build());

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/SmsApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/SmsApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/SmsApiConstants.java
index c55641f..c75b486 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/SmsApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/SmsApiConstants.java
@@ -42,9 +42,4 @@ public class SmsApiConstants {
     // response parameters
     public static final String statusParamName = "status";
 
-    public static final Set<String> CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            dateFormatParamName, groupIdParamName, clientIdParamName, staffIdParamName, messageParamName, campaignIdParamName));
-
-    public static final Set<String> UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(messageParamName, campaignIdParamName));
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsDataValidator.java
index 99dae7e..698226d 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsDataValidator.java
@@ -20,8 +20,11 @@ package org.apache.fineract.infrastructure.sms.data;
 
 import java.lang.reflect.Type;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.infrastructure.core.data.ApiParameterError;
@@ -40,6 +43,13 @@ import com.google.gson.reflect.TypeToken;
 public final class SmsDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
+	private static final Set<String> CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+			SmsApiConstants.localeParamName, SmsApiConstants.dateFormatParamName, SmsApiConstants.groupIdParamName,
+			SmsApiConstants.clientIdParamName, SmsApiConstants.staffIdParamName, SmsApiConstants.messageParamName,
+			SmsApiConstants.campaignIdParamName));
+
+	public static final Set<String> UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(SmsApiConstants.messageParamName, SmsApiConstants.campaignIdParamName));
 
     @Autowired
     public SmsDataValidator(final FromJsonHelper fromApiJsonHelper) {
@@ -51,7 +61,7 @@ public final class SmsDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SmsApiConstants.CREATE_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, CREATE_REQUEST_DATA_PARAMETERS);
         final JsonElement element = this.fromApiJsonHelper.parse(json);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
@@ -115,7 +125,7 @@ public final class SmsDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SmsApiConstants.UPDATE_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, UPDATE_REQUEST_DATA_PARAMETERS);
         final JsonElement element = this.fromApiJsonHelper.parse(json);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiConstants.java
index e7f296f..c1d14b7 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiConstants.java
@@ -30,8 +30,6 @@ public class LikelihoodApiConstants {
 
     public static final String LIKELIHOOD_RESOURCE_NAME = "likelihood";
 
-    public static final Set<String> UPDATE_LIKELIHOOD_DATA_PARAMETERS = new HashSet<>(Arrays.asList(ACTIVE));
-
-    public static final Set<Long> VALID_LIKELIHOOD_ENABLED_VALUES = new HashSet<>(Arrays.asList(LikelihoodStatus.DISABLED,
-            LikelihoodStatus.ENABLED));
+	protected static final Set<Long> VALID_LIKELIHOOD_ENABLED_VALUES = new HashSet<>(
+			Arrays.asList(LikelihoodStatus.DISABLED, LikelihoodStatus.ENABLED));
 }

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodDataValidator.java
index 98120cc..1028d01 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodDataValidator.java
@@ -33,8 +33,11 @@ import org.springframework.stereotype.Component;
 
 import java.lang.reflect.Type;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * Created by Cieyou on 3/12/14.
@@ -44,6 +47,8 @@ import java.util.Map;
 public class LikelihoodDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
+	private static final Set<String> UPDATE_LIKELIHOOD_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(LikelihoodApiConstants.ACTIVE));
 
     @Autowired
     public LikelihoodDataValidator(final FromJsonHelper fromApiJsonHelper) {
@@ -55,7 +60,7 @@ public class LikelihoodDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, LikelihoodApiConstants.UPDATE_LIKELIHOOD_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, UPDATE_LIKELIHOOD_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource(LikelihoodApiConstants.LIKELIHOOD_RESOURCE_NAME);

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/c72d2e02/fineract-provider/src/main/resources/sql/migrations/core_db/V325__add_is_staff_client_data.sql
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/resources/sql/migrations/core_db/V325__add_is_staff_client_data.sql b/fineract-provider/src/main/resources/sql/migrations/core_db/V325__add_is_staff_client_data.sql
index ef9854b..2d6b359 100644
--- a/fineract-provider/src/main/resources/sql/migrations/core_db/V325__add_is_staff_client_data.sql
+++ b/fineract-provider/src/main/resources/sql/migrations/core_db/V325__add_is_staff_client_data.sql
@@ -16,5 +16,6 @@
 -- specific language governing permissions and limitations
 -- under the License.
 --
+
 ALTER TABLE `m_client`
 	ADD COLUMN `is_staff` TINYINT(1) NOT NULL DEFAULT '0' AFTER `mobile_no`;


Mime
View raw message