fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [3/6] fineract git commit: Completed the sonar fixes in FINERATC-436
Date Fri, 16 Jun 2017 14:51:01 GMT
http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java
index 51f4e95..7af776e 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java
@@ -36,6 +36,7 @@ import org.apache.fineract.infrastructure.core.exception.InvalidJsonException;
 import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
 import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
 import org.apache.fineract.infrastructure.core.service.DateUtils;
+import org.apache.fineract.portfolio.client.data.ClientApiCollectionConstants;
 import org.apache.fineract.portfolio.client.api.ClientApiConstants;
 import org.joda.time.LocalDate;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -59,19 +60,19 @@ public final class ClientDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiConstants.CLIENT_CREATE_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_CREATE_REQUEST_DATA_PARAMETERS);
         final JsonElement element = this.fromApiJsonHelper.parse(json);
         
         if (this.fromApiJsonHelper.parameterExists(ClientApiConstants.clientNonPersonDetailsParamName, element)) {
 	        final String clientNonPersonJson = this.fromApiJsonHelper.toJson(element.getAsJsonObject().get(ClientApiConstants.clientNonPersonDetailsParamName));
 	        if(clientNonPersonJson != null)
-	        	this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, clientNonPersonJson, ClientApiConstants.CLIENT_NON_PERSON_CREATE_REQUEST_DATA_PARAMETERS);
+	        	this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, clientNonPersonJson, ClientApiCollectionConstants.CLIENT_NON_PERSON_CREATE_REQUEST_DATA_PARAMETERS);
         }
         
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final Long officeId = this.fromApiJsonHelper.extractLongNamed(ClientApiConstants.officeIdParamName, element);
         baseDataValidator.reset().parameter(ClientApiConstants.officeIdParamName).value(officeId).notNull().integerGreaterThanZero();
@@ -228,7 +229,7 @@ public final class ClientDataValidator {
     	final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
         
         if (this.fromApiJsonHelper.parameterExists(ClientApiConstants.incorpNumberParamName, element)) {
             final String incorpNumber = this.fromApiJsonHelper.extractStringNamed(ClientApiConstants.incorpNumberParamName, element);
@@ -332,19 +333,19 @@ public final class ClientDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiConstants.CLIENT_UPDATE_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_UPDATE_REQUEST_DATA_PARAMETERS);
         final JsonElement element = this.fromApiJsonHelper.parse(json);
         
         if (this.fromApiJsonHelper.parameterExists(ClientApiConstants.clientNonPersonDetailsParamName, element)) {
 	        final String clientNonPersonJson = this.fromApiJsonHelper.toJson(element.getAsJsonObject().get(ClientApiConstants.clientNonPersonDetailsParamName));
 	        if(clientNonPersonJson != null)
-	        	this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, clientNonPersonJson, ClientApiConstants.CLIENT_NON_PERSON_UPDATE_REQUEST_DATA_PARAMETERS);
+	        	this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, clientNonPersonJson, ClientApiCollectionConstants.CLIENT_NON_PERSON_UPDATE_REQUEST_DATA_PARAMETERS);
         }
 	        
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         boolean atLeastOneParameterPassedForUpdate = false;
         if (this.fromApiJsonHelper.parameterExists(ClientApiConstants.accountNoParamName, element)) {
@@ -509,7 +510,7 @@ public final class ClientDataValidator {
     	final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
     	
     	if (this.fromApiJsonHelper.parameterExists(ClientApiConstants.incorpNumberParamName, element)) {
             atLeastOneParameterPassedForUpdate = true;
@@ -555,11 +556,11 @@ public final class ClientDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiConstants.ACTIVATION_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.ACTIVATION_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final JsonElement element = command.parsedJson();
 
@@ -614,7 +615,7 @@ public final class ClientDataValidator {
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final String staffIdParameterName = ClientApiConstants.staffIdParamName;
         final Long staffId = this.fromApiJsonHelper.extractLongNamed(staffIdParameterName, element);
@@ -631,11 +632,11 @@ public final class ClientDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiConstants.CLIENT_CLOSE_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_CLOSE_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final JsonElement element = command.parsedJson();
 
@@ -663,7 +664,7 @@ public final class ClientDataValidator {
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final String savingsIdParameterName = ClientApiConstants.savingsAccountIdParamName;
         final Long savingsId = this.fromApiJsonHelper.extractLongNamed(savingsIdParameterName, element);
@@ -680,11 +681,11 @@ public final class ClientDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiConstants.CLIENT_REJECT_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_REJECT_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final JsonElement element = command.parsedJson();
 
@@ -706,11 +707,11 @@ public final class ClientDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiConstants.CLIENT_WITHDRAW_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_WITHDRAW_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final JsonElement element = command.parsedJson();
 
@@ -732,11 +733,11 @@ public final class ClientDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiConstants.REACTIVATION_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.REACTIVATION_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final JsonElement element = command.parsedJson();
 
@@ -756,11 +757,11 @@ public final class ClientDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiConstants.UNDOREJECTION_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.UNDOREJECTION_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final JsonElement element = command.parsedJson();
 
@@ -779,11 +780,11 @@ public final class ClientDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiConstants.UNDOWITHDRAWN_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.UNDOWITHDRAWN_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(ClientApiConstants.CLIENT_RESOURCE_NAME);
+                .resource(ClientApiCollectionConstants.CLIENT_RESOURCE_NAME);
 
         final JsonElement element = command.parsedJson();
 

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/CollectionSheetConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/CollectionSheetConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/CollectionSheetConstants.java
index 7021849..9b8ca2f 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/CollectionSheetConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/CollectionSheetConstants.java
@@ -50,19 +50,4 @@ public class CollectionSheetConstants {
     public static final String loanIdParamName = "loanId";
     public static final String savingsIdParamName = "savingsId";
     public static final String transactionAmountParamName = "transactionAmount";
-
-    public static final Set<String> COLLECTIONSHEET_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            dateFormatParamName, transactionDateParamName, actualDisbursementDateParamName, bulkRepaymentTransactionsParamName,
-            bulkDisbursementTransactionsParamName, noteParamName, calendarIdParamName, clientsAttendanceParamName,
-            bulkSavingsDueTransactionsParamName, PaymentDetailConstants.paymentTypeParamName,
-            PaymentDetailConstants.accountNumberParamName, PaymentDetailConstants.checkNumberParamName,
-            PaymentDetailConstants.routingCodeParamName, PaymentDetailConstants.receiptNumberParamName,
-            PaymentDetailConstants.bankNumberParamName, isTransactionDateOnNonMeetingDateParamName));
-
-    public static final Set<String> INDIVIDUAL_COLLECTIONSHEET_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            dateFormatParamName, transactionDateParamName, actualDisbursementDateParamName, bulkRepaymentTransactionsParamName,
-            bulkDisbursementTransactionsParamName, noteParamName, bulkSavingsDueTransactionsParamName));
-
-    public static final Set<String> INDIVIDUAL_COLLECTIONSHEET_SUPPORTED_PARAMS = new HashSet<>(Arrays.asList(transactionDateParamName,
-            localeParamName, dateFormatParamName, officeIdParamName, staffIdParamName));
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetTransactionDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetTransactionDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetTransactionDataValidator.java
index 39200e7..826f4a3 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetTransactionDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetTransactionDataValidator.java
@@ -18,28 +18,15 @@
  */
 package org.apache.fineract.portfolio.collectionsheet.data;
 
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.COLLECTIONSHEET_REQUEST_DATA_PARAMETERS;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.COLLECTIONSHEET_RESOURCE_NAME;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.INDIVIDUAL_COLLECTIONSHEET_REQUEST_DATA_PARAMETERS;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.attendanceTypeParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.bulkDisbursementTransactionsParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.bulkRepaymentTransactionsParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.bulkSavingsDueTransactionsParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.calendarIdParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.clientIdParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.clientsAttendanceParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.loanIdParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.noteParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.savingsIdParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.transactionAmountParamName;
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.transactionDateParamName;
-
 import java.lang.reflect.Type;
 import java.math.BigDecimal;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -48,6 +35,7 @@ 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.core.serialization.FromJsonHelper;
+import org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants;
 import org.apache.fineract.portfolio.paymentdetail.PaymentDetailConstants;
 import org.joda.time.LocalDate;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -62,6 +50,30 @@ import com.google.gson.reflect.TypeToken;
 public class CollectionSheetTransactionDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
+    private static final Set<String> COLLECTIONSHEET_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList
+            (CollectionSheetConstants.localeParamName,
+            CollectionSheetConstants.dateFormatParamName, CollectionSheetConstants.transactionDateParamName,
+            CollectionSheetConstants.actualDisbursementDateParamName,
+            CollectionSheetConstants.bulkRepaymentTransactionsParamName,
+            CollectionSheetConstants.bulkDisbursementTransactionsParamName, CollectionSheetConstants.noteParamName,
+            CollectionSheetConstants.calendarIdParamName,
+            CollectionSheetConstants.clientsAttendanceParamName,
+            CollectionSheetConstants.bulkSavingsDueTransactionsParamName, PaymentDetailConstants.paymentTypeParamName,
+            PaymentDetailConstants.accountNumberParamName, PaymentDetailConstants.checkNumberParamName,
+            PaymentDetailConstants.routingCodeParamName, PaymentDetailConstants.receiptNumberParamName,
+            PaymentDetailConstants.bankNumberParamName, CollectionSheetConstants.isTransactionDateOnNonMeetingDateParamName));
+
+	private static final Set<String> INDIVIDUAL_COLLECTIONSHEET_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+			CollectionSheetConstants.localeParamName, CollectionSheetConstants.dateFormatParamName,
+			CollectionSheetConstants.transactionDateParamName, CollectionSheetConstants.actualDisbursementDateParamName,
+			CollectionSheetConstants.bulkRepaymentTransactionsParamName,
+			CollectionSheetConstants.bulkDisbursementTransactionsParamName, CollectionSheetConstants.noteParamName,
+			CollectionSheetConstants.bulkSavingsDueTransactionsParamName));
+
+	private static final Set<String> PAYMENT_CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(PaymentDetailConstants.accountNumberParamName, PaymentDetailConstants.checkNumberParamName,
+					PaymentDetailConstants.routingCodeParamName, PaymentDetailConstants.receiptNumberParamName,
+					PaymentDetailConstants.bankNumberParamName));
 
     @Autowired
     public CollectionSheetTransactionDataValidator(final FromJsonHelper fromApiJsonHelper) {
@@ -77,20 +89,24 @@ public class CollectionSheetTransactionDataValidator {
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(COLLECTIONSHEET_RESOURCE_NAME);
+                .resource(CollectionSheetConstants.COLLECTIONSHEET_RESOURCE_NAME);
 
         final JsonElement element = this.fromApiJsonHelper.parse(json);
 
-        final LocalDate transactionDate = this.fromApiJsonHelper.extractLocalDateNamed(transactionDateParamName, element);
-        baseDataValidator.reset().parameter(transactionDateParamName).value(transactionDate).notNull();
+        final LocalDate transactionDate = this.fromApiJsonHelper.extractLocalDateNamed(CollectionSheetConstants
+                .transactionDateParamName, element);
+        baseDataValidator.reset().parameter(CollectionSheetConstants.transactionDateParamName).value(transactionDate)
+                .notNull();
 
-        final String note = this.fromApiJsonHelper.extractStringNamed(noteParamName, element);
+        final String note = this.fromApiJsonHelper.extractStringNamed(CollectionSheetConstants.noteParamName, element);
         if (StringUtils.isNotBlank(note)) {
-            baseDataValidator.reset().parameter(noteParamName).value(note).notExceedingLengthOf(1000);
+            baseDataValidator.reset().parameter(CollectionSheetConstants.noteParamName).value(note)
+                    .notExceedingLengthOf(1000);
         }
 
-        final Long calendarId = this.fromApiJsonHelper.extractLongNamed(calendarIdParamName, element);
-        baseDataValidator.reset().parameter(calendarIdParamName).value(calendarId).notNull();
+        final Long calendarId = this.fromApiJsonHelper.extractLongNamed(CollectionSheetConstants.calendarIdParamName,
+                element);
+        baseDataValidator.reset().parameter(CollectionSheetConstants.calendarIdParamName).value(calendarId).notNull();
 
         validateAttendanceDetails(element, baseDataValidator);
 
@@ -110,20 +126,24 @@ public class CollectionSheetTransactionDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, INDIVIDUAL_COLLECTIONSHEET_REQUEST_DATA_PARAMETERS);
+		this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json,
+				INDIVIDUAL_COLLECTIONSHEET_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
-                .resource(COLLECTIONSHEET_RESOURCE_NAME);
+                .resource(CollectionSheetConstants.COLLECTIONSHEET_RESOURCE_NAME);
 
         final JsonElement element = this.fromApiJsonHelper.parse(json);
 
-        final LocalDate transactionDate = this.fromApiJsonHelper.extractLocalDateNamed(transactionDateParamName, element);
-        baseDataValidator.reset().parameter(transactionDateParamName).value(transactionDate).notNull();
+        final LocalDate transactionDate = this.fromApiJsonHelper.extractLocalDateNamed(CollectionSheetConstants
+                .transactionDateParamName, element);
+        baseDataValidator.reset().parameter(CollectionSheetConstants.transactionDateParamName).value(transactionDate)
+                .notNull();
 
-        final String note = this.fromApiJsonHelper.extractStringNamed(noteParamName, element);
+        final String note = this.fromApiJsonHelper.extractStringNamed(CollectionSheetConstants.noteParamName, element);
         if (StringUtils.isNotBlank(note)) {
-            baseDataValidator.reset().parameter(noteParamName).value(note).notExceedingLengthOf(1000);
+            baseDataValidator.reset().parameter(CollectionSheetConstants.noteParamName).value(note)
+                    .notExceedingLengthOf(1000);
         }
 
         validateDisbursementTransactions(element, baseDataValidator);
@@ -138,15 +158,21 @@ public class CollectionSheetTransactionDataValidator {
     private void validateAttendanceDetails(final JsonElement element, final DataValidatorBuilder baseDataValidator) {
         final JsonObject topLevelJsonElement = element.getAsJsonObject();
         if (element.isJsonObject()) {
-            if (topLevelJsonElement.has(clientsAttendanceParamName) && topLevelJsonElement.get(clientsAttendanceParamName).isJsonArray()) {
-                final JsonArray array = topLevelJsonElement.get(clientsAttendanceParamName).getAsJsonArray();
+            if (topLevelJsonElement.has(CollectionSheetConstants.clientsAttendanceParamName) && topLevelJsonElement
+                    .get(CollectionSheetConstants.clientsAttendanceParamName).isJsonArray()) {
+                final JsonArray array = topLevelJsonElement.get(CollectionSheetConstants.clientsAttendanceParamName)
+                        .getAsJsonArray();
                 for (int i = 0; i < array.size(); i++) {
                     final JsonObject attendanceElement = array.get(i).getAsJsonObject();
-                    final Long clientId = this.fromApiJsonHelper.extractLongNamed(clientIdParamName, attendanceElement);
-                    final Long attendanceType = this.fromApiJsonHelper.extractLongNamed(attendanceTypeParamName, attendanceElement);
-                    baseDataValidator.reset().parameter(clientsAttendanceParamName + "[" + i + "]." + clientIdParamName).value(clientId)
+                    final Long clientId = this.fromApiJsonHelper.extractLongNamed(CollectionSheetConstants
+                            .clientIdParamName, attendanceElement);
+                    final Long attendanceType = this.fromApiJsonHelper.extractLongNamed(CollectionSheetConstants
+                            .attendanceTypeParamName, attendanceElement);
+                    baseDataValidator.reset().parameter(CollectionSheetConstants.clientsAttendanceParamName + "[" + i
+                            + "]." + CollectionSheetConstants.clientIdParamName).value(clientId)
                             .notNull().integerGreaterThanZero();
-                    baseDataValidator.reset().parameter(clientsAttendanceParamName + "[" + i + "]." + attendanceTypeParamName)
+                    baseDataValidator.reset().parameter(CollectionSheetConstants.clientsAttendanceParamName + "[" + i
+                            + "]." + CollectionSheetConstants.attendanceTypeParamName)
                             .value(attendanceType).notNull().integerGreaterThanZero();
                 }
             }
@@ -157,14 +183,18 @@ public class CollectionSheetTransactionDataValidator {
         final JsonObject topLevelJsonElement = element.getAsJsonObject();
         final Locale locale = this.fromApiJsonHelper.extractLocaleParameter(topLevelJsonElement);
         if (element.isJsonObject()) {
-            if (topLevelJsonElement.has(bulkDisbursementTransactionsParamName)
-                    && topLevelJsonElement.get(bulkDisbursementTransactionsParamName).isJsonArray()) {
-                final JsonArray array = topLevelJsonElement.get(bulkDisbursementTransactionsParamName).getAsJsonArray();
+            if (topLevelJsonElement.has(CollectionSheetConstants.bulkDisbursementTransactionsParamName)
+                    && topLevelJsonElement.get(CollectionSheetConstants.bulkDisbursementTransactionsParamName)
+                    .isJsonArray()) {
+                final JsonArray array = topLevelJsonElement.get(CollectionSheetConstants
+                        .bulkDisbursementTransactionsParamName).getAsJsonArray();
 
                 for (int i = 0; i < array.size(); i++) {
                     final JsonObject loanTransactionElement = array.get(i).getAsJsonObject();
-                    final Long loanId = this.fromApiJsonHelper.extractLongNamed(loanIdParamName, loanTransactionElement);
-                    final BigDecimal disbursementAmount = this.fromApiJsonHelper.extractBigDecimalNamed(transactionAmountParamName,
+                    final Long loanId = this.fromApiJsonHelper.extractLongNamed(CollectionSheetConstants
+                            .loanIdParamName, loanTransactionElement);
+                    final BigDecimal disbursementAmount = this.fromApiJsonHelper.extractBigDecimalNamed
+                            (CollectionSheetConstants.transactionAmountParamName,
                             loanTransactionElement, locale);
 
                     baseDataValidator.reset().parameter("bulktransaction" + "[" + i + "].loan.id").value(loanId).notNull()
@@ -180,14 +210,18 @@ public class CollectionSheetTransactionDataValidator {
         final JsonObject topLevelJsonElement = element.getAsJsonObject();
         final Locale locale = this.fromApiJsonHelper.extractLocaleParameter(topLevelJsonElement);
         if (element.isJsonObject()) {
-            if (topLevelJsonElement.has(bulkRepaymentTransactionsParamName)
-                    && topLevelJsonElement.get(bulkRepaymentTransactionsParamName).isJsonArray()) {
-                final JsonArray array = topLevelJsonElement.get(bulkRepaymentTransactionsParamName).getAsJsonArray();
+            if (topLevelJsonElement.has(CollectionSheetConstants.bulkRepaymentTransactionsParamName)
+                    && topLevelJsonElement.get(CollectionSheetConstants.bulkRepaymentTransactionsParamName)
+                    .isJsonArray()) {
+                final JsonArray array = topLevelJsonElement.get(CollectionSheetConstants
+                        .bulkRepaymentTransactionsParamName).getAsJsonArray();
 
                 for (int i = 0; i < array.size(); i++) {
                     final JsonObject loanTransactionElement = array.get(i).getAsJsonObject();
-                    final Long loanId = this.fromApiJsonHelper.extractLongNamed(loanIdParamName, loanTransactionElement);
-                    final BigDecimal disbursementAmount = this.fromApiJsonHelper.extractBigDecimalNamed(transactionAmountParamName,
+                    final Long loanId = this.fromApiJsonHelper.extractLongNamed(CollectionSheetConstants
+                            .loanIdParamName, loanTransactionElement);
+                    final BigDecimal disbursementAmount = this.fromApiJsonHelper.extractBigDecimalNamed
+                            (CollectionSheetConstants.transactionAmountParamName,
                             loanTransactionElement, locale);
 
                     baseDataValidator.reset().parameter("bulktransaction" + "[" + i + "].loan.id").value(loanId).notNull()
@@ -205,14 +239,18 @@ public class CollectionSheetTransactionDataValidator {
         final JsonObject topLevelJsonElement = element.getAsJsonObject();
         final Locale locale = this.fromApiJsonHelper.extractLocaleParameter(topLevelJsonElement);
         if (element.isJsonObject()) {
-            if (topLevelJsonElement.has(bulkSavingsDueTransactionsParamName)
-                    && topLevelJsonElement.get(bulkSavingsDueTransactionsParamName).isJsonArray()) {
-                final JsonArray array = topLevelJsonElement.get(bulkSavingsDueTransactionsParamName).getAsJsonArray();
+            if (topLevelJsonElement.has(CollectionSheetConstants.bulkSavingsDueTransactionsParamName)
+                    && topLevelJsonElement.get(CollectionSheetConstants.bulkSavingsDueTransactionsParamName)
+                    .isJsonArray()) {
+                final JsonArray array = topLevelJsonElement.get(CollectionSheetConstants
+                        .bulkSavingsDueTransactionsParamName).getAsJsonArray();
 
                 for (int i = 0; i < array.size(); i++) {
                     final JsonObject savingsTransactionElement = array.get(i).getAsJsonObject();
-                    final Long savingsId = this.fromApiJsonHelper.extractLongNamed(savingsIdParamName, savingsTransactionElement);
-                    final BigDecimal dueAmount = this.fromApiJsonHelper.extractBigDecimalNamed(transactionAmountParamName,
+                    final Long savingsId = this.fromApiJsonHelper.extractLongNamed(CollectionSheetConstants
+                            .savingsIdParamName, savingsTransactionElement);
+                    final BigDecimal dueAmount = this.fromApiJsonHelper.extractBigDecimalNamed
+                            (CollectionSheetConstants.transactionAmountParamName,
                             savingsTransactionElement, locale);
 
                     baseDataValidator.reset().parameter("bulktransaction" + "[" + i + "].savings.id").value(savingsId).notNull()
@@ -231,7 +269,7 @@ public class CollectionSheetTransactionDataValidator {
                 locale);
         baseDataValidator.reset().parameter(PaymentDetailConstants.paymentTypeParamName).value(paymentTypeId).ignoreIfNull()
                 .integerGreaterThanZero();
-        for (final String paymentDetailParameterName : PaymentDetailConstants.PAYMENT_CREATE_REQUEST_DATA_PARAMETERS) {
+        for (final String paymentDetailParameterName : PAYMENT_CREATE_REQUEST_DATA_PARAMETERS) {
             final String paymentDetailParameterValue = this.fromApiJsonHelper.extractStringNamed(paymentDetailParameterName, element);
             baseDataValidator.reset().parameter(paymentDetailParameterName).value(paymentDetailParameterValue).ignoreIfNull()
                     .notExceedingLengthOf(50);

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetGenerateCommandFromApiJsonDeserializer.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetGenerateCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetGenerateCommandFromApiJsonDeserializer.java
index 29b17fc..6f7f4d6 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetGenerateCommandFromApiJsonDeserializer.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetGenerateCommandFromApiJsonDeserializer.java
@@ -18,7 +18,6 @@
  */
 package org.apache.fineract.portfolio.collectionsheet.serialization;
 
-import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.INDIVIDUAL_COLLECTIONSHEET_SUPPORTED_PARAMS;
 import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.calendarIdParamName;
 import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.dateFormatParamName;
 import static org.apache.fineract.portfolio.collectionsheet.CollectionSheetConstants.localeParamName;
@@ -53,8 +52,11 @@ public class CollectionSheetGenerateCommandFromApiJsonDeserializer {
     /**
      * The parameters supported for this command.
      */
-    final Set<String> supportedParameters = new HashSet<>(Arrays.asList(transactionDateParamName, localeParamName, dateFormatParamName,
-            calendarIdParamName));
+	final Set<String> supportedParameters = new HashSet<>(
+			Arrays.asList(transactionDateParamName, localeParamName, dateFormatParamName, calendarIdParamName));
+
+	private static final Set<String> INDIVIDUAL_COLLECTIONSHEET_SUPPORTED_PARAMS = new HashSet<>(Arrays.asList(
+			transactionDateParamName, localeParamName, dateFormatParamName, officeIdParamName, staffIdParamName));
 
     private final FromJsonHelper fromApiJsonHelper;
 

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java
index bc3ebd0..0f6a19f 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java
@@ -89,45 +89,31 @@ public class GroupingTypesApiConstants {
 
     public static final String datatables = "datatables";
 
-    public static final Set<String> CENTER_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            dateFormatParamName, idParamName, nameParamName, externalIdParamName, officeIdParamName, staffIdParamName, activeParamName,
-            activationDateParamName, groupMembersParamName, submittedOnDateParamName, datatables));
-
-    public static final Set<String> GROUP_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName, dateFormatParamName,
-            idParamName, nameParamName, externalIdParamName, centerIdParamName, officeIdParamName, staffIdParamName, activeParamName,
-            activationDateParamName, clientMembersParamName, collectionMeetingCalendar, submittedOnDateParamName, datatables));
-
-    public static final Set<String> GROUP_ROLES_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(roleParamName,
-            clientIdParamName));
-
     /**
      * These parameters will match the class level parameters of
      * {@link CenterData}. Where possible, we try to get response parameters to
      * match those of request parameters.
      */
-    public static final Set<String> CENTER_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, nameParamName,
+    protected static final Set<String> CENTER_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName,
+            nameParamName,
             externalIdParamName, officeIdParamName, officeNameParamName, staffIdParamName, staffNameParamName, hierarchyParamName,
             officeOptionsParamName, staffOptionsParamName, statusParamName, activeParamName, activationDateParamName, timeLine,
             groupMembersParamName, collectionMeetingCalendar, closureReasons, datatables));
 
-    public static final Set<String> CENTER_GROUP_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, nameParamName,
+    protected static final Set<String> CENTER_GROUP_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName,
+            nameParamName,
             externalIdParamName, officeIdParamName, officeNameParamName, staffIdParamName, staffNameParamName, hierarchyParamName,
             officeOptionsParamName, staffOptionsParamName, clientOptionsParamName, datatables));
 
-    public static final Set<String> GROUP_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, nameParamName,
+    protected static final Set<String> GROUP_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName,
+            nameParamName,
             externalIdParamName, officeIdParamName, officeNameParamName, "parentId", "parentName", staffIdParamName, staffNameParamName,
             hierarchyParamName, officeOptionsParamName, statusParamName, activeParamName, activationDateParamName, staffOptionsParamName,
             clientOptionsParamName, timeLine, datatables));
 
-    public static final Set<String> ACTIVATION_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            dateFormatParamName, activationDateParamName));
-
-    public static final Set<String> COLLECTIONSHEET_DATA_PARAMETERS = new HashSet<>(
+    protected static final Set<String> COLLECTIONSHEET_DATA_PARAMETERS = new HashSet<>(
             Arrays.asList("dueDate", "loanProducts", "groups"));
 
-    public static final Set<String> GROUP_CLOSE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            dateFormatParamName, closureDateParamName, closureReasonIdParamName));
-
-    public static final Set<String> STAFF_CENTER_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(staffIdParamName,
+    protected static final Set<String> STAFF_CENTER_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(staffIdParamName,
             staffNameParamName, meetingFallCenters, totalCollected, totalOverdue, totaldue, installmentDue));
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupRolesDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupRolesDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupRolesDataValidator.java
index 8478319..68cb0ab 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupRolesDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupRolesDataValidator.java
@@ -20,8 +20,11 @@ package org.apache.fineract.portfolio.group.serialization;
 
 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.api.JsonCommand;
@@ -41,6 +44,8 @@ import com.google.gson.reflect.TypeToken;
 public class GroupRolesDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
+    private static final Set<String> GROUP_ROLES_REQUEST_DATA_PARAMETERS = new HashSet<>(
+            Arrays.asList(GroupingTypesApiConstants.roleParamName, GroupingTypesApiConstants.clientIdParamName));
 
     @Autowired
     public GroupRolesDataValidator(final FromJsonHelper fromApiJsonHelper) {
@@ -59,7 +64,7 @@ public class GroupRolesDataValidator {
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
         this.fromApiJsonHelper
-                .checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.GROUP_ROLES_REQUEST_DATA_PARAMETERS);
+                .checkForUnsupportedParameters(typeOfMap, json, GROUP_ROLES_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
@@ -84,7 +89,7 @@ public class GroupRolesDataValidator {
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
         this.fromApiJsonHelper
-                .checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.GROUP_ROLES_REQUEST_DATA_PARAMETERS);
+                .checkForUnsupportedParameters(typeOfMap, json, GROUP_ROLES_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupingTypesDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupingTypesDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupingTypesDataValidator.java
index b30de36..a3184f2 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupingTypesDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupingTypesDataValidator.java
@@ -48,6 +48,32 @@ public final class GroupingTypesDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
 
+    private static final Set<String> CENTER_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(GroupingTypesApiConstants.localeParamName, GroupingTypesApiConstants.dateFormatParamName,
+					GroupingTypesApiConstants.idParamName, GroupingTypesApiConstants.nameParamName,
+					GroupingTypesApiConstants.externalIdParamName, GroupingTypesApiConstants.officeIdParamName,
+					GroupingTypesApiConstants.staffIdParamName, GroupingTypesApiConstants.activeParamName,
+					GroupingTypesApiConstants.activationDateParamName, GroupingTypesApiConstants.groupMembersParamName,
+					GroupingTypesApiConstants.submittedOnDateParamName, GroupingTypesApiConstants.datatables));
+
+    private static final Set<String> GROUP_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+			GroupingTypesApiConstants.localeParamName, GroupingTypesApiConstants.dateFormatParamName,
+			GroupingTypesApiConstants.idParamName, GroupingTypesApiConstants.nameParamName,
+			GroupingTypesApiConstants.externalIdParamName, GroupingTypesApiConstants.centerIdParamName,
+			GroupingTypesApiConstants.officeIdParamName, GroupingTypesApiConstants.staffIdParamName,
+			GroupingTypesApiConstants.activeParamName, GroupingTypesApiConstants.activationDateParamName,
+			GroupingTypesApiConstants.clientMembersParamName, GroupingTypesApiConstants.collectionMeetingCalendar,
+			GroupingTypesApiConstants.submittedOnDateParamName, GroupingTypesApiConstants.datatables));
+
+
+    private static final Set<String> ACTIVATION_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(GroupingTypesApiConstants.localeParamName, GroupingTypesApiConstants.dateFormatParamName,
+					GroupingTypesApiConstants.activationDateParamName));
+
+    private static final Set<String> GROUP_CLOSE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+			GroupingTypesApiConstants.localeParamName, GroupingTypesApiConstants.dateFormatParamName,
+			GroupingTypesApiConstants.closureDateParamName, GroupingTypesApiConstants.closureReasonIdParamName));
+
     @Autowired
     public GroupingTypesDataValidator(final FromJsonHelper fromApiJsonHelper) {
         this.fromApiJsonHelper = fromApiJsonHelper;
@@ -67,7 +93,7 @@ public final class GroupingTypesDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.CENTER_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, CENTER_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
@@ -132,7 +158,7 @@ public final class GroupingTypesDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.GROUP_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
@@ -200,7 +226,7 @@ public final class GroupingTypesDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.GROUP_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
@@ -265,7 +291,7 @@ public final class GroupingTypesDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.CENTER_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, CENTER_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
@@ -311,7 +337,7 @@ public final class GroupingTypesDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.GROUP_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 
@@ -357,7 +383,7 @@ public final class GroupingTypesDataValidator {
         if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.ACTIVATION_REQUEST_DATA_PARAMETERS);
+        this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ACTIVATION_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource(resourceName);
@@ -466,7 +492,7 @@ public final class GroupingTypesDataValidator {
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
         this.fromApiJsonHelper
-                .checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.GROUP_CLOSE_REQUEST_DATA_PARAMETERS);
+                .checkForUnsupportedParameters(typeOfMap, json, GROUP_CLOSE_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
@@ -492,7 +518,7 @@ public final class GroupingTypesDataValidator {
 
         final Type typeOfMap = new TypeToken<Map<String, Object>>() {}.getType();
         this.fromApiJsonHelper
-                .checkForUnsupportedParameters(typeOfMap, json, GroupingTypesApiConstants.GROUP_CLOSE_REQUEST_DATA_PARAMETERS);
+                .checkForUnsupportedParameters(typeOfMap, json, GROUP_CLOSE_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestIncentiveApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestIncentiveApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestIncentiveApiConstants.java
index c8894ac..7a24ae8 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestIncentiveApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestIncentiveApiConstants.java
@@ -35,14 +35,6 @@ public interface InterestIncentiveApiConstants {
     
     public static final String INCENTIVE_RESOURCE_NAME = "interest.rate.incentives";
 
-    public static final Set<String> INTERESTRATE_INCENTIVE_CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName,
-            entityTypeParamName, attributeNameParamName, conditionTypeParamName, attributeValueParamName, incentiveTypeparamName,
-            amountParamName));
-
-    public static final Set<String> INTERESTRATE_INCENTIVE_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName,
-            entityTypeParamName, attributeNameParamName, conditionTypeParamName, attributeValueParamName, incentiveTypeparamName,
-            amountParamName));
-
     public static final Set<String> INTERESTRATE_INCENTIVE_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName,
             entityTypeParamName, attributeNameParamName, conditionTypeParamName, attributeValueParamName, incentiveTypeparamName,
             amountParamName));

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartApiConstants.java
index 20f760b..458fecb 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartApiConstants.java
@@ -27,10 +27,10 @@ public class InterestRateChartApiConstants {
     public static final String INTERESTRATE_CHART_RESOURCE_NAME = "interestchart";
 
     // actions
-    public static String summitalAction = ".summital";
+    public static final String summitalAction = ".summital";
 
     // command
-    public static String COMMAND_UNDO_TRANSACTION = "undo";
+    public static final String COMMAND_UNDO_TRANSACTION = "undo";
 
     // general
     public static final String localeParamName = "locale";
@@ -62,16 +62,4 @@ public class InterestRateChartApiConstants {
 
     // to delete chart Slabs from chart
     public static final String deleteParamName = "delete";
-
-    public static final Set<String> INTERESTRATE_CHART_CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            dateFormatParamName, nameParamName, descriptionParamName, fromDateParamName, endDateParamName, productIdParamName, chartSlabs,
-            isPrimaryGroupingByAmountParamName));
-
-    public static final Set<String> INTERESTRATE_CHART_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            dateFormatParamName, idParamName, nameParamName, descriptionParamName, fromDateParamName, endDateParamName, chartSlabs,
-            deleteParamName, isPrimaryGroupingByAmountParamName));
-
-    public static final Set<String> INTERESTRATE_CHART_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            dateFormatParamName, idParamName, nameParamName, descriptionParamName, fromDateParamName, endDateParamName, chartSlabs,
-            isPrimaryGroupingByAmountParamName));
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartSlabApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartSlabApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartSlabApiConstants.java
index b25c185..2be8eb7 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartSlabApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/InterestRateChartSlabApiConstants.java
@@ -45,18 +45,4 @@ public class InterestRateChartSlabApiConstants {
     public static final String annualInterestRateParamName = "annualInterestRate";
     public static final String currencyCodeParamName = "currencyCode";
     public static final String incentivesParamName = "incentives";
-
-    // associations
-
-    public static final Set<String> INTERESTRATE_CHART_SLAB_CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
-            localeParamName, idParamName, descriptionParamName, periodTypeParamName, fromPeriodParamName, toPeriodParamName,
-            amountRangeFromParamName, amountRangeToParamName, annualInterestRateParamName, currencyCodeParamName, incentivesParamName));
-
-    public static final Set<String> INTERESTRATE_CHART_SLAB_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
-            localeParamName, idParamName, descriptionParamName, periodTypeParamName, fromPeriodParamName, toPeriodParamName,
-            amountRangeFromParamName, amountRangeToParamName, annualInterestRateParamName, currencyCodeParamName, incentivesParamName));
-
-    public static final Set<String> INTERESTRATE_CHART_SLAB_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName,
-            idParamName, descriptionParamName, periodTypeParamName, fromPeriodParamName, toPeriodParamName, amountRangeFromParamName,
-            amountRangeToParamName, annualInterestRateParamName, currencyCodeParamName, incentivesParamName));
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java
index e5b1b1c..d62878d 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java
@@ -19,9 +19,22 @@
 package org.apache.fineract.portfolio.interestratechart.api;
 
 import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.INTERESTRATE_CHART_SLAB_RESOURCE_NAME;
-import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.INTERESTRATE_CHART_SLAB_RESPONSE_DATA_PARAMETERS;
 
+
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.amountRangeFromParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.amountRangeToParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.annualInterestRateParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.currencyCodeParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.descriptionParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.fromPeriodParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.incentivesParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.periodTypeParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.toPeriodParamName;
+
+import java.util.Arrays;
 import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
@@ -43,6 +56,7 @@ import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
 import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
 import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
 import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants;
 import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabData;
 import org.apache.fineract.portfolio.interestratechart.service.InterestRateChartSlabReadPlatformService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -59,6 +73,11 @@ public class InterestRateChartSlabsApiResource {
     private final DefaultToApiJsonSerializer<InterestRateChartSlabData> toApiJsonSerializer;
     private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
     private final ApiRequestParameterHelper apiRequestParameterHelper;
+    private static final Set<String> INTERESTRATE_CHART_SLAB_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+            InterestRateChartSlabApiConstants.localeParamName, InterestRateChartSlabApiConstants.idParamName,
+            descriptionParamName, periodTypeParamName, fromPeriodParamName, toPeriodParamName, amountRangeFromParamName,
+            amountRangeToParamName, annualInterestRateParamName, currencyCodeParamName, incentivesParamName));
+
 
     @Autowired
     public InterestRateChartSlabsApiResource(final InterestRateChartSlabReadPlatformService interestRateChartSlabReadPlatformService,

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java
index e0279c6..cf54a3a 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java
@@ -18,7 +18,9 @@
  */
 package org.apache.fineract.portfolio.interestratechart.api;
 
+import java.util.Arrays;
 import java.util.Collection;
+import java.util.HashSet;
 import java.util.Set;
 
 import javax.ws.rs.Consumes;
@@ -50,6 +52,14 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Component;
 
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.chartSlabs;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.descriptionParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.endDateParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.fromDateParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.idParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.isPrimaryGroupingByAmountParamName;
+import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.nameParamName;
+
 @Path("/interestratecharts")
 @Component
 @Scope("singleton")
@@ -60,6 +70,10 @@ public class InterestRateChartsApiResource {
     private final DefaultToApiJsonSerializer<InterestRateChartData> toApiJsonSerializer;
     private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
     private final ApiRequestParameterHelper apiRequestParameterHelper;
+    private static final Set<String> INTERESTRATE_CHART_RESPONSE_DATA_PARAMETERS = new HashSet<>(
+            Arrays.asList(InterestRateChartApiConstants.localeParamName,
+                    InterestRateChartApiConstants.dateFormatParamName, idParamName, nameParamName, descriptionParamName,
+                    fromDateParamName, endDateParamName, chartSlabs, isPrimaryGroupingByAmountParamName));
 
     @Autowired
     public InterestRateChartsApiResource(final InterestRateChartReadPlatformService chartReadPlatformService,
@@ -84,8 +98,7 @@ public class InterestRateChartsApiResource {
         InterestRateChartData chartData = this.chartReadPlatformService.template();
 
         final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
-        return this.toApiJsonSerializer.serialize(settings, chartData,
-                InterestRateChartApiConstants.INTERESTRATE_CHART_RESPONSE_DATA_PARAMETERS);
+        return this.toApiJsonSerializer.serialize(settings, chartData, INTERESTRATE_CHART_RESPONSE_DATA_PARAMETERS);
     }
 
     @GET
@@ -98,8 +111,7 @@ public class InterestRateChartsApiResource {
         Collection<InterestRateChartData> chartDatas = this.chartReadPlatformService.retrieveAllWithSlabs(productId);
 
         final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
-        return this.toApiJsonSerializer.serialize(settings, chartDatas,
-                InterestRateChartApiConstants.INTERESTRATE_CHART_RESPONSE_DATA_PARAMETERS);
+        return this.toApiJsonSerializer.serialize(settings, chartDatas, INTERESTRATE_CHART_RESPONSE_DATA_PARAMETERS);
     }
 
     @GET
@@ -123,8 +135,7 @@ public class InterestRateChartsApiResource {
             chartData = this.chartReadPlatformService.retrieveWithTemplate(chartData);
         }
 
-        return this.toApiJsonSerializer.serialize(settings, chartData,
-                InterestRateChartApiConstants.INTERESTRATE_CHART_RESPONSE_DATA_PARAMETERS);
+        return this.toApiJsonSerializer.serialize(settings, chartData, INTERESTRATE_CHART_RESPONSE_DATA_PARAMETERS);
     }
 
     @POST

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestIncentiveDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestIncentiveDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestIncentiveDataValidator.java
index 64f6b79..ab5c3ec 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestIncentiveDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestIncentiveDataValidator.java
@@ -19,8 +19,6 @@
 package org.apache.fineract.portfolio.interestratechart.data;
 
 import static org.apache.fineract.portfolio.interestratechart.InterestIncentiveApiConstants.INCENTIVE_RESOURCE_NAME;
-import static org.apache.fineract.portfolio.interestratechart.InterestIncentiveApiConstants.INTERESTRATE_INCENTIVE_CREATE_REQUEST_DATA_PARAMETERS;
-import static org.apache.fineract.portfolio.interestratechart.InterestIncentiveApiConstants.INTERESTRATE_INCENTIVE_UPDATE_REQUEST_DATA_PARAMETERS;
 import static org.apache.fineract.portfolio.interestratechart.InterestIncentiveApiConstants.amountParamName;
 import static org.apache.fineract.portfolio.interestratechart.InterestIncentiveApiConstants.attributeNameParamName;
 import static org.apache.fineract.portfolio.interestratechart.InterestIncentiveApiConstants.attributeValueParamName;
@@ -32,9 +30,12 @@ import static org.apache.fineract.portfolio.interestratechart.InterestRateChartA
 import java.lang.reflect.Type;
 import java.math.BigDecimal;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.infrastructure.core.data.ApiParameterError;
@@ -43,6 +44,7 @@ import org.apache.fineract.infrastructure.core.exception.InvalidJsonException;
 import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
 import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
 import org.apache.fineract.portfolio.common.domain.ConditionType;
+import org.apache.fineract.portfolio.interestratechart.InterestIncentiveApiConstants;
 import org.apache.fineract.portfolio.interestratechart.incentive.InterestIncentiveAttributeName;
 import org.apache.fineract.portfolio.interestratechart.incentive.InterestIncentiveEntityType;
 import org.apache.fineract.portfolio.interestratechart.incentive.InterestIncentiveType;
@@ -58,6 +60,14 @@ public class InterestIncentiveDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
 
+	private static final Set<String> INTERESTRATE_INCENTIVE_CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(InterestIncentiveApiConstants.idParamName, entityTypeParamName, attributeNameParamName,
+					conditionTypeParamName, attributeValueParamName, incentiveTypeparamName, amountParamName));
+
+	private static final Set<String> INTERESTRATE_INCENTIVE_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(InterestIncentiveApiConstants.idParamName, entityTypeParamName, attributeNameParamName,
+					conditionTypeParamName, attributeValueParamName, incentiveTypeparamName, amountParamName));
+
     @Autowired
     public InterestIncentiveDataValidator(final FromJsonHelper fromApiJsonHelper) {
         this.fromApiJsonHelper = fromApiJsonHelper;

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDataValidator.java
index a325175..55bc4b3 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDataValidator.java
@@ -18,9 +18,7 @@
  */
 package org.apache.fineract.portfolio.interestratechart.data;
 
-import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.INTERESTRATE_CHART_CREATE_REQUEST_DATA_PARAMETERS;
 import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.INTERESTRATE_CHART_RESOURCE_NAME;
-import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.INTERESTRATE_CHART_UPDATE_REQUEST_DATA_PARAMETERS;
 import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.chartSlabs;
 import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.descriptionParamName;
 import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.endDateParamName;
@@ -32,9 +30,12 @@ import static org.apache.fineract.portfolio.interestratechart.InterestRateChartA
 
 import java.lang.reflect.Type;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.infrastructure.core.data.ApiParameterError;
@@ -42,6 +43,7 @@ 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.core.serialization.FromJsonHelper;
+import org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants;
 import org.joda.time.LocalDate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -56,6 +58,15 @@ public class InterestRateChartDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
     private final InterestRateChartSlabDataValidator chartSlabDataValidator;
+	private static final Set<String> INTERESTRATE_CHART_CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+			InterestRateChartApiConstants.localeParamName, InterestRateChartApiConstants.dateFormatParamName,
+			nameParamName, descriptionParamName, fromDateParamName, endDateParamName, productIdParamName, chartSlabs,
+			isPrimaryGroupingByAmountParamName));
+
+	private static final Set<String> INTERESTRATE_CHART_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+			InterestRateChartApiConstants.localeParamName, InterestRateChartApiConstants.dateFormatParamName,
+			idParamName, nameParamName, descriptionParamName, fromDateParamName, endDateParamName, chartSlabs,
+			InterestRateChartApiConstants.deleteParamName, isPrimaryGroupingByAmountParamName));
 
     @Autowired
     public InterestRateChartDataValidator(final FromJsonHelper fromApiJsonHelper,

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabDataValidator.java
index fa7f26a..7c7ac38 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabDataValidator.java
@@ -18,9 +18,7 @@
  */
 package org.apache.fineract.portfolio.interestratechart.data;
 
-import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.INTERESTRATE_CHART_SLAB_CREATE_REQUEST_DATA_PARAMETERS;
 import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.INTERESTRATE_CHART_SLAB_RESOURCE_NAME;
-import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.INTERESTRATE_CHART_SLAB_UPDATE_REQUEST_DATA_PARAMETERS;
 import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.amountRangeFromParamName;
 import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.amountRangeToParamName;
 import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.annualInterestRateParamName;
@@ -34,9 +32,12 @@ import static org.apache.fineract.portfolio.interestratechart.InterestRateChartS
 import java.lang.reflect.Type;
 import java.math.BigDecimal;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.infrastructure.core.data.ApiParameterError;
@@ -46,6 +47,7 @@ import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidati
 import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
 import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType;
 import org.apache.fineract.portfolio.interestratechart.InterestIncentiveApiConstants;
+import org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -59,6 +61,17 @@ public class InterestRateChartSlabDataValidator {
 
     private final FromJsonHelper fromApiJsonHelper;
     private final InterestIncentiveDataValidator interestIncentiveDataValidator;
+	private static final Set<String> INTERESTRATE_CHART_SLAB_CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(InterestRateChartSlabApiConstants.localeParamName,
+					InterestRateChartSlabApiConstants.idParamName, descriptionParamName, periodTypeParamName,
+					fromPeriodParamName, toPeriodParamName, amountRangeFromParamName, amountRangeToParamName,
+					annualInterestRateParamName, currencyCodeParamName, incentivesParamName));
+
+	private static final Set<String> INTERESTRATE_CHART_SLAB_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(InterestRateChartSlabApiConstants.localeParamName,
+					InterestRateChartSlabApiConstants.idParamName, descriptionParamName, periodTypeParamName,
+					fromPeriodParamName, toPeriodParamName, amountRangeFromParamName, amountRangeToParamName,
+					annualInterestRateParamName, currencyCodeParamName, incentivesParamName));
 
     @Autowired
     public InterestRateChartSlabDataValidator(final FromJsonHelper fromApiJsonHelper,

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/api/GuarantorsApiResource.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/api/GuarantorsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/api/GuarantorsApiResource.java
index 96060a7..948036e 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/api/GuarantorsApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/api/GuarantorsApiResource.java
@@ -48,6 +48,7 @@ import org.apache.fineract.infrastructure.core.data.EnumOptionData;
 import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
 import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
 import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.apache.fineract.portfolio.account.AccountDetailConstants;
 import org.apache.fineract.portfolio.account.PortfolioAccountType;
 import org.apache.fineract.portfolio.account.api.AccountTransfersApiConstants;
 import org.apache.fineract.portfolio.account.data.PortfolioAccountDTO;
@@ -68,11 +69,16 @@ import org.springframework.stereotype.Component;
 @Scope("singleton")
 public class GuarantorsApiResource {
 
-    private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "loanId", "clientRelationshipType",
+    private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "loanId",
+            "clientRelationshipType",
             "guarantorType", "firstname", "lastname", "entityId", "externalId", "officeName", "joinedDate", "addressLine1", "addressLine2",
             "city", "state", "zip", "country", "mobileNumber", "housePhoneNumber", "comment", "dob", "guarantorTypeOptions",
             "allowedClientRelationshipTypes"));
 
+	private static final Set<String> ACCOUNT_TRANSFER_API_RESPONSE_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(AccountDetailConstants.idParamName, AccountTransfersApiConstants.transferDescriptionParamName,
+					AccountTransfersApiConstants.currencyParamName));
+
     private final String resourceNameForPermission = "GUARANTOR";
 
     private final GuarantorReadPlatformService guarantorReadPlatformService;
@@ -210,6 +216,6 @@ public class GuarantorsApiResource {
         }
         final GuarantorData guarantorData = GuarantorData.template(null, null, accountLinkingOptions);
         final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
-        return this.apiJsonSerializerService.serialize(settings, guarantorData, AccountTransfersApiConstants.RESPONSE_DATA_PARAMETERS);
+        return this.apiJsonSerializerService.serialize(settings, guarantorData, ACCOUNT_TRANSFER_API_RESPONSE_DATA_PARAMETERS);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java
index 626f84b..3fec406 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java
@@ -47,21 +47,10 @@ public class RescheduleLoansApiConstants {
     public static final String adjustedDueDateParamName = "adjustedDueDate";
     public static final String resheduleForMultiDisbursementNotSupportedErrorCode = "loan.reschedule.multidisbursement.error.code";
     public static final String resheduleWithInterestRecalculationNotSupportedErrorCode = "loan.reschedule.interestrecalculation.error.code";
-    
-    public static final Set<String> CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName, dateFormatParamName,
-            graceOnPrincipalParamName, recurringMoratoriumOnPrincipalPeriodsParamName, graceOnInterestParamName, extraTermsParamName, rescheduleFromDateParamName,
-            newInterestRateParamName, rescheduleReasonIdParamName, rescheduleReasonCommentParamName, submittedOnDateParamName,
-            loanIdParamName, adjustedDueDateParamName, recalculateInterestParamName));
 
     // reject action request parameters
     public static final String rejectedOnDateParam = "rejectedOnDate";
 
-    public static final Set<String> REJECT_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName, dateFormatParamName,
-            rejectedOnDateParam));
-
     // approve action request parameters
     public static final String approvedOnDateParam = "approvedOnDate";
-
-    public static final Set<String> APPROVE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName, dateFormatParamName,
-            approvedOnDateParam));
 }

http://git-wip-us.apache.org/repos/asf/fineract/blob/50048151/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestDataValidator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestDataValidator.java
index 1203979..e694714 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestDataValidator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestDataValidator.java
@@ -20,9 +20,12 @@ package org.apache.fineract.portfolio.loanaccount.rescheduleloan.data;
 
 import java.lang.reflect.Type;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
+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.api.JsonCommand;
@@ -47,6 +50,26 @@ import com.google.gson.reflect.TypeToken;
 public class LoanRescheduleRequestDataValidator {
 
     private final FromJsonHelper fromJsonHelper;
+	private static final Set<String> CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(
+			RescheduleLoansApiConstants.localeParamName, RescheduleLoansApiConstants.dateFormatParamName,
+			RescheduleLoansApiConstants.graceOnPrincipalParamName,
+			RescheduleLoansApiConstants.recurringMoratoriumOnPrincipalPeriodsParamName,
+			RescheduleLoansApiConstants.graceOnInterestParamName, RescheduleLoansApiConstants.extraTermsParamName,
+			RescheduleLoansApiConstants.rescheduleFromDateParamName,
+			RescheduleLoansApiConstants.newInterestRateParamName,
+			RescheduleLoansApiConstants.rescheduleReasonIdParamName,
+			RescheduleLoansApiConstants.rescheduleReasonCommentParamName,
+			RescheduleLoansApiConstants.submittedOnDateParamName, RescheduleLoansApiConstants.loanIdParamName,
+			RescheduleLoansApiConstants.adjustedDueDateParamName,
+			RescheduleLoansApiConstants.recalculateInterestParamName));
+
+	private static final Set<String> REJECT_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(RescheduleLoansApiConstants.localeParamName, RescheduleLoansApiConstants.dateFormatParamName,
+					RescheduleLoansApiConstants.rejectedOnDateParam));
+
+	private static final Set<String> APPROVE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+			Arrays.asList(RescheduleLoansApiConstants.localeParamName, RescheduleLoansApiConstants.dateFormatParamName,
+					RescheduleLoansApiConstants.approvedOnDateParam));
 
     @Autowired
     public LoanRescheduleRequestDataValidator(FromJsonHelper fromJsonHelper) {
@@ -68,7 +91,7 @@ public class LoanRescheduleRequestDataValidator {
 
         final Type typeToken = new TypeToken<Map<String, Object>>() {}.getType();
         this.fromJsonHelper
-                .checkForUnsupportedParameters(typeToken, jsonString, RescheduleLoansApiConstants.CREATE_REQUEST_DATA_PARAMETERS);
+                .checkForUnsupportedParameters(typeToken, jsonString, CREATE_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder dataValidatorBuilder = new DataValidatorBuilder(dataValidationErrors).resource(StringUtils
@@ -199,8 +222,7 @@ public class LoanRescheduleRequestDataValidator {
         if (StringUtils.isBlank(jsonString)) { throw new InvalidJsonException(); }
 
         final Type typeToken = new TypeToken<Map<String, Object>>() {}.getType();
-        this.fromJsonHelper.checkForUnsupportedParameters(typeToken, jsonString,
-                RescheduleLoansApiConstants.APPROVE_REQUEST_DATA_PARAMETERS);
+        this.fromJsonHelper.checkForUnsupportedParameters(typeToken, jsonString, APPROVE_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder dataValidatorBuilder = new DataValidatorBuilder(dataValidationErrors).resource(StringUtils
@@ -270,7 +292,7 @@ public class LoanRescheduleRequestDataValidator {
 
         final Type typeToken = new TypeToken<Map<String, Object>>() {}.getType();
         this.fromJsonHelper
-                .checkForUnsupportedParameters(typeToken, jsonString, RescheduleLoansApiConstants.REJECT_REQUEST_DATA_PARAMETERS);
+                .checkForUnsupportedParameters(typeToken, jsonString, REJECT_REQUEST_DATA_PARAMETERS);
 
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         final DataValidatorBuilder dataValidatorBuilder = new DataValidatorBuilder(dataValidationErrors).resource(StringUtils


Mime
View raw message