FINERACT-821 Added and Enforced HideUtilityClassConstructor checkstyle
This commit is contained in:
committed by
Petri Tuomola
parent
774fcd9265
commit
8a3c1903a4
@@ -162,6 +162,7 @@
|
||||
<message key="ws.notPreceded"
|
||||
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
<module name="HideUtilityClassConstructor"/>
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="MethodName">
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9_]*$"/>
|
||||
@@ -209,7 +210,6 @@
|
||||
<property name="setterCanReturnItsClass" value="true" />
|
||||
</module>
|
||||
|
||||
<module name="HideUtilityClassConstructor"/>
|
||||
|
||||
< ! - - TODO Checks for Exception Handling Anti-Patterns - - >
|
||||
<module name="IllegalCatch"/>
|
||||
|
||||
+5
-1
@@ -24,10 +24,14 @@ import java.util.HashMap;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ClientStatusChecker {
|
||||
public final class ClientStatusChecker {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ClientStatusChecker.class);
|
||||
|
||||
private ClientStatusChecker() {
|
||||
|
||||
}
|
||||
|
||||
public static void verifyClientIsActive(final HashMap<String, Object> clientStatusHashMap) {
|
||||
assertEquals(300, (int) clientStatusHashMap.get("id"));
|
||||
}
|
||||
|
||||
+5
-1
@@ -28,7 +28,7 @@ import java.util.HashMap;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class CalendarHelper {
|
||||
public final class CalendarHelper {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CalendarHelper.class);
|
||||
private static final String BASE_URL = "/fineract-provider/api/v1/";
|
||||
@@ -37,6 +37,10 @@ public class CalendarHelper {
|
||||
private static final String CENTER_ENTITY = "centers/";
|
||||
private static final String EDIT_CALENDAR = "editcalendarbasedonmeetingdates/";
|
||||
|
||||
private CalendarHelper() {
|
||||
|
||||
}
|
||||
|
||||
public static Integer createMeetingCalendarForGroup(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
final Integer groupId, final String startDate, final String frequency, final String interval, final String repeatsOnDay) {
|
||||
|
||||
|
||||
+5
-1
@@ -31,7 +31,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class CenterHelper {
|
||||
public final class CenterHelper {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CenterHelper.class);
|
||||
private static final String CENTERS_URL = "/fineract-provider/api/v1/centers";
|
||||
@@ -39,6 +39,10 @@ public class CenterHelper {
|
||||
public static final String CREATED_DATE = "29 December 2014";
|
||||
private static final String CREATE_CENTER_URL = "/fineract-provider/api/v1/centers?" + Utils.TENANT_IDENTIFIER;
|
||||
|
||||
private CenterHelper() {
|
||||
|
||||
}
|
||||
|
||||
public static CenterDomain retrieveByID(int id, final RequestSpecification requestSpec, final ResponseSpecification responseSpec) {
|
||||
final String GET_CENTER_BY_ID_URL = CENTERS_URL + "/" + id + "?associations=groupMembers&" + Utils.TENANT_IDENTIFIER;
|
||||
LOG.info("------------------------ RETRIEVING CENTER AT {}-------------------------", id);
|
||||
|
||||
+5
-1
@@ -28,7 +28,11 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({ "unused", "rawtypes", "unchecked" })
|
||||
public class CurrenciesHelper {
|
||||
public final class CurrenciesHelper {
|
||||
|
||||
private CurrenciesHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CurrenciesHelper.class);
|
||||
private static final String CURRENCIES_URL = "/fineract-provider/api/v1/currencies";
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ import org.apache.http.HttpHeaders;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ImageHelper {
|
||||
public final class ImageHelper {
|
||||
|
||||
private ImageHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ImageHelper.class);
|
||||
private static final String STAFF_IMAGE_URL = "/fineract-provider/api/v1/staff/";
|
||||
|
||||
+5
-1
@@ -23,7 +23,11 @@ import io.restassured.specification.RequestSpecification;
|
||||
import io.restassured.specification.ResponseSpecification;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class PasswordPreferencesHelper {
|
||||
public final class PasswordPreferencesHelper {
|
||||
|
||||
private PasswordPreferencesHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final String PASSWORD_PREFERENCES_URL = "/fineract-provider/api/v1/passwordpreferences";
|
||||
|
||||
|
||||
+5
-1
@@ -27,7 +27,11 @@ import io.restassured.specification.ResponseSpecification;
|
||||
import java.util.HashMap;
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class PaymentTypeHelper {
|
||||
public final class PaymentTypeHelper {
|
||||
|
||||
private PaymentTypeHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final String CREATE_PAYMENTTYPE_URL = "/fineract-provider/api/v1/paymenttypes?" + Utils.TENANT_IDENTIFIER;
|
||||
private static final String PAYMENTTYPE_URL = "/fineract-provider/api/v1/paymenttypes";
|
||||
|
||||
+5
-1
@@ -27,7 +27,11 @@ import java.util.HashMap;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class SurveyHelper {
|
||||
public final class SurveyHelper {
|
||||
|
||||
private SurveyHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SurveyHelper.class);
|
||||
private static final String FULFIL_SURVEY_URL = "/fineract-provider/api/v1/survey/ppi_kenya_2009/clientId?" + Utils.TENANT_IDENTIFIER;
|
||||
|
||||
+5
-1
@@ -26,7 +26,11 @@ import org.apache.fineract.integrationtests.common.accounting.Account;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class TaxComponentHelper {
|
||||
public final class TaxComponentHelper {
|
||||
|
||||
private TaxComponentHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TaxComponentHelper.class);
|
||||
private static final String CREATE_TAX_COMPONENT_URL = "/fineract-provider/api/v1/taxes/component?" + Utils.TENANT_IDENTIFIER;
|
||||
|
||||
+5
-1
@@ -28,7 +28,11 @@ import java.util.List;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class TaxGroupHelper {
|
||||
public final class TaxGroupHelper {
|
||||
|
||||
private TaxGroupHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TaxGroupHelper.class);
|
||||
private static final String CREATE_TAX_COMPONENT_URL = "/fineract-provider/api/v1/taxes/group?" + Utils.TENANT_IDENTIFIER;
|
||||
|
||||
+5
-1
@@ -49,7 +49,11 @@ import org.slf4j.LoggerFactory;
|
||||
* sync.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class Utils {
|
||||
public final class Utils {
|
||||
|
||||
private Utils() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Utils.class);
|
||||
|
||||
|
||||
+5
-1
@@ -26,7 +26,11 @@ import java.util.Random;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class WorkingDaysHelper {
|
||||
public final class WorkingDaysHelper {
|
||||
|
||||
private WorkingDaysHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WorkingDaysHelper.class);
|
||||
private static final String WORKINGDAYS_URL = "/fineract-provider/api/v1/workingdays";
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ package org.apache.fineract.integrationtests.common.accounting;
|
||||
import com.google.gson.Gson;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class FinancialActivityAccountsMappingBuilder {
|
||||
public final class FinancialActivityAccountsMappingBuilder {
|
||||
|
||||
private FinancialActivityAccountsMappingBuilder() {
|
||||
|
||||
}
|
||||
|
||||
public static String build(Integer financialActivityId, Integer glAccountId) {
|
||||
final HashMap<String, Object> map = new HashMap<>();
|
||||
|
||||
+5
-1
@@ -30,7 +30,11 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class ChargesHelper {
|
||||
public final class ChargesHelper {
|
||||
|
||||
private ChargesHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ChargesHelper.class);
|
||||
private static final String CHARGES_URL = "/fineract-provider/api/v1/charges";
|
||||
|
||||
+5
-1
@@ -29,7 +29,11 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class FixedDepositAccountStatusChecker {
|
||||
public final class FixedDepositAccountStatusChecker {
|
||||
|
||||
private FixedDepositAccountStatusChecker() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(FixedDepositAccountStatusChecker.class);
|
||||
private static final String FIXED_DEPOSIT_ACCOUNT_URL = "/fineract-provider/api/v1/fixeddepositaccounts";
|
||||
|
||||
+5
-1
@@ -26,7 +26,11 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
|
||||
public class FundsResourceHandler {
|
||||
public final class FundsResourceHandler {
|
||||
|
||||
private FundsResourceHandler() {
|
||||
|
||||
}
|
||||
|
||||
private static final String FUNDS_URL = "/fineract-provider/api/v1/funds";
|
||||
private static final String CREATE_FUNDS_URL = FUNDS_URL + "?" + Utils.TENANT_IDENTIFIER;
|
||||
|
||||
+5
-1
@@ -28,7 +28,11 @@ import java.util.HashMap;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class LoanStatusChecker {
|
||||
public final class LoanStatusChecker {
|
||||
|
||||
private LoanStatusChecker() {
|
||||
|
||||
}
|
||||
|
||||
public static void verifyLoanIsApproved(final HashMap loanStatusHashMap) {
|
||||
assertFalse(getStatus(loanStatusHashMap, "pendingApproval"));
|
||||
|
||||
+5
-1
@@ -29,7 +29,11 @@ import org.apache.fineract.integrationtests.common.Utils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class StaffHelper {
|
||||
public final class StaffHelper {
|
||||
|
||||
private StaffHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(StaffHelper.class);
|
||||
private static final String TRANSFER_STAFF_URL = "/fineract-provider/api/v1/groups";
|
||||
|
||||
+5
-1
@@ -28,7 +28,11 @@ import java.util.Random;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
import org.apache.fineract.integrationtests.common.accounting.Account;
|
||||
|
||||
public class ProvisioningHelper {
|
||||
public final class ProvisioningHelper {
|
||||
|
||||
private ProvisioningHelper() {
|
||||
|
||||
}
|
||||
|
||||
public static final Map createProvisioingCriteriaJson(ArrayList<Integer> loanProducts, ArrayList categories, Account liability,
|
||||
Account expense) {
|
||||
|
||||
+5
-1
@@ -27,7 +27,11 @@ import org.apache.fineract.integrationtests.common.CommonConstants;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class RatesHelper {
|
||||
public final class RatesHelper {
|
||||
|
||||
private RatesHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final String RATES_URL = "/fineract-provider/api/v1/rates";
|
||||
private static final String CREATE_RATES_URL = RATES_URL + "?" + Utils.TENANT_IDENTIFIER;
|
||||
|
||||
+5
-1
@@ -29,7 +29,11 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class RecurringDepositAccountStatusChecker {
|
||||
public final class RecurringDepositAccountStatusChecker {
|
||||
|
||||
private RecurringDepositAccountStatusChecker() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(RecurringDepositAccountStatusChecker.class);
|
||||
private static final String RECURRING_DEPOSIT_ACCOUNT_URL = "/fineract-provider/api/v1/recurringdepositaccounts";
|
||||
|
||||
+5
-1
@@ -28,7 +28,11 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class SavingsStatusChecker {
|
||||
public final class SavingsStatusChecker {
|
||||
|
||||
private SavingsStatusChecker() {
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SavingsStatusChecker.class);
|
||||
private static final String SAVINGS_ACCOUNT_URL = "/fineract-provider/api/v1/savingsaccounts";
|
||||
|
||||
+5
-1
@@ -23,7 +23,11 @@ import io.restassured.specification.ResponseSpecification;
|
||||
import java.util.Map;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
|
||||
public class ShareAccountTransactionHelper {
|
||||
public final class ShareAccountTransactionHelper {
|
||||
|
||||
private ShareAccountTransactionHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final String SHARE_ACCOUNT_URL = "/fineract-provider/api/v1/accounts/share";
|
||||
private static final String CREATE_SHARE_ACCOUNT_URL = SHARE_ACCOUNT_URL + "?" + Utils.TENANT_IDENTIFIER;
|
||||
|
||||
+5
-1
@@ -23,7 +23,11 @@ import io.restassured.specification.ResponseSpecification;
|
||||
import java.util.Map;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
|
||||
public class ShareDividendsTransactionHelper {
|
||||
public final class ShareDividendsTransactionHelper {
|
||||
|
||||
private ShareDividendsTransactionHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final String SHARE_PRODUCT_URL = "/fineract-provider/api/v1/shareproduct";
|
||||
private static final String DIVIDEND = "dividend";
|
||||
|
||||
+5
-1
@@ -23,7 +23,11 @@ import io.restassured.specification.ResponseSpecification;
|
||||
import java.util.Map;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
|
||||
public class ShareProductTransactionHelper {
|
||||
public final class ShareProductTransactionHelper {
|
||||
|
||||
private ShareProductTransactionHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final String SHARE_PRODUCT_URL = "/fineract-provider/api/v1/products/share";
|
||||
private static final String CREATE_SHARE_PRODUCT_URL = SHARE_PRODUCT_URL + "?" + Utils.TENANT_IDENTIFIER;
|
||||
|
||||
+5
-1
@@ -29,7 +29,11 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
|
||||
public class CodeHelper {
|
||||
public final class CodeHelper {
|
||||
|
||||
private CodeHelper() {
|
||||
|
||||
}
|
||||
|
||||
public static final String CODE_ID_ATTRIBUTE_NAME = "id";
|
||||
public static final String RESPONSE_ID_ATTRIBUTE_NAME = "resourceId";
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ import io.restassured.specification.ResponseSpecification;
|
||||
import java.util.HashMap;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
|
||||
public class RolesHelper {
|
||||
public final class RolesHelper {
|
||||
|
||||
private RolesHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final String CREATE_ROLE_URL = "/fineract-provider/api/v1/roles?" + Utils.TENANT_IDENTIFIER;
|
||||
private static final String ROLE_URL = "/fineract-provider/api/v1/roles";
|
||||
|
||||
+5
-1
@@ -26,7 +26,11 @@ import java.util.List;
|
||||
import org.apache.fineract.integrationtests.common.Utils;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
|
||||
public class UserHelper {
|
||||
public final class UserHelper {
|
||||
|
||||
private UserHelper() {
|
||||
|
||||
}
|
||||
|
||||
private static final String CREATE_USER_URL = "/fineract-provider/api/v1/users?" + Utils.TENANT_IDENTIFIER;
|
||||
private static final String USER_URL = "/fineract-provider/api/v1/users";
|
||||
|
||||
+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) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user