FINERACT-821 Added and Enforced HideUtilityClassConstructor checkstyle
This commit is contained in:
committed by
Petri Tuomola
parent
774fcd9265
commit
8a3c1903a4
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.accounting.accrual.api;
|
||||
|
||||
public class AccrualAccountingConstants {
|
||||
public final class AccrualAccountingConstants {
|
||||
|
||||
private AccrualAccountingConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String accrueTillParamName = "tillDate";
|
||||
public static final String localeParamName = "locale";
|
||||
|
||||
+5
-1
@@ -25,7 +25,11 @@ import java.util.Map;
|
||||
import org.apache.fineract.accounting.financialactivityaccount.data.FinancialActivityData;
|
||||
import org.apache.fineract.accounting.glaccount.domain.GLAccountType;
|
||||
|
||||
public class AccountingConstants {
|
||||
public final class AccountingConstants {
|
||||
|
||||
private AccountingConstants() {
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
* Accounting placeholders for cash based accounting for loan products
|
||||
|
||||
+5
-1
@@ -26,7 +26,11 @@ import org.apache.fineract.accounting.journalentry.domain.JournalEntryType;
|
||||
import org.apache.fineract.accounting.producttoaccountmapping.domain.PortfolioProductType;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class AccountingEnumerations {
|
||||
public final class AccountingEnumerations {
|
||||
|
||||
private AccountingEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData gLAccountType(final int id) {
|
||||
return gLAccountType(GLAccountType.fromInt(id));
|
||||
|
||||
+6
-2
@@ -22,7 +22,11 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class FinancialActivityAccountsConstants {
|
||||
public final class FinancialActivityAccountsConstants {
|
||||
|
||||
private FinancialActivityAccountsConstants() {
|
||||
|
||||
}
|
||||
|
||||
private static final String idParamName = "id";
|
||||
private static final String factivityDataParamName = "financialActivityData";
|
||||
@@ -30,6 +34,6 @@ public class FinancialActivityAccountsConstants {
|
||||
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,
|
||||
static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, factivityDataParamName,
|
||||
glAccountDataParamName, glAccountOptionsParamName, financialActivityOptionsParamName));
|
||||
}
|
||||
|
||||
+5
-1
@@ -28,7 +28,11 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class AccountNumberFormatEnumerations {
|
||||
public final class AccountNumberFormatEnumerations {
|
||||
|
||||
private AccountNumberFormatEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static final Set<AccountNumberPrefixType> accountNumberPrefixesForClientAccounts = Collections
|
||||
.unmodifiableSet(new HashSet<>(Arrays.asList(AccountNumberPrefixType.OFFICE_NAME, AccountNumberPrefixType.CLIENT_TYPE)));
|
||||
|
||||
+5
-1
@@ -20,7 +20,11 @@ package org.apache.fineract.infrastructure.accountnumberformat.service;
|
||||
|
||||
import org.apache.fineract.infrastructure.accountnumberformat.data.AccountNumberFormatData;
|
||||
|
||||
public class AccountNumberFormatConstants {
|
||||
public final class AccountNumberFormatConstants {
|
||||
|
||||
private AccountNumberFormatConstants() {
|
||||
|
||||
}
|
||||
|
||||
// resource name for validation
|
||||
public static final String ENTITY_NAME = "accountNumberFormat";
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class CenterConstants {
|
||||
public final class CenterConstants {
|
||||
|
||||
private CenterConstants() {
|
||||
|
||||
}
|
||||
|
||||
// Column indices
|
||||
public static final int CENTER_NAME_COL = 0;// A
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class ChartOfAcountsConstants {
|
||||
public final class ChartOfAcountsConstants {
|
||||
|
||||
private ChartOfAcountsConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int ACCOUNT_TYPE_COL = 0;// A
|
||||
public static final int ACCOUNT_NAME_COL = 1;// B
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class ClientEntityConstants {
|
||||
public final class ClientEntityConstants {
|
||||
|
||||
private ClientEntityConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int NAME_COL = 0;// A
|
||||
public static final int OFFICE_NAME_COL = 1;// B
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class ClientPersonConstants {
|
||||
public final class ClientPersonConstants {
|
||||
|
||||
private ClientPersonConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int FIRST_NAME_COL = 0;// A
|
||||
public static final int LAST_NAME_COL = 1;// B
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class FixedDepositConstants {
|
||||
public final class FixedDepositConstants {
|
||||
|
||||
private FixedDepositConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;
|
||||
public static final int CLIENT_NAME_COL = 1;
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class GroupConstants {
|
||||
public final class GroupConstants {
|
||||
|
||||
private GroupConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int NAME_COL = 0; // A
|
||||
public static final int OFFICE_NAME_COL = 1; // B
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class GuarantorConstants {
|
||||
public final class GuarantorConstants {
|
||||
|
||||
private GuarantorConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;
|
||||
public static final int CLIENT_NAME_COL = 1;
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class JournalEntryConstants {
|
||||
public final class JournalEntryConstants {
|
||||
|
||||
private JournalEntryConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;
|
||||
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class LoanConstants {
|
||||
public final class LoanConstants {
|
||||
|
||||
private LoanConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;// A
|
||||
public static final int LOAN_TYPE_COL = 1;// B
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class LoanRepaymentConstants {
|
||||
public final class LoanRepaymentConstants {
|
||||
|
||||
private LoanRepaymentConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;// A
|
||||
public static final int CLIENT_NAME_COL = 1;// B
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class OfficeConstants {
|
||||
public final class OfficeConstants {
|
||||
|
||||
private OfficeConstants() {
|
||||
|
||||
}
|
||||
|
||||
// Column indices
|
||||
public static final int OFFICE_NAME_COL = 0;
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class RecurringDepositConstants {
|
||||
public final class RecurringDepositConstants {
|
||||
|
||||
private RecurringDepositConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;
|
||||
public static final int CLIENT_NAME_COL = 1;
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class SavingsConstants {
|
||||
public final class SavingsConstants {
|
||||
|
||||
private SavingsConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;
|
||||
public static final int SAVINGS_TYPE_COL = 1;
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class SharedAccountsConstants {
|
||||
public final class SharedAccountsConstants {
|
||||
|
||||
private SharedAccountsConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int CLIENT_NAME_COL = 0;
|
||||
public static final int PRODUCT_COL = 1;
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class StaffConstants {
|
||||
public final class StaffConstants {
|
||||
|
||||
private StaffConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;// A
|
||||
public static final int FIRST_NAME_COL = 1;// B
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class TemplatePopulateImportConstants {
|
||||
public final class TemplatePopulateImportConstants {
|
||||
|
||||
private TemplatePopulateImportConstants() {
|
||||
|
||||
}
|
||||
|
||||
// columns sizes
|
||||
public static final int SMALL_COL_SIZE = 4000;
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class TransactionConstants {
|
||||
public final class TransactionConstants {
|
||||
|
||||
private TransactionConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;
|
||||
public static final int CLIENT_NAME_COL = 1;
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.bulkimport.constants;
|
||||
|
||||
public class UserConstants {
|
||||
public final class UserConstants {
|
||||
|
||||
private UserConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final int OFFICE_NAME_COL = 0;
|
||||
public static final int STAFF_NAME_COL = 1;
|
||||
|
||||
+5
-1
@@ -39,7 +39,11 @@ import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.util.CellReference;
|
||||
import org.joda.time.LocalDate;
|
||||
|
||||
public class ImportHandlerUtils {
|
||||
public final class ImportHandlerUtils {
|
||||
|
||||
private ImportHandlerUtils() {
|
||||
|
||||
}
|
||||
|
||||
public static Integer getNumberOfRows(Sheet sheet, int primaryColumn) {
|
||||
Integer noOfEntries = 0;
|
||||
|
||||
Vendored
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.cache;
|
||||
|
||||
public class CacheApiConstants {
|
||||
public final class CacheApiConstants {
|
||||
|
||||
private CacheApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String RESOURCE_NAME = "CACHE";
|
||||
public static final String cacheTypeParameter = "cacheType";
|
||||
|
||||
Vendored
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.infrastructure.cache;
|
||||
import org.apache.fineract.infrastructure.cache.domain.CacheType;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class CacheEnumerations {
|
||||
public final class CacheEnumerations {
|
||||
|
||||
private CacheEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData cacheType(final int id) {
|
||||
return cacheType(CacheType.fromInt(id));
|
||||
|
||||
+5
-1
@@ -22,7 +22,11 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class EmailApiConstants {
|
||||
public final class EmailApiConstants {
|
||||
|
||||
private EmailApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String RESOURCE_NAME = "email";
|
||||
|
||||
|
||||
+5
-1
@@ -23,7 +23,11 @@ import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class ScheduledEmailConstants {
|
||||
public final class ScheduledEmailConstants {
|
||||
|
||||
private ScheduledEmailConstants() {
|
||||
|
||||
}
|
||||
|
||||
// define the API resource entity name
|
||||
public static final String SCHEDULED_EMAIL_ENTITY_NAME = "SCHEDULEDEMAIL";
|
||||
|
||||
+5
-1
@@ -22,7 +22,11 @@ import org.apache.fineract.infrastructure.campaigns.email.domain.ScheduledEmailA
|
||||
import org.apache.fineract.infrastructure.campaigns.email.domain.ScheduledEmailStretchyReportParamDateOption;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class ScheduledEmailEnumerations {
|
||||
public final class ScheduledEmailEnumerations {
|
||||
|
||||
private ScheduledEmailEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData emailAttachementFileFormat(final Integer emailAttachementFileFormatId) {
|
||||
return emailAttachementFileFormat(ScheduledEmailAttachmentFileFormat.instance(emailAttachementFileFormatId));
|
||||
|
||||
+5
-1
@@ -20,7 +20,11 @@ package org.apache.fineract.infrastructure.campaigns.email.domain;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class EmailCampaignStatusEnumerations {
|
||||
public final class EmailCampaignStatusEnumerations {
|
||||
|
||||
private EmailCampaignStatusEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData status(final Integer statusId) {
|
||||
return status(EmailCampaignStatus.fromInt(statusId));
|
||||
|
||||
+5
-1
@@ -20,7 +20,11 @@ package org.apache.fineract.infrastructure.campaigns.email.domain;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class EmailMessageEnumerations {
|
||||
public final class EmailMessageEnumerations {
|
||||
|
||||
private EmailMessageEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData status(final Integer statusId) {
|
||||
return status(EmailMessageStatusType.fromInt(statusId));
|
||||
|
||||
+5
-1
@@ -25,7 +25,11 @@ import org.apache.fineract.infrastructure.campaigns.constants.CampaignType;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType;
|
||||
|
||||
public class SmsCampaignEnumerations {
|
||||
public final class SmsCampaignEnumerations {
|
||||
|
||||
private SmsCampaignEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData smscampaignTriggerType(final SmsCampaignTriggerType type) {
|
||||
EnumOptionData optionData = new EnumOptionData(SmsCampaignTriggerType.INVALID.getValue().longValue(),
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.infrastructure.campaigns.sms.domain;
|
||||
import org.apache.fineract.infrastructure.campaigns.sms.constants.SmsCampaignStatus;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class SmsCampaignStatusEnumerations {
|
||||
public final class SmsCampaignStatusEnumerations {
|
||||
|
||||
private SmsCampaignStatusEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData status(final Integer statusId) {
|
||||
return status(SmsCampaignStatus.fromInt(statusId));
|
||||
|
||||
+6
-2
@@ -22,11 +22,15 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class ExternalServiceConfigurationApiConstant {
|
||||
public final class ExternalServiceConfigurationApiConstant {
|
||||
|
||||
private ExternalServiceConfigurationApiConstant() {
|
||||
|
||||
}
|
||||
|
||||
public static final String NAME = "name";
|
||||
public static final String VALUE = "value";
|
||||
public static final String EXTERNAL_SERVICE_RESOURCE_NAME = "externalServiceConfiguration";
|
||||
|
||||
protected static final Set<String> EXTERNAL_SERVICE_CONFIGURATION_DATA_PARAMETERS = new HashSet<>(Arrays.asList(NAME, VALUE));
|
||||
static final Set<String> EXTERNAL_SERVICE_CONFIGURATION_DATA_PARAMETERS = new HashSet<>(Arrays.asList(NAME, VALUE));
|
||||
}
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.configuration.api;
|
||||
|
||||
public class GlobalConfigurationApiConstant {
|
||||
public final class GlobalConfigurationApiConstant {
|
||||
|
||||
private GlobalConfigurationApiConstant() {
|
||||
|
||||
}
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
public static final String VALUE = "value";
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.infrastructure.configuration.service;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class ExternalServicesConstants {
|
||||
public final class ExternalServicesConstants {
|
||||
|
||||
private ExternalServicesConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String S3_SERVICE_NAME = "S3";
|
||||
public static final String S3_BUCKET_NAME = "s3_bucket_name";
|
||||
|
||||
+5
-1
@@ -30,7 +30,11 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.fineract.infrastructure.core.serialization.JsonParserHelper;
|
||||
import org.apache.fineract.infrastructure.security.utils.SQLInjectionValidator;
|
||||
|
||||
public class ApiParameterHelper {
|
||||
public final class ApiParameterHelper {
|
||||
|
||||
private ApiParameterHelper() {
|
||||
|
||||
}
|
||||
|
||||
public static Long commandId(final MultivaluedMap<String, String> queryParams) {
|
||||
Long id = null;
|
||||
|
||||
+5
-1
@@ -34,7 +34,11 @@ import org.springframework.jdbc.support.JdbcUtils;
|
||||
* Support for retrieving possibly null values from jdbc recordset delegating to springs {@link JdbcUtils} where
|
||||
* possible.
|
||||
*/
|
||||
public class JdbcSupport {
|
||||
public final class JdbcSupport {
|
||||
|
||||
private JdbcSupport() {
|
||||
|
||||
}
|
||||
|
||||
public static DateTime getDateTime(final ResultSet rs, final String columnName) throws SQLException {
|
||||
DateTime dateTime = null;
|
||||
|
||||
+5
-1
@@ -34,7 +34,11 @@ import org.joda.time.LocalDateTime;
|
||||
import org.joda.time.format.DateTimeFormat;
|
||||
import org.joda.time.format.DateTimeFormatter;
|
||||
|
||||
public class DateUtils {
|
||||
public final class DateUtils {
|
||||
|
||||
private DateUtils() {
|
||||
|
||||
}
|
||||
|
||||
public static DateTimeZone getDateTimeZoneOfTenant() {
|
||||
final FineractPlatformTenant tenant = ThreadLocalContextUtil.getTenant();
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class ThreadLocalContextUtil {
|
||||
public final class ThreadLocalContextUtil {
|
||||
|
||||
private ThreadLocalContextUtil() {
|
||||
|
||||
}
|
||||
|
||||
public static final String CONTEXT_TENANTS = "tenants";
|
||||
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.infrastructure.dataqueries.api;
|
||||
/**
|
||||
* Created by Cieyou on 2/26/14.
|
||||
*/
|
||||
public class DataTableApiConstant {
|
||||
public final class DataTableApiConstant {
|
||||
|
||||
private DataTableApiConstant() {
|
||||
|
||||
}
|
||||
|
||||
public static final Integer CATEGORY_PPI = 200;
|
||||
public static final Integer CATEGORY_DEFAULT = 100;
|
||||
|
||||
+5
-1
@@ -29,7 +29,11 @@ import org.apache.fineract.infrastructure.core.exception.ImageUploadException;
|
||||
import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
|
||||
import org.apache.fineract.infrastructure.documentmanagement.exception.ContentManagementException;
|
||||
|
||||
public class ContentRepositoryUtils {
|
||||
public final class ContentRepositoryUtils {
|
||||
|
||||
private ContentRepositoryUtils() {
|
||||
|
||||
}
|
||||
|
||||
private static final Random random = new Random();
|
||||
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.entityaccess;
|
||||
|
||||
public class FineractEntityAccessConstants {
|
||||
public final class FineractEntityAccessConstants {
|
||||
|
||||
private FineractEntityAccessConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String GLOBAL_CONFIG_FOR_OFFICE_SPECIFIC_PRODUCTS = "office-specific-products-enabled";
|
||||
public static final String GLOBAL_CONFIG_FOR_RESTRICT_PRODUCTS_TO_USER_OFFICE = "restrict-products-to-user-office";
|
||||
|
||||
+7
-4
@@ -22,7 +22,11 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class FineractEntityApiResourceConstants {
|
||||
public final class FineractEntityApiResourceConstants {
|
||||
|
||||
private FineractEntityApiResourceConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String FINERACT_ENTITY_RESOURCE_NAME = "FineractEntity";
|
||||
public static final String mappingTypes = "mappingTypes";
|
||||
@@ -41,9 +45,8 @@ 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 ";
|
||||
|
||||
protected static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(mappingTypes));
|
||||
static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(mappingTypes));
|
||||
|
||||
protected static final Set<String> FETCH_ENTITY_TO_ENTITY_MAPPINGS = new HashSet<>(
|
||||
Arrays.asList(mapId, relId, fromEnityType, toEntityType));
|
||||
static final Set<String> FETCH_ENTITY_TO_ENTITY_MAPPINGS = new HashSet<>(Arrays.asList(mapId, relId, fromEnityType, toEntityType));
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.gcm.api;
|
||||
|
||||
public class DeviceRegistrationApiConstants {
|
||||
public final class DeviceRegistrationApiConstants {
|
||||
|
||||
private DeviceRegistrationApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String clientIdParamName = "clientId";
|
||||
public static final String registrationIdParamName = "registrationId";
|
||||
|
||||
+7
-3
@@ -22,7 +22,11 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class HookApiConstants {
|
||||
public final class HookApiConstants {
|
||||
|
||||
private HookApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String HOOK_RESOURCE_NAME = "HOOK";
|
||||
|
||||
@@ -62,10 +66,10 @@ public class HookApiConstants {
|
||||
|
||||
public static final String templateNameParamName = "templateName";
|
||||
|
||||
protected static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(nameParamName, displayNameParamName,
|
||||
static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(nameParamName, displayNameParamName,
|
||||
templateIdParamName, isActiveParamName, configParamName, eventsParamName, templateNameParamName));
|
||||
|
||||
protected static final Set<String> UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(nameParamName, displayNameParamName,
|
||||
static final Set<String> UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(nameParamName, displayNameParamName,
|
||||
templateIdParamName, isActiveParamName, configParamName, eventsParamName, templateNameParamName));
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -38,7 +38,11 @@ import retrofit.client.OkClient;
|
||||
import retrofit.client.Response;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ProcessorHelper {
|
||||
public final class ProcessorHelper {
|
||||
|
||||
private ProcessorHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ProcessorHelper.class);
|
||||
|
||||
|
||||
+5
-1
@@ -37,7 +37,11 @@ import org.springframework.util.ClassUtils;
|
||||
/**
|
||||
* Parser to find method which is marked with CronTargetMethod annotation
|
||||
*/
|
||||
public class CronMethodParser {
|
||||
public final class CronMethodParser {
|
||||
|
||||
private CronMethodParser() {
|
||||
|
||||
}
|
||||
|
||||
public static class ClassMethodNamesPair {
|
||||
|
||||
|
||||
+9
-6
@@ -22,7 +22,11 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class SchedulerJobApiConstants {
|
||||
public final class SchedulerJobApiConstants {
|
||||
|
||||
private SchedulerJobApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String JOB_RESOURCE_NAME = "schedulerjob";
|
||||
public static final String SCHEDULER_RESOURCE_NAME = "SCHEDULER";
|
||||
@@ -53,13 +57,12 @@ public class SchedulerJobApiConstants {
|
||||
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<>(
|
||||
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));
|
||||
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));
|
||||
static final Set<String> SCHEDULER_DETAIL_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(schedulerStatusParamName));
|
||||
}
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class ReportMailingJobConstants implements Serializable {
|
||||
public final class ReportMailingJobConstants implements Serializable {
|
||||
|
||||
private ReportMailingJobConstants() {
|
||||
|
||||
}
|
||||
|
||||
// define the API resource entity name
|
||||
public static final String REPORT_MAILING_JOB_ENTITY_NAME = "REPORTMAILINGJOB";
|
||||
|
||||
+5
-1
@@ -30,7 +30,11 @@ import org.slf4j.LoggerFactory;
|
||||
*
|
||||
* @see http://hawkee.com/snippet/9731/
|
||||
*/
|
||||
public class IPv4Helper {
|
||||
public final class IPv4Helper {
|
||||
|
||||
private IPv4Helper() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the long format of the provided IP address.
|
||||
|
||||
+5
-1
@@ -23,7 +23,11 @@ import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import org.apache.fineract.infrastructure.reportmailingjob.data.ReportMailingJobStretchyReportParamDateOption;
|
||||
|
||||
public class ReportMailingJobDateUtil {
|
||||
public final class ReportMailingJobDateUtil {
|
||||
|
||||
private ReportMailingJobDateUtil() {
|
||||
|
||||
}
|
||||
|
||||
public static final String MYSQL_DATE_FORMAT = "yyyy-MM-dd";
|
||||
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class TwoFactorConfigurationConstants {
|
||||
public final class TwoFactorConfigurationConstants {
|
||||
|
||||
private TwoFactorConfigurationConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String RESOURCE_NAME = "TWOFACTOR_CONFIGURATION";
|
||||
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.security.constants;
|
||||
|
||||
public class TwoFactorConstants {
|
||||
public final class TwoFactorConstants {
|
||||
|
||||
private TwoFactorConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String ACCESSTOKEN_RESOURCE_NAME = "TWOFACTOR_ACCESSTOKEN";
|
||||
|
||||
|
||||
+5
-1
@@ -23,7 +23,11 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class SQLInjectionValidator {
|
||||
public final class SQLInjectionValidator {
|
||||
|
||||
private SQLInjectionValidator() {
|
||||
|
||||
}
|
||||
|
||||
private static final String[] DDL_COMMANDS = { "create", "drop", "alter", "truncate", "comment", "sleep" };
|
||||
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.sms;
|
||||
|
||||
public class SmsApiConstants {
|
||||
public final class SmsApiConstants {
|
||||
|
||||
private SmsApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String RESOURCE_NAME = "sms";
|
||||
|
||||
|
||||
+5
-1
@@ -20,7 +20,11 @@ package org.apache.fineract.infrastructure.sms.domain;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class SmsMessageEnumerations {
|
||||
public final class SmsMessageEnumerations {
|
||||
|
||||
private SmsMessageEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData status(final Integer statusId) {
|
||||
return status(SmsMessageStatusType.fromInt(statusId));
|
||||
|
||||
+6
-2
@@ -23,12 +23,16 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import org.apache.fineract.infrastructure.survey.data.LikelihoodStatus;
|
||||
|
||||
public class LikelihoodApiConstants {
|
||||
public final class LikelihoodApiConstants {
|
||||
|
||||
private LikelihoodApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String ACTIVE = "active";
|
||||
|
||||
public static final String LIKELIHOOD_RESOURCE_NAME = "likelihood";
|
||||
|
||||
protected static final Set<Long> VALID_LIKELIHOOD_ENABLED_VALUES = new HashSet<>(
|
||||
static final Set<Long> VALID_LIKELIHOOD_ENABLED_VALUES = new HashSet<>(
|
||||
Arrays.asList(LikelihoodStatus.DISABLED, LikelihoodStatus.ENABLED));
|
||||
}
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.survey.api;
|
||||
|
||||
public class PovertyLineApiConstants {
|
||||
public final class PovertyLineApiConstants {
|
||||
|
||||
private PovertyLineApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
static final String POVERTY_LINE_RESOURCE_NAME = "PovertyLine";
|
||||
}
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.infrastructure.survey.api;
|
||||
/**
|
||||
* Created by Cieyou on 2/27/14.
|
||||
*/
|
||||
public class SurveyApiConstants {
|
||||
public final class SurveyApiConstants {
|
||||
|
||||
private SurveyApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
static final String SURVEY_RESOURCE_NAME = "Survey";
|
||||
}
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.infrastructure.survey.data;
|
||||
/**
|
||||
* Created by Cieyou on 3/12/14.
|
||||
*/
|
||||
public class LikelihoodStatus {
|
||||
public final class LikelihoodStatus {
|
||||
|
||||
private LikelihoodStatus() {
|
||||
|
||||
}
|
||||
|
||||
public static final long ENABLED = 200;
|
||||
public static final long DISABLED = 100;
|
||||
|
||||
+5
-1
@@ -20,7 +20,11 @@ package org.apache.fineract.interoperation.util;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class InteropUtil {
|
||||
public final class InteropUtil {
|
||||
|
||||
private InteropUtil() {
|
||||
|
||||
}
|
||||
|
||||
public static final String ISO8601_DATE_TIME_FORMAT = "yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]";
|
||||
public static final String ISO8601_DATE_FORMAT = "yyyy-MM-dd";
|
||||
|
||||
+5
-1
@@ -25,7 +25,11 @@ import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
|
||||
import org.apache.fineract.organisation.monetary.domain.Money;
|
||||
import org.apache.fineract.organisation.monetary.domain.MoneyHelper;
|
||||
|
||||
public class MathUtil {
|
||||
public final class MathUtil {
|
||||
|
||||
private MathUtil() {
|
||||
|
||||
}
|
||||
|
||||
public static Long nullToZero(Long value) {
|
||||
return nullToDefault(value, 0L);
|
||||
|
||||
+7
-4
@@ -22,7 +22,11 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class HolidayApiConstants {
|
||||
public final class HolidayApiConstants {
|
||||
|
||||
private HolidayApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String HOLIDAY_RESOURCE_NAME = "holiday";
|
||||
|
||||
@@ -43,7 +47,6 @@ public class HolidayApiConstants {
|
||||
public static final String status = "status";
|
||||
public static final String reschedulingType = "reschedulingType";
|
||||
|
||||
protected static final Set<String> HOLIDAY_RESPONSE_DATA_PARAMETERS = new HashSet<>(
|
||||
Arrays.asList(idParamName, nameParamName, fromDateParamName, descriptionParamName, toDateParamName,
|
||||
repaymentsRescheduledToParamName, localeParamName, dateFormatParamName, status));
|
||||
static final Set<String> HOLIDAY_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, nameParamName, fromDateParamName,
|
||||
descriptionParamName, toDateParamName, repaymentsRescheduledToParamName, localeParamName, dateFormatParamName, status));
|
||||
}
|
||||
|
||||
+5
-1
@@ -22,7 +22,11 @@ import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.organisation.holiday.domain.HolidayStatusType;
|
||||
import org.apache.fineract.organisation.holiday.domain.RescheduleType;
|
||||
|
||||
public class HolidayEnumerations {
|
||||
public final class HolidayEnumerations {
|
||||
|
||||
private HolidayEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData holidayStatusType(final int id) {
|
||||
return holidayStatusType(HolidayStatusType.fromInt(id));
|
||||
|
||||
+5
-1
@@ -23,7 +23,11 @@ import org.apache.fineract.organisation.holiday.domain.Holiday;
|
||||
import org.apache.fineract.organisation.workingdays.data.AdjustedDateDetailsDTO;
|
||||
import org.joda.time.LocalDate;
|
||||
|
||||
public class HolidayUtil {
|
||||
public final class HolidayUtil {
|
||||
|
||||
private HolidayUtil() {
|
||||
|
||||
}
|
||||
|
||||
public static LocalDate getRepaymentRescheduleDateToIfHoliday(LocalDate repaymentDate, final List<Holiday> holidays) {
|
||||
|
||||
|
||||
+5
-1
@@ -20,7 +20,11 @@ package org.apache.fineract.organisation.staff.domain;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class StaffEnumerations {
|
||||
public final class StaffEnumerations {
|
||||
|
||||
private StaffEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData organisationalRole(final Integer id) {
|
||||
return organisationalRole(StaffOrganisationalRoleType.fromInt(id));
|
||||
|
||||
+7
-3
@@ -22,7 +22,11 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class WorkingDaysApiConstants {
|
||||
public final class WorkingDaysApiConstants {
|
||||
|
||||
private WorkingDaysApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String WORKING_DAYS_RESOURCE_NAME = "workingdays";
|
||||
|
||||
@@ -38,8 +42,8 @@ public class WorkingDaysApiConstants {
|
||||
public static final String extendTermForDailyRepayments = "extendTermForDailyRepayments";
|
||||
public static final String extendTermForRepaymentsOnHolidays = "extendTermForRepaymentsOnHolidays";
|
||||
|
||||
protected static final Set<String> WORKING_DAYS_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, recurrence,
|
||||
static final Set<String> WORKING_DAYS_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, recurrence,
|
||||
repayment_rescheduling_enum, extendTermForDailyRepayments, extendTermForRepaymentsOnHolidays));
|
||||
|
||||
protected static final Set<String> WORKING_DAYS_TEMPLATE_PARAMETERS = new HashSet<>(Arrays.asList(rescheduleRepaymentTemplate));
|
||||
static final Set<String> WORKING_DAYS_TEMPLATE_PARAMETERS = new HashSet<>(Arrays.asList(rescheduleRepaymentTemplate));
|
||||
}
|
||||
|
||||
+5
-1
@@ -20,7 +20,11 @@ package org.apache.fineract.organisation.workingdays.domain;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class WorkingDaysEnumerations {
|
||||
public final class WorkingDaysEnumerations {
|
||||
|
||||
private WorkingDaysEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData workingDaysStatusType(final int id) {
|
||||
return repaymentRescheduleType(RepaymentRescheduleType.fromInt(id));
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ import org.apache.fineract.organisation.workingdays.domain.WorkingDays;
|
||||
import org.apache.fineract.portfolio.calendar.service.CalendarUtils;
|
||||
import org.joda.time.LocalDate;
|
||||
|
||||
public class WorkingDaysUtil {
|
||||
public final class WorkingDaysUtil {
|
||||
|
||||
private WorkingDaysUtil() {
|
||||
|
||||
}
|
||||
|
||||
public static LocalDate getOffSetDateIfNonWorkingDay(final LocalDate date, final LocalDate nextMeetingDate,
|
||||
final WorkingDays workingDays) {
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.portfolio.account;
|
||||
|
||||
public class AccountDetailConstants {
|
||||
public final class AccountDetailConstants {
|
||||
|
||||
private AccountDetailConstants() {
|
||||
|
||||
}
|
||||
|
||||
// general
|
||||
public static final String localeParamName = "locale";
|
||||
|
||||
+6
-2
@@ -24,7 +24,11 @@ import java.util.Set;
|
||||
import org.apache.fineract.portfolio.account.AccountDetailConstants;
|
||||
import org.apache.fineract.portfolio.account.data.AccountTransferData;
|
||||
|
||||
public class AccountTransfersApiConstants {
|
||||
public final class AccountTransfersApiConstants {
|
||||
|
||||
private AccountTransfersApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String ACCOUNT_TRANSFER_RESOURCE_NAME = "accounttransfer";
|
||||
|
||||
@@ -38,6 +42,6 @@ public class AccountTransfersApiConstants {
|
||||
* These parameters will match the class level parameters of {@link AccountTransferData}. Where possible, we try to
|
||||
* get response parameters to match those of request parameters.
|
||||
*/
|
||||
protected static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(
|
||||
static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(
|
||||
Arrays.asList(AccountDetailConstants.idParamName, transferDescriptionParamName, currencyParamName));
|
||||
}
|
||||
|
||||
+6
-2
@@ -23,7 +23,11 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import org.apache.fineract.portfolio.account.AccountDetailConstants;
|
||||
|
||||
public class StandingInstructionApiConstants {
|
||||
public final class StandingInstructionApiConstants {
|
||||
|
||||
private StandingInstructionApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String STANDING_INSTRUCTION_RESOURCE_NAME = "standinginstruction";
|
||||
|
||||
@@ -40,7 +44,7 @@ public class StandingInstructionApiConstants {
|
||||
public static final String recurrenceOnMonthDayParamName = "recurrenceOnMonthDay";
|
||||
public static final String monthDayFormatParamName = "monthDayFormat";
|
||||
|
||||
protected static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(
|
||||
static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(
|
||||
Arrays.asList(AccountDetailConstants.idParamName, nameParamName, priorityParamName, instructionTypeParamName, statusParamName,
|
||||
AccountDetailConstants.transferTypeParamName, validFromParamName, validTillParamName));
|
||||
|
||||
|
||||
+5
-1
@@ -26,7 +26,11 @@ import org.apache.fineract.portfolio.account.domain.StandingInstructionPriority;
|
||||
import org.apache.fineract.portfolio.account.domain.StandingInstructionStatus;
|
||||
import org.apache.fineract.portfolio.account.domain.StandingInstructionType;
|
||||
|
||||
public class AccountTransferEnumerations {
|
||||
public final class AccountTransferEnumerations {
|
||||
|
||||
private AccountTransferEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData accountType(final Integer type) {
|
||||
return accountType(PortfolioAccountType.fromInt(type));
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.portfolio.accountdetails.service;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.portfolio.accountdetails.domain.AccountType;
|
||||
|
||||
public class AccountEnumerations {
|
||||
public final class AccountEnumerations {
|
||||
|
||||
private AccountEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData loanType(final Integer loanTypeId) {
|
||||
return loanType(AccountType.fromInt(loanTypeId));
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.portfolio.calendar;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class CalendarConstants {
|
||||
public final class CalendarConstants {
|
||||
|
||||
private CalendarConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String CALENDAR_RESOURCE_NAME = "calendar";
|
||||
|
||||
|
||||
+5
-1
@@ -29,7 +29,11 @@ import org.apache.fineract.portfolio.calendar.domain.CalendarType;
|
||||
import org.apache.fineract.portfolio.calendar.domain.CalendarWeekDaysType;
|
||||
import org.apache.fineract.portfolio.common.domain.NthDayType;
|
||||
|
||||
public class CalendarEnumerations {
|
||||
public final class CalendarEnumerations {
|
||||
|
||||
private CalendarEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData calendarEntityType(final int id) {
|
||||
return calendarEntityType(CalendarEntityType.fromInt(id));
|
||||
|
||||
+5
-1
@@ -54,7 +54,11 @@ import org.joda.time.format.DateTimeFormatter;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class CalendarUtils {
|
||||
public final class CalendarUtils {
|
||||
|
||||
private CalendarUtils() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CalendarUtils.class);
|
||||
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.portfolio.charge.api;
|
||||
|
||||
public class ChargesApiConstants {
|
||||
public final class ChargesApiConstants {
|
||||
|
||||
private ChargesApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String glAccountIdParamName = "incomeAccountId";
|
||||
public static final String taxGroupIdParamName = "taxGroupId";
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ import org.apache.fineract.portfolio.charge.domain.ChargeCalculationType;
|
||||
import org.apache.fineract.portfolio.charge.domain.ChargePaymentMode;
|
||||
import org.apache.fineract.portfolio.charge.domain.ChargeTimeType;
|
||||
|
||||
public class ChargeEnumerations {
|
||||
public final class ChargeEnumerations {
|
||||
|
||||
private ChargeEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData chargeTimeType(final int id) {
|
||||
return chargeTimeType(ChargeTimeType.fromInt(id));
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import org.apache.fineract.portfolio.client.data.ClientData;
|
||||
|
||||
@SuppressWarnings({ "HideUtilityClassConstructor" })
|
||||
public class ClientApiConstants {
|
||||
|
||||
public static final String CLIENT_RESOURCE_NAME = "client";
|
||||
|
||||
+5
-1
@@ -22,7 +22,11 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class ClientEnumerations {
|
||||
public final class ClientEnumerations {
|
||||
|
||||
private ClientEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData status(final Integer statusId) {
|
||||
return status(ClientStatus.fromInt(statusId));
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.portfolio.collateral.api;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class CollateralApiConstants {
|
||||
public final class CollateralApiConstants {
|
||||
|
||||
private CollateralApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String COLLATERAL_CODE_NAME = "LoanCollateral";
|
||||
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.portfolio.collectionsheet;
|
||||
|
||||
public class CollectionSheetConstants {
|
||||
public final class CollectionSheetConstants {
|
||||
|
||||
private CollectionSheetConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String COLLECTIONSHEET_RESOURCE_NAME = "collectionsheet";
|
||||
|
||||
|
||||
+5
-1
@@ -26,7 +26,11 @@ import org.apache.fineract.portfolio.common.domain.DaysInMonthType;
|
||||
import org.apache.fineract.portfolio.common.domain.DaysInYearType;
|
||||
import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType;
|
||||
|
||||
public class CommonEnumerations {
|
||||
public final class CommonEnumerations {
|
||||
|
||||
private CommonEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static final String DAYS_IN_MONTH_TYPE = "daysInMonthType";
|
||||
public static final String DAYS_IN_YEAR_TYPE = "daysInYearType";
|
||||
|
||||
+11
-7
@@ -23,7 +23,11 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import org.apache.fineract.portfolio.group.data.CenterData;
|
||||
|
||||
public class GroupingTypesApiConstants {
|
||||
public final class GroupingTypesApiConstants {
|
||||
|
||||
private GroupingTypesApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String CENTER_RESOURCE_NAME = "center";
|
||||
public static final String GROUP_RESOURCE_NAME = "group";
|
||||
@@ -92,22 +96,22 @@ public class GroupingTypesApiConstants {
|
||||
* 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.
|
||||
*/
|
||||
protected static final Set<String> CENTER_RESPONSE_DATA_PARAMETERS = new HashSet<>(
|
||||
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));
|
||||
|
||||
protected static final Set<String> CENTER_GROUP_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, nameParamName,
|
||||
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));
|
||||
|
||||
protected static final Set<String> GROUP_RESPONSE_DATA_PARAMETERS = new HashSet<>(
|
||||
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));
|
||||
|
||||
protected static final Set<String> COLLECTIONSHEET_DATA_PARAMETERS = new HashSet<>(Arrays.asList("dueDate", "loanProducts", "groups"));
|
||||
static final Set<String> COLLECTIONSHEET_DATA_PARAMETERS = new HashSet<>(Arrays.asList("dueDate", "loanProducts", "groups"));
|
||||
|
||||
protected static final Set<String> STAFF_CENTER_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(staffIdParamName,
|
||||
staffNameParamName, meetingFallCenters, totalCollected, totalOverdue, totaldue, installmentDue));
|
||||
static final Set<String> STAFF_CENTER_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(staffIdParamName, staffNameParamName,
|
||||
meetingFallCenters, totalCollected, totalOverdue, totaldue, installmentDue));
|
||||
}
|
||||
|
||||
+5
-1
@@ -20,7 +20,11 @@ package org.apache.fineract.portfolio.group.domain;
|
||||
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
|
||||
public class GroupingTypeEnumerations {
|
||||
public final class GroupingTypeEnumerations {
|
||||
|
||||
private GroupingTypeEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData status(final Integer statusId) {
|
||||
return status(GroupingTypeStatus.fromInt(statusId));
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.portfolio.group.service;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.portfolio.group.domain.GroupTypes;
|
||||
|
||||
public class GroupTypeEnumerations {
|
||||
public final class GroupTypeEnumerations {
|
||||
|
||||
private GroupTypeEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData groupType(final Integer id) {
|
||||
return groupType(GroupTypes.fromInt(id));
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.portfolio.interestratechart;
|
||||
|
||||
public class InterestRateChartApiConstants {
|
||||
public final class InterestRateChartApiConstants {
|
||||
|
||||
private InterestRateChartApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String INTERESTRATE_CHART_RESOURCE_NAME = "interestchart";
|
||||
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.portfolio.interestratechart;
|
||||
|
||||
public class InterestRateChartSlabApiConstants {
|
||||
public final class InterestRateChartSlabApiConstants {
|
||||
|
||||
private InterestRateChartSlabApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String INTERESTRATE_CHART_SLAB_RESOURCE_NAME = "chartslab";
|
||||
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.portfolio.interestratechart.incentive;
|
||||
|
||||
public class AttributeIncentiveCalculationFactory {
|
||||
public final class AttributeIncentiveCalculationFactory {
|
||||
|
||||
private AttributeIncentiveCalculationFactory() {
|
||||
|
||||
}
|
||||
|
||||
public static AttributeIncentiveCalculation findAttributeIncentiveCalculation(InterestIncentiveEntityType entityType) {
|
||||
AttributeIncentiveCalculation attributeIncentiveCalculation = null;
|
||||
|
||||
+5
-1
@@ -25,7 +25,11 @@ import org.apache.fineract.portfolio.interestratechart.incentive.InterestIncenti
|
||||
import org.apache.fineract.portfolio.interestratechart.incentive.InterestIncentiveEntityType;
|
||||
import org.apache.fineract.portfolio.interestratechart.incentive.InterestIncentiveType;
|
||||
|
||||
public class InterestIncentivesEnumerations {
|
||||
public final class InterestIncentivesEnumerations {
|
||||
|
||||
private InterestIncentivesEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData attributeName(final Integer attributeName) {
|
||||
return attributeName(InterestIncentiveAttributeName.fromInt(attributeName));
|
||||
|
||||
+5
-1
@@ -25,7 +25,11 @@ import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class InterestRateChartEnumerations {
|
||||
public final class InterestRateChartEnumerations {
|
||||
|
||||
private InterestRateChartEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(InterestRateChartEnumerations.class);
|
||||
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.portfolio.loanaccount.guarantor;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class GuarantorConstants {
|
||||
public final class GuarantorConstants {
|
||||
|
||||
private GuarantorConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String GUARANTOR_RELATIONSHIP_CODE_NAME = "GuarantorRelationship";
|
||||
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.portfolio.loanaccount.guarantor.domain.GuarantorFundStatusType;
|
||||
import org.apache.fineract.portfolio.loanaccount.guarantor.domain.GuarantorType;
|
||||
|
||||
public class GuarantorEnumerations {
|
||||
public final class GuarantorEnumerations {
|
||||
|
||||
private GuarantorEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData guarantorType(final int id) {
|
||||
return guarantorType(GuarantorType.fromInt(id));
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
*/
|
||||
package org.apache.fineract.portfolio.loanaccount.loanschedule.domain;
|
||||
|
||||
public class FinanicalFunctions {
|
||||
public final class FinanicalFunctions {
|
||||
|
||||
private FinanicalFunctions() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PMT calculates a fixed monthly payment to be paid by borrower every 'period' to ensure loan is paid off in full
|
||||
|
||||
+5
-1
@@ -23,7 +23,11 @@ import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class RescheduleLoansApiConstants {
|
||||
public final class RescheduleLoansApiConstants {
|
||||
|
||||
private RescheduleLoansApiConstants() {
|
||||
|
||||
}
|
||||
|
||||
public static final String ENTITY_NAME = "RESCHEDULELOAN";
|
||||
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.portfolio.loanaccount.rescheduleloan.data;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanStatus;
|
||||
|
||||
public class LoanRescheduleRequestEnumerations {
|
||||
public final class LoanRescheduleRequestEnumerations {
|
||||
|
||||
private LoanRescheduleRequestEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData status(final LoanRescheduleRequestStatusEnumData status) {
|
||||
Long id = status.id();
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.portfolio.loanproduct.service;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.portfolio.loanproduct.domain.LendingStrategy;
|
||||
|
||||
public class LendingStrategyEnumerations {
|
||||
public final class LendingStrategyEnumerations {
|
||||
|
||||
private LendingStrategyEnumerations() {
|
||||
|
||||
}
|
||||
|
||||
public static EnumOptionData lendingStrategy(final Integer id) {
|
||||
return lendingStrategy(LendingStrategy.fromInt(id));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user