From c529fdf58c335adb4dd938b0551f7e355e9eb56d Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Sat, 20 Jun 2020 23:26:52 +0200 Subject: [PATCH] increase auto formatting comment line length from 80 to 120 --- config/fineractdev-formatter.xml | 2 +- .../AccountNumberPreferencesTest.java | 9 +- .../integrationtests/BatchApiTest.java | 73 ++++----- .../BatchRequestsIntegrationTest.java | 20 +-- .../ClientLoanIntegrationTest.java | 97 +++++------- .../ClientSavingsIntegrationTest.java | 143 +++++++----------- .../DisbursalAndRepaymentScheduleTest.java | 3 +- .../FinancialActivityAccountsTest.java | 9 +- .../integrationtests/FixedDepositTest.java | 42 +++-- ...SavingsInterestPostingIntegrationTest.java | 3 +- .../GlobalConfigurationTest.java | 9 +- .../fineract/integrationtests/GroupTest.java | 3 +- .../integrationtests/HookIntegrationTest.java | 4 +- .../LoanApplicationApprovalTest.java | 9 +- ...oanDisbursementDetailsIntegrationTest.java | 132 ++++++---------- ...iveInterestAndWriteOffIntegrationTest.java | 3 +- ...BetweenDisbursalAndFirstRepaymentTest.java | 10 +- .../RecurringDepositTest.java | 104 ++++++------- .../SurveyIntegrationTest.java | 3 +- .../integrationtests/common/BatchHelper.java | 76 ++++------ .../common/ClientChargesTest.java | 33 ++-- .../common/GlobalConfigurationHelper.java | 15 +- .../common/SchedulerJobHelper.java | 4 +- .../integrationtests/common/Utils.java | 4 +- .../loans/LoanApplicationTestBuilder.java | 12 +- .../loans/LoanDisbursementTestBuilder.java | 31 ++-- .../EntityDatatableChecksIntegrationTest.java | 3 +- .../apache/fineract/ServerApplication.java | 13 +- .../AccrualAccountingDataValidator.java | 3 +- .../api/GLClosuresApiResourceSwagger.java | 3 +- .../closure/data/GLClosureData.java | 3 +- .../GLClosureDuplicateException.java | 3 +- .../exception/GLClosureNotFoundException.java | 3 +- ...ClosureCommandFromApiJsonDeserializer.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../common/AccountingConstants.java | 9 +- ...ncialActivityAccountRepositoryWrapper.java | 3 +- ...inancialActivityAccountFoundException.java | 3 +- ...ancialActivityAccountInvalidException.java | 3 +- ...ncialActivityAccountNotFoundException.java | 3 +- ...tivityAccountWritePlatformServiceImpl.java | 3 +- .../glaccount/data/GLAccountData.java | 3 +- .../exception/GLAccountDisableException.java | 3 +- .../GLAccountDuplicateException.java | 3 +- ...AccountInvalidClassificationException.java | 3 +- .../GLAccountInvalidDeleteException.java | 3 +- .../GLAccountInvalidParentException.java | 3 +- .../GLAccountInvalidUpdateException.java | 3 +- .../GLAccountInvalidUsageException.java | 3 +- ...AccountCommandFromApiJsonDeserializer.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../journalentry/data/JournalEntryData.java | 3 +- .../domain/JournalEntryRepository.java | 10 +- ...alEntryCommandFromApiJsonDeserializer.java | 3 +- .../AccountingProcessorForSavingsFactory.java | 5 +- .../service/AccountingProcessorHelper.java | 83 ++++------ ...ccrualBasedAccountingProcessorForLoan.java | 46 ++---- ...ountingProcessorForClientTransactions.java | 12 +- .../CashBasedAccountingProcessorForLoan.java | 39 ++--- ...ashBasedAccountingProcessorForSavings.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 11 +- ...uctToGLAccountMappingInvalidException.java | 3 +- ...ctToGLAccountMappingNotFoundException.java | 3 +- ...AccountMappingFromApiJsonDeserializer.java | 26 ++-- .../LoanProductToGLAccountMappingHelper.java | 3 +- .../ProductToGLAccountMappingHelper.java | 43 +++--- ...ccountMappingWritePlatformServiceImpl.java | 21 ++- ...avingsProductToGLAccountMappingHelper.java | 3 +- .../ShareProductToGLAccountMappingHelper.java | 3 +- .../rule/data/AccountingRuleData.java | 3 +- .../AccountingRuleDuplicateException.java | 3 +- .../AccountingRuleNotFoundException.java | 3 +- .../adhocquery/api/AdHocApiResource.java | 3 +- .../service/AdHocDataValidator.java | 9 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../fineract/batch/api/BatchApiResource.java | 16 +- .../batch/command/CommandContext.java | 11 +- .../batch/command/CommandStrategy.java | 10 +- .../command/CommandStrategyProvider.java | 20 +-- .../ActivateClientCommandStrategy.java | 12 +- .../internal/ApplyLoanCommandStrategy.java | 12 +- .../internal/ApplySavingsCommandStrategy.java | 12 +- .../internal/ApproveLoanCommandStrategy.java | 12 +- .../CollectChargesCommandStrategy.java | 12 +- .../internal/CreateChargeCommandStrategy.java | 12 +- .../internal/CreateClientCommandStrategy.java | 12 +- .../internal/DisburseLoanCommandStrategy.java | 12 +- .../internal/RepayLoanCommandStrategy.java | 8 +- .../internal/UnknownCommandStrategy.java | 5 +- .../internal/UpdateClientCommandStrategy.java | 12 +- .../fineract/batch/domain/BatchRequest.java | 17 +-- .../fineract/batch/domain/BatchResponse.java | 13 +- .../apache/fineract/batch/domain/Header.java | 5 +- .../batch/exception/ErrorHandler.java | 11 +- .../fineract/batch/exception/ErrorInfo.java | 6 +- .../serialization/BatchRequestJsonHelper.java | 9 +- .../batch/service/BatchApiService.java | 20 +-- .../batch/service/BatchApiServiceImpl.java | 11 +- .../batch/service/ResolutionHelper.java | 18 +-- .../commands/annotation/CommandType.java | 3 +- ...ommandIsNotApprovedByCheckerException.java | 11 +- .../UnsupportedCommandException.java | 4 +- .../provider/CommandHandlerProvider.java | 12 +- ...CommandSourceWritePlatformServiceImpl.java | 6 +- .../SynchronousCommandProcessingService.java | 10 +- .../AccountNumberFormatDataValidator.java | 6 +- .../service/AccountNumberFormatConstants.java | 5 +- ...ntNumberFormatReadPlatformServiceImpl.java | 5 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../populator/PersonnelSheetPopulator.java | 10 +- .../RuntimeDelegatingCacheManager.java | 8 +- .../email/api/EmailCampaignApiResource.java | 4 +- .../EmailCampaignReadPlatformServiceImpl.java | 5 +- ...mpaignWritePlatformCommandHandlerImpl.java | 23 ++- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../service/SmsCampaignDomainServiceImpl.java | 5 +- ...msCampaignWritePlatformServiceJpaImpl.java | 17 +-- .../infrastructure/codes/CodeConstants.java | 3 +- .../domain/CodeValueRepositoryWrapper.java | 11 +- ...emDefinedCodeCannotBeChangedException.java | 3 +- .../service/CodeValueReadPlatformService.java | 6 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../domain/ConfigurationDomainServiceJpa.java | 3 +- .../GlobalConfigurationRepositoryWrapper.java | 3 +- ...onfigurationPropertyNotFoundException.java | 3 +- ...urationCommandFromApiJsonDeserializer.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../core/api/ApiRequestParameterHelper.java | 7 +- .../infrastructure/core/api/DateAdapter.java | 4 +- .../core/api/JodaDateTimeAdapter.java | 3 +- .../core/api/JodaLocalDateAdapter.java | 4 +- .../core/api/JodaMonthDayAdapter.java | 4 +- .../infrastructure/core/api/JsonCommand.java | 4 +- .../infrastructure/core/api/JsonQuery.java | 3 +- .../AbstractApplicationConfiguration.java | 9 +- .../EmbeddedTomcatWithSSLConfiguration.java | 11 +- .../core/boot/WebXmlOauthConfiguration.java | 3 +- .../core/data/ApiGlobalErrorResponse.java | 15 +- .../core/data/ApiParameterError.java | 13 +- .../core/data/CommandProcessingResult.java | 3 +- .../data/CommandProcessingResultBuilder.java | 3 +- .../core/data/DataValidatorBuilder.java | 10 +- .../core/debug/EchoHeadersResource.java | 13 +- .../core/domain/AbstractAuditableCustom.java | 8 +- .../domain/AbstractPersistableCustom.java | 10 +- .../core/domain/JdbcSupport.java | 4 +- .../AbstractPlatformDomainRuleException.java | 3 +- ...ractPlatformResourceNotFoundException.java | 3 +- ...ctPlatformServiceUnavailableException.java | 3 +- .../GeneralPlatformDomainRuleException.java | 3 +- .../core/exception/InvalidJsonException.java | 4 +- .../core/exception/MultiException.java | 10 +- .../PlatformDataIntegrityException.java | 3 +- .../UnsupportedParameterException.java | 4 +- .../AccessDeniedExceptionMapper.java | 8 +- .../BadCredentialsExceptionMapper.java | 9 +- .../InvalidJsonExceptionMapper.java | 3 +- ...nvalidTenantIdentifierExceptionMapper.java | 8 +- .../JsonSyntaxExceptionMapper.java | 3 +- .../MalformedJsonExceptionMapper.java | 3 +- .../NoAuthorizationExceptionMapper.java | 8 +- ...tformApiDataValidationExceptionMapper.java | 8 +- .../PlatformDataIntegrityExceptionMapper.java | 8 +- .../PlatformDomainRuleExceptionMapper.java | 8 +- ...PlatformInternalServerExceptionMapper.java | 7 +- ...atformResourceNotFoundExceptionMapper.java | 9 +- ...formServiceUnavailableExceptionMapper.java | 9 +- .../UnAuthenticatedUserExceptionMapper.java | 4 +- ...UnrecognizedQueryParamExceptionMapper.java | 8 +- .../UnsupportedCommandExceptionMapper.java | 4 +- .../UnsupportedParameterExceptionMapper.java | 4 +- .../core/filters/ResponseCorsFilter.java | 4 +- .../AbstractFromApiJsonDeserializer.java | 3 +- .../AbstractFromCommandJsonDeserializer.java | 3 +- .../ApiRequestJsonSerializationSettings.java | 4 +- .../CommandSerializerDefaultToJson.java | 3 +- .../DefaultToApiJsonSerializer.java | 4 +- .../core/serialization/FromJsonHelper.java | 7 +- .../core/serialization/JsonParserHelper.java | 7 +- ...onedConnectionCleanupShutdownListener.java | 13 +- .../core/service/RoutingDataSource.java | 9 +- .../service/RoutingDataSourceService.java | 3 +- .../RoutingDataSourceServiceFactory.java | 3 +- .../core/service/SearchParameters.java | 6 +- .../service/TenantDatabaseUpgradeService.java | 6 +- .../TomcatJdbcDataSourcePerTenantService.java | 8 +- .../data/ResultsetColumnValueData.java | 3 +- .../domain/ReportParameterUsage.java | 19 +-- .../domain/ReportRepositoryWrapper.java | 5 +- .../DatatableEntryRequiredException.java | 3 +- ...tatableChecksWritePlatformServiceImpl.java | 3 +- .../service/GenericDataServiceImpl.java | 3 +- .../service/ReadReportingServiceImpl.java | 83 ++++------ .../ReadWriteNonCoreDataServiceImpl.java | 25 ++- .../ReportWritePlatformServiceImpl.java | 3 +- .../api/DocumentManagementApiResource.java | 13 +- .../api/ImagesApiResource.java | 8 +- .../ContentRepositoryUtils.java | 7 +- ...ityTypeForDocumentManagementException.java | 3 +- ...FineractEntityAccessRepositoryWrapper.java | 3 +- .../domain/FineractEntityRelation.java | 6 +- .../domain/FineractEntityToEntityMapping.java | 8 +- .../NotOfficeSpecificProductException.java | 3 +- .../FineractEntityAccessReadServiceImpl.java | 15 +- .../FineractEntityAccessWriteService.java | 8 +- .../FineractEntityAccessWriteServiceImpl.java | 10 +- .../infrastructure/gcm/GcmConstants.java | 24 ++- .../infrastructure/gcm/domain/Message.java | 3 +- .../gcm/domain/MulticastResult.java | 3 +- .../gcm/domain/Notification.java | 3 +- .../infrastructure/gcm/domain/Result.java | 12 +- .../infrastructure/gcm/domain/Sender.java | 46 +++--- .../jobs/annotation/CronMethodParser.java | 3 +- .../jobs/service/JobRegisterServiceImpl.java | 12 +- .../jobs/service/SchedulerJobListener.java | 5 +- .../jobs/service/SchedulerStopListener.java | 3 +- .../openjpa/OpenJpaDialect.java | 16 +- .../openjpa/OpenJpaVendorAdapter.java | 12 +- ...rtMailingJobEmailAttachmentFileFormat.java | 7 +- ...ilingJobStretchyReportParamDateOption.java | 16 +- .../data/ReportMailingJobTimelineData.java | 3 +- .../domain/ReportMailingJob.java | 3 +- .../domain/ReportMailingJobRepository.java | 3 +- .../ReportMailingJobRepositoryWrapper.java | 3 +- ...lingJobConfigurationNotFoundException.java | 3 +- .../ReportMailingJobNotFoundException.java | 3 +- ...MailingJobRunHistoryNotFoundException.java | 3 +- .../reportmailingjob/helper/IPv4Helper.java | 6 +- .../ReportMailingJobEmailServiceImpl.java | 3 +- .../ReportMailingJobReadPlatformService.java | 6 +- ...ilingJobRunHistoryReadPlatformService.java | 3 +- ...ortMailingJobWritePlatformServiceImpl.java | 3 +- .../util/ReportMailingJobDateUtil.java | 3 +- .../validation/ReportMailingJobValidator.java | 3 +- .../security/data/PlatformRequestLog.java | 3 +- .../InvalidTenantIdentiferException.java | 3 +- .../exception/NoAuthorizationException.java | 4 +- .../exception/ResetPasswordException.java | 4 +- ...InsecureTwoFactorAuthenticationFilter.java | 6 +- .../TenantAwareBasicAuthenticationFilter.java | 13 +- .../TenantAwareTenantIdentifierFilter.java | 11 +- .../filter/TwoFactorAuthenticationFilter.java | 18 +-- .../BasicAuthTenantDetailsServiceJdbc.java | 4 +- .../CustomAuthenticationFailureHandler.java | 18 +-- .../service/JdbcTenantDetailsService.java | 4 +- .../service/PlatformSecurityContext.java | 7 +- ...SpringSecurityPlatformSecurityContext.java | 3 +- ...antAwareJpaPlatformUserDetailsService.java | 3 +- .../security/utils/SQLBuilder.java | 37 ++--- .../data/SmsMessageApiQueueResourceData.java | 3 +- .../data/SmsMessageApiReportResourceData.java | 3 +- .../data/SmsMessageDeliveryReportData.java | 3 +- .../SmsMessageScheduledJobService.java | 3 +- .../SmsMessageScheduledJobServiceImpl.java | 6 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../service/WriteLikelihoodServiceImpl.java | 3 +- .../interoperation/util/MathUtil.java | 3 +- .../domain/HolidayRepositoryWrapper.java | 3 +- .../ApplicationCurrencyRepositoryWrapper.java | 13 +- .../exception/CurrencyInUseException.java | 3 +- ...ganizationalCurrencyNotFoundException.java | 3 +- .../office/api/OfficesApiResource.java | 3 +- .../domain/OfficeRepositoryWrapper.java | 3 +- ...OrganisationCurrencyRepositoryWrapper.java | 9 +- .../exception/InvalidOfficeException.java | 3 +- .../OfficeTransactionNotFoundException.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 7 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../staff/api/StaffApiResource.java | 3 +- .../staff/domain/StaffRepositoryWrapper.java | 3 +- .../service/StaffReadPlatformService.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../organisation/teller/data/CashierData.java | 24 +-- .../organisation/teller/data/TellerData.java | 6 +- .../teller/data/TellerTransactionData.java | 6 +- .../organisation/teller/domain/Cashier.java | 37 ++--- .../teller/domain/CashierRepository.java | 3 +- .../teller/domain/CashierTransaction.java | 3 +- .../organisation/teller/domain/Teller.java | 7 +- .../teller/domain/TellerRepository.java | 3 +- .../domain/TellerTransactionRepository.java | 3 +- .../AllocateCashToCashierCommandHandler.java | 3 +- ...AllocateCashierToTellerCommandHandler.java | 3 +- .../handler/CreateTellerCommandHandler.java | 3 +- ...DeleteCashierAllocationCommandHandler.java | 3 +- .../handler/DeleteTellerCommandHandler.java | 3 +- .../handler/ModifyCashierCommandHandler.java | 3 +- .../SettleCashFromCashierCommandHandler.java | 3 +- ...UpdateCashierAllocationCommandHandler.java | 3 +- .../handler/UpdateTellerCommandHandler.java | 3 +- .../service/TellerWritePlatformService.java | 4 +- .../TellerWritePlatformServiceJpaImpl.java | 12 +- .../data/AdjustedDateDetailsDTO.java | 4 +- .../domain/WorkingDaysRepositoryWrapper.java | 3 +- .../api/AccountTransfersApiConstants.java | 5 +- .../AccountTransferStandingInstruction.java | 3 +- ...ntAssociationsReadPlatformServiceImpl.java | 13 +- ...rtfolioAccountReadPlatformServiceImpl.java | 4 +- ...ingInstructionReadPlatformServiceImpl.java | 20 +-- .../data/AccountSummaryCollectionData.java | 3 +- .../portfolio/address/domain/Address.java | 4 +- .../portfolio/calendar/domain/Calendar.java | 21 ++- .../domain/CalendarFrequencyType.java | 6 +- .../domain/CalendarInstanceRepository.java | 3 +- .../CalendarInstanceRepositoryWrapper.java | 10 +- .../domain/CalendarRepositoryWrapper.java | 9 +- .../CalendarInstanceNotFoundException.java | 3 +- .../CalendarReadPlatformServiceImpl.java | 19 +-- .../calendar/service/CalendarUtils.java | 35 ++--- ...WritePlatformServiceJpaRepositoryImpl.java | 27 ++-- .../portfolio/charge/domain/Charge.java | 11 +- .../domain/ChargeRepositoryWrapper.java | 9 +- ...tDisbursementCannotBePenaltyException.java | 4 +- .../ChargeMustBePenaltyException.java | 4 +- .../LoanChargeCannotBeAddedException.java | 3 +- .../LoanChargeNotFoundException.java | 3 +- ...nChargeWithoutMandatoryFieldException.java | 3 +- ...SavingsAccountChargeNotFoundException.java | 3 +- ...tChargeWithoutMandatoryFieldException.java | 3 +- ...tChargeWithoutMandatoryFieldException.java | 3 +- .../service/ChargeReadPlatformService.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../client/api/ClientApiConstants.java | 5 +- .../data/ClientApiCollectionConstants.java | 5 +- .../client/data/ClientDataValidator.java | 18 +-- .../client/data/ClientTimelineData.java | 3 +- .../client/domain/AccountNumberGenerator.java | 5 +- .../ClientNonPersonRepositoryWrapper.java | 3 +- .../domain/ClientRepositoryWrapper.java | 3 +- .../client/domain/ClientTransaction.java | 3 +- .../ClientIdentifierNotFoundException.java | 3 +- ...tNonPersonNotFoundByClientIdException.java | 3 +- .../ClientNonPersonNotFoundException.java | 3 +- .../DuplicateClientIdentifierException.java | 3 +- .../InvalidClientSavingProductException.java | 4 +- ...InvalidClientStateTransitionException.java | 4 +- .../UpdateClientAddressCommandHandler.java | 5 +- ...ntifierCommandFromApiJsonDeserializer.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 9 +- ...FamilyMembersWritePlatformServiceImpl.java | 6 +- ...WritePlatformServiceJpaRepositoryImpl.java | 17 +-- .../collateral/domain/LoanCollateral.java | 17 +-- ...lateralCommandFromApiJsonDeserializer.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 9 +- .../data/IndividualClientData.java | 3 +- ...IndividualCollectionSheetLoanFlatData.java | 3 +- .../collectionsheet/data/JLGClientData.java | 10 +- .../data/JLGCollectionSheetFlatData.java | 3 +- .../collectionsheet/data/JLGGroupData.java | 3 +- .../collectionsheet/data/LoanDueData.java | 3 +- .../collectionsheet/data/SavingsDueData.java | 3 +- ...sbursalCommandFromApiJsonDeserializer.java | 3 +- ...paymentCommandFromApiJsonDeserializer.java | 3 +- ...ollectionSheetReadPlatformServiceImpl.java | 5 +- .../common/domain/DaysInMonthType.java | 3 +- .../common/domain/DaysInYearType.java | 3 +- .../common/service/BusinessEventListner.java | 5 +- .../service/BusinessEventNotifierService.java | 15 +- .../BusinessEventNotifierServiceImpl.java | 30 ++-- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../group/api/GroupingTypesApiConstants.java | 5 +- .../group/data/GroupGeneralData.java | 3 +- .../group/data/GroupTimelineData.java | 3 +- .../portfolio/group/domain/Group.java | 3 +- .../group/domain/GroupRepositoryWrapper.java | 3 +- .../exception/InvalidGroupLevelException.java | 4 +- ...WritePlatformServiceJpaRepositoryImpl.java | 35 ++--- .../InterestRateChartRepositoryWrapper.java | 10 +- ...nterestRateChartSlabRepositoryWrapper.java | 10 +- .../domain/InterestIncentives.java | 6 +- .../domain/InterestRateChart.java | 3 +- .../service/InterestRateChartAssembler.java | 3 +- .../InterestRateChartSlabAssembler.java | 3 +- .../loanaccount/api/LoansApiResource.java | 7 +- .../command/UpdateLoanOfficerCommand.java | 3 +- .../loanaccount/data/LoanAccountData.java | 18 +-- .../data/LoanApplicationTimelineData.java | 3 +- .../loanaccount/data/LoanChargeData.java | 3 +- .../data/LoanTransactionEnumData.java | 4 +- .../domain/ChangedTransactionDetail.java | 3 +- .../portfolio/loanaccount/domain/Loan.java | 132 +++++++--------- .../domain/LoanAccountDomainService.java | 5 +- .../domain/LoanAccountDomainServiceJpa.java | 34 ++--- .../loanaccount/domain/LoanCharge.java | 20 +-- .../LoanInterestRecalculationDetails.java | 3 +- ...oanRepaymentScheduleProcessingWrapper.java | 3 +- .../domain/LoanRepositoryWrapper.java | 3 +- .../loanaccount/domain/LoanSummary.java | 3 +- .../domain/LoanSummaryWrapper.java | 3 +- .../domain/LoanTermVariationsComparator.java | 4 +- .../loanaccount/domain/LoanTransaction.java | 15 +- .../domain/LoanTransactionComparator.java | 8 +- .../domain/LoanTransactionType.java | 12 +- ...RepaymentScheduleTransactionProcessor.java | 49 +++--- ...RepaymentScheduleTransactionProcessor.java | 3 +- ...RepaymentScheduleTransactionProcessor.java | 20 +-- ...RepaymentScheduleTransactionProcessor.java | 11 +- ...RepaymentScheduleTransactionProcessor.java | 16 +- ...RepaymentScheduleTransactionProcessor.java | 14 +- ...RepaymentScheduleTransactionProcessor.java | 11 +- ...RepaymentScheduleTransactionProcessor.java | 11 +- ...RepaymentScheduleTransactionProcessor.java | 17 +-- .../exception/DateMismatchException.java | 4 +- .../InvalidLoanStateTransitionException.java | 4 +- .../InvalidLoanTransactionTypeException.java | 4 +- .../exception/InvalidLoanTypeException.java | 4 +- .../InvalidPaidInAdvanceAmountException.java | 4 +- ...ndPendingApprovalStateCannotBeDeleted.java | 3 +- ...dPendingApprovalStateCannotBeModified.java | 3 +- .../LoanTemplateTypeRequiredException.java | 3 +- ...onProcessingStrategyNotFoundException.java | 3 +- ...alAndFirstRepaymentViolationException.java | 5 +- ...NotSupportedLoanTemplateTypeException.java | 3 +- .../exception/InvalidGuarantorException.java | 3 +- ...arantorCommandFromApiJsonDeserializer.java | 3 +- .../service/GuarantorDomainServiceImpl.java | 37 ++--- .../service/GuarantorReadPlatformService.java | 3 +- .../loanschedule/data/LoanScheduleData.java | 12 +- .../data/LoanSchedulePeriodData.java | 10 +- .../domain/AbstractLoanScheduleGenerator.java | 33 ++-- ...gBalanceInterestLoanScheduleGenerator.java | 19 +-- .../domain/DefaultScheduledDateGenerator.java | 15 +- .../domain/FinanicalFunctions.java | 14 +- .../FlatInterestLoanScheduleGenerator.java | 10 +- .../domain/LoanApplicationTerms.java | 48 +++--- .../LoanScheduleModelDisbursementPeriod.java | 3 +- .../LoanScheduleModelRepaymentPeriod.java | 3 +- .../service/LoanScheduleAssembler.java | 24 ++- ...cheduleCalculationPlatformServiceImpl.java | 3 +- .../api/RescheduleLoansApiResource.java | 16 +- .../LoanRescheduleRequestTimelineData.java | 3 +- .../domain/LoanRescheduleRequest.java | 8 +- ...oanRescheduleRequestNotFoundException.java | 3 +- ...nRescheduleRequestReadPlatformService.java | 5 +- ...heduleRequestWritePlatformServiceImpl.java | 22 +-- ...anApplicationCommandFromApiJsonHelper.java | 5 +- ...WritePlatformServiceJpaRepositoryImpl.java | 13 +- .../service/LoanReadPlatformService.java | 9 +- .../service/LoanReadPlatformServiceImpl.java | 16 +- ...WritePlatformServiceJpaRepositoryImpl.java | 27 ++-- ...nterestRecalculationCompoundingMethod.java | 3 +- .../InterestRecalculationPeriodMethod.java | 3 +- .../loanproduct/domain/LendingStrategy.java | 10 +- .../loanproduct/domain/LoanProduct.java | 7 +- .../domain/LoanProductMinMaxConstraints.java | 3 +- ...MinimumRepaymentScheduleRelatedDetail.java | 3 +- .../domain/LoanProductRelatedDetail.java | 4 +- .../domain/LoanRescheduleStrategyMethod.java | 3 +- .../exception/InvalidCurrencyException.java | 3 +- .../exception/InvalidLendingStrategy.java | 3 +- .../exception/NotInMinMaxRangeException.java | 3 +- .../ProductMixNotFoundException.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 4 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../domain/MeetingRepositoryWrapper.java | 9 +- .../MeetingNotSupportedResourceException.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 17 +-- .../portfolio/note/data/NoteData.java | 3 +- .../portfolio/rate/domain/RateRepository.java | 3 +- .../rate/service/RateWriteServiceImpl.java | 3 +- .../savings/DepositAccountOnClosureType.java | 4 +- .../DepositAccountOnHoldTransactionType.java | 3 +- .../portfolio/savings/DepositAccountType.java | 3 +- .../SavingsAccountTransactionType.java | 3 +- .../SavingsCompoundingInterestPeriodType.java | 3 +- ...ingsInterestCalculationDaysInYearType.java | 3 +- .../SavingsInterestCalculationType.java | 6 +- .../SavingsPostingInterestPeriodType.java | 4 +- ...DepositAccountTransactionsApiResource.java | 6 +- .../api/SavingsAccountsApiResource.java | 14 +- .../savings/api/SavingsApiSetConstants.java | 10 +- .../savings/data/DepositAccountData.java | 3 +- .../data/DepositAccountDataValidator.java | 27 ++-- .../savings/data/DepositProductData.java | 4 +- .../data/DepositProductDataValidator.java | 10 +- .../savings/data/FixedDepositProductData.java | 5 +- .../data/RecurringDepositProductData.java | 5 +- ...SavingsAccountApplicationTimelineData.java | 3 +- .../savings/data/SavingsAccountConstant.java | 10 +- .../SavingsAccountTransactionEnumData.java | 3 +- .../savings/data/SavingsProductData.java | 4 +- .../data/SavingsProductDataValidator.java | 39 ++--- .../domain/DepositAccountAssembler.java | 5 +- .../DepositAccountDomainServiceJpa.java | 18 +-- .../domain/DepositPreClosureDetail.java | 5 +- .../domain/DepositProductAmountDetails.java | 3 +- .../domain/DepositRecurringDetail.java | 5 +- .../savings/domain/DepositTermDetail.java | 3 +- .../savings/domain/FixedDepositAccount.java | 10 +- .../domain/RecurringDepositAccount.java | 33 ++-- .../savings/domain/SavingsAccount.java | 51 +++---- .../domain/SavingsAccountAssembler.java | 10 +- .../savings/domain/SavingsAccountCharge.java | 11 +- ...SavingsAccountChargeRepositoryWrapper.java | 3 +- .../SavingsAccountRepositoryWrapper.java | 9 +- .../savings/domain/SavingsAccountSummary.java | 3 +- .../domain/SavingsAccountTransaction.java | 8 +- .../SavingsAccountTransactionComparator.java | 3 +- ...vingsAccountTransactionSummaryWrapper.java | 4 +- .../savings/domain/SavingsProduct.java | 12 +- .../interest/CompoundInterestHelper.java | 7 +- .../domain/interest/EndOfDayBalance.java | 10 +- .../domain/interest/PostingPeriod.java | 7 +- ...AccountTransactionNotAllowedException.java | 3 +- .../InsufficientAccountBalanceException.java | 3 +- ...ctivityPriorToClientTransferException.java | 4 +- ...erTransactionsCannotBeUndoneException.java | 4 +- ...erestRateChartReadPlatformServiceImpl.java | 17 +-- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- ...positsDropdownReadPlatformServiceImpl.java | 18 +-- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- ...SavingsAccountReadPlatformServiceImpl.java | 73 ++++----- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../TaxMappingNotFoundException.java | 3 +- .../TransferNotSupportedException.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 60 ++++---- .../template/service/TrustModifier.java | 3 +- .../api/UsersApiResource.java | 3 +- .../useradministration/domain/AppUser.java | 3 +- ...issionCantBeMakerCheckerableException.java | 3 +- .../UnAuthenticatedUserException.java | 4 +- ...issionsCommandFromApiJsonDeserializer.java | 3 +- ...WritePlatformServiceJpaRepositoryImpl.java | 7 +- .../PermissionReadPlatformServiceImpl.java | 5 +- ...WritePlatformServiceJpaRepositoryImpl.java | 3 +- .../apache/fineract/batch/BatchBuilder.java | 3 +- .../fineract/common/RestAssuredFixture.java | 7 +- .../org/apache/fineract/common/Utils.java | 8 +- ...ClasspathHellDuplicatesCheckExtension.java | 12 +- .../spring/SpringConfigurationTest.java | 23 ++- ...WithoutDatabaseAndNoJobsConfiguration.java | 15 +- ...ymentScheduleTransactionProcessorTest.java | 3 +- ...ymentScheduleTransactionProcessorTest.java | 10 +- .../LoanProductRelatedDetailTestHelper.java | 5 +- .../LoanScheduleTestDataHelper.java | 16 +- .../loanaccount/LoanTransactionBuilder.java | 3 +- 541 files changed, 1995 insertions(+), 3177 deletions(-) mode change 100755 => 100644 fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavingsFactory.java mode change 100755 => 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformServiceUnavailableExceptionMapper.java mode change 100755 => 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSourceServiceFactory.java mode change 100755 => 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerStopListener.java mode change 100755 => 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientSavingProductException.java mode change 100755 => 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventListner.java mode change 100755 => 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventNotifierService.java mode change 100755 => 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestIncentives.java mode change 100755 => 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ChangedTransactionDetail.java diff --git a/config/fineractdev-formatter.xml b/config/fineractdev-formatter.xml index 0a412cb1e..05b6ad355 100644 --- a/config/fineractdev-formatter.xml +++ b/config/fineractdev-formatter.xml @@ -79,7 +79,7 @@ - + diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/AccountNumberPreferencesTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/AccountNumberPreferencesTest.java index 3fa7566e6..8c1ca0a66 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/AccountNumberPreferencesTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/AccountNumberPreferencesTest.java @@ -112,8 +112,7 @@ public class AccountNumberPreferencesTest { this.deleteAllAccountNumberPreferences(); /* - * Validate the default account number generation rules for clients, - * loans and savings accounts. + * Validate the default account number generation rules for clients, loans and savings accounts. */ this.validateDefaultAccountNumberGeneration(); @@ -121,8 +120,7 @@ public class AccountNumberPreferencesTest { this.createAccountNumberPreference(); /* - * Validate account number preference rules apply to Clients,Loans and - * Saving Accounts + * Validate account number preference rules apply to Clients,Loans and Saving Accounts */ this.validateAccountNumberGenerationWithPreferences(); @@ -130,8 +128,7 @@ public class AccountNumberPreferencesTest { this.updateAccountNumberPreference(); /* - * Validate account number preference rules apply to Clients,Loans and - * Saving Accounts after Updation + * Validate account number preference rules apply to Clients,Loans and Saving Accounts after Updation */ this.validateAccountNumberGenerationWithPreferences(); diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/BatchApiTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/BatchApiTest.java index fbbeca996..e0f45b871 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/BatchApiTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/BatchApiTest.java @@ -41,10 +41,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; /** - * Test class for - * {@link org.apache.fineract.batch.command.CommandStrategyProvider}. This tests - * the response provided by commandStrategy by injecting it with a - * {@code BatchRequest}. + * Test class for {@link org.apache.fineract.batch.command.CommandStrategyProvider}. This tests the response provided by + * commandStrategy by injecting it with a {@code BatchRequest}. * * @author RishabhShukla * @@ -57,9 +55,8 @@ public class BatchApiTest { private RequestSpecification requestSpec; /** - * Sets up the essential settings for the TEST like contentType, - * expectedStatusCode. It uses the '@BeforeEach' annotation provided by - * jUnit. + * Sets up the essential settings for the TEST like contentType, expectedStatusCode. It uses the '@BeforeEach' + * annotation provided by jUnit. */ @BeforeEach public void setup() { @@ -70,9 +67,8 @@ public class BatchApiTest { } /** - * Tests for the unimplemented command Strategies by returning 501 status - * code. For a unknownRequest a statusCode 501 is returned back with - * response. + * Tests for the unimplemented command Strategies by returning 501 status code. For a unknownRequest a statusCode + * 501 is returned back with response. * * @see org.apache.fineract.batch.command.internal.UnknownCommandStrategy */ @@ -93,9 +89,8 @@ public class BatchApiTest { } /** - * Tests for the successful response for a createClient request from - * createClientCommand. A successful response with statusCode '200' is - * returned back. + * Tests for the successful response for a createClient request from createClientCommand. A successful response with + * statusCode '200' is returned back. * * @see org.apache.fineract.batch.command.internal.CreateClientCommandStrategy */ @@ -113,10 +108,9 @@ public class BatchApiTest { } /** - * Tests for an erroneous response with statusCode '501' if transaction - * fails. If Query Parameter 'enclosingTransaction' is set to 'true' and if - * one of the request in BatchRequest fails then all transactions are rolled - * back. + * Tests for an erroneous response with statusCode '501' if transaction fails. If Query Parameter + * 'enclosingTransaction' is set to 'true' and if one of the request in BatchRequest fails then all transactions are + * rolled back. * * @see org.apache.fineract.batch.command.internal.CreateClientCommandStrategy * @see org.apache.fineract.batch.api.BatchApiResource @@ -156,9 +150,8 @@ public class BatchApiTest { } /** - * Tests that a client information was successfully updated through - * updateClientCommand. A 'changes' parameter is returned in the response - * after successful update of client information. + * Tests that a client information was successfully updated through updateClientCommand. A 'changes' parameter is + * returned in the response after successful update of client information. * * @see org.apache.fineract.batch.command.internal.UpdateClientCommandStrategy */ @@ -190,10 +183,8 @@ public class BatchApiTest { } /** - * Tests that a ApplyLoanCommand was successfully executed and returned a - * 200(OK) status. It creates a new client and apply a loan to that client. - * This also verifies the successful resolution of dependencies among two - * requests. + * Tests that a ApplyLoanCommand was successfully executed and returned a 200(OK) status. It creates a new client + * and apply a loan to that client. This also verifies the successful resolution of dependencies among two requests. * * @see org.apache.fineract.batch.command.internal.ApplyLoanCommandStrategy */ @@ -240,9 +231,8 @@ public class BatchApiTest { } /** - * Tests that a new savings accounts was applied to an existing client and a - * 200(OK) status was returned. It first creates a new client and a savings - * product, then uses the cliendId and ProductId to apply a savings account. + * Tests that a new savings accounts was applied to an existing client and a 200(OK) status was returned. It first + * creates a new client and a savings product, then uses the cliendId and ProductId to apply a savings account. * * @see org.apache.fineract.batch.command.internal.ApplySavingsCommandStrategy */ @@ -282,10 +272,9 @@ public class BatchApiTest { } /** - * Tests that a new charge was added to a newly created loan and charges are - * Collected properly 200(OK) status was returned for successful responses. - * It first creates a new client and apply a loan, then creates a new charge - * for the create loan and then fetches all the applied charges + * Tests that a new charge was added to a newly created loan and charges are Collected properly 200(OK) status was + * returned for successful responses. It first creates a new client and apply a loan, then creates a new charge for + * the create loan and then fetches all the applied charges * * @see org.apache.fineract.batch.command.internal.CollectChargesCommandStrategy * @see org.apache.fineract.batch.command.internal.CreateChargeCommandStrategy @@ -334,10 +323,9 @@ public class BatchApiTest { } /** - * Tests that batch repayment for loans is happening properly. Collected - * properly 200(OK) status was returned for successful responses. It first - * creates a new loan and then makes two repayments for it and then verifies - * that 200(OK) is returned for the repayment requests. + * Tests that batch repayment for loans is happening properly. Collected properly 200(OK) status was returned for + * successful responses. It first creates a new loan and then makes two repayments for it and then verifies that + * 200(OK) is returned for the repayment requests. * * @see org.apache.fineract.batch.command.internal.RepayLoanCommandStrategy */ @@ -398,9 +386,8 @@ public class BatchApiTest { } /** - * Test for the successful activation of a pending client using - * 'ActivateClientCommandStrategy'. A '200' status code is expected on - * successful activation. + * Test for the successful activation of a pending client using 'ActivateClientCommandStrategy'. A '200' status code + * is expected on successful activation. * * @see org.apache.fineract.batch.command.internal.ActivateClientCommandStrategy */ @@ -428,9 +415,8 @@ public class BatchApiTest { } /** - * Test for the successful approval and disbursal of a loan using - * 'ApproveLoanCommandStrategy' and 'DisburseLoanCommandStrategy'. A '200' - * status code is expected on successful activation. + * Test for the successful approval and disbursal of a loan using 'ApproveLoanCommandStrategy' and + * 'DisburseLoanCommandStrategy'. A '200' status code is expected on successful activation. * * @see org.apache.fineract.batch.command.internal.ApproveLoanCommandStrategy * @see org.apache.fineract.batch.command.internal.DisburseLoanCommandStrategy @@ -483,9 +469,8 @@ public class BatchApiTest { } /** - * Test for the successful create client, apply loan,approval and disbursal - * of a loan using Batch API with enclosingTransaction. A '200' status code - * is expected on successful activation. + * Test for the successful create client, apply loan,approval and disbursal of a loan using Batch API with + * enclosingTransaction. A '200' status code is expected on successful activation. * * @see org.apache.fineract.batch.command.internal.ApproveLoanCommandStrategy * @see org.apache.fineract.batch.command.internal.DisburseLoanCommandStrategy diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/BatchRequestsIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/BatchRequestsIntegrationTest.java index 9a9b137f0..6891640dd 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/BatchRequestsIntegrationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/BatchRequestsIntegrationTest.java @@ -40,9 +40,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Test class for testing the integration of Batch API with custom batch - * requests and various user defined workflow. Like in the case of mifos - * community-app + * Test class for testing the integration of Batch API with custom batch requests and various user defined workflow. + * Like in the case of mifos community-app * * @author Rishabh Shukla */ @@ -57,9 +56,8 @@ public class BatchRequestsIntegrationTest { } /** - * Sets up the essential settings for the TEST like contentType, - * expectedStatusCode. It uses the '@BeforeEach' annotation provided by - * jUnit. + * Sets up the essential settings for the TEST like contentType, expectedStatusCode. It uses the '@BeforeEach' + * annotation provided by jUnit. */ @BeforeEach public void setup() { @@ -72,12 +70,10 @@ public class BatchRequestsIntegrationTest { @Test /** - * Tests that a loan is successfully applied to client members of a group. - * Firstly, it'll create a few new clients and then will add those clients - * to the group. Then a few loans will be created and one of those loans - * will be chosen at random and similarily a few of the created clients will - * be chosen on random. Now, the selected loan will be applied to these - * clients through Batch - API ApplyLoanCommandStrategy. + * Tests that a loan is successfully applied to client members of a group. Firstly, it'll create a few new clients + * and then will add those clients to the group. Then a few loans will be created and one of those loans will be + * chosen at random and similarily a few of the created clients will be chosen on random. Now, the selected loan + * will be applied to these clients through Batch - API ApplyLoanCommandStrategy. */ public void shouldReturnOkStatusForLoansAppliedToSelectedClients() { diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java index aa8c7ed1c..aeb528065 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java @@ -62,9 +62,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Client Loan Integration Test for checking Loan Application Repayments - * Schedule, loan charges, penalties, loan repayments and verifying accounting - * transactions + * Client Loan Integration Test for checking Loan Application Repayments Schedule, loan charges, penalties, loan + * repayments and verifying accounting transactions */ @SuppressWarnings({ "rawtypes", "unchecked" }) public class ClientLoanIntegrationTest { @@ -1249,8 +1248,7 @@ public class ClientLoanIntegrationTest { } /*** - * Test case for checking CashBasedAccounting functionality adding charges - * with calculation type flat + * Test case for checking CashBasedAccounting functionality adding charges with calculation type flat */ @Test public void loanWithFlatCahargesAndCashBasedAccountingEnabled() { @@ -1426,8 +1424,8 @@ public class ClientLoanIntegrationTest { } /*** - * Test case for checking CashBasedAccounting functionality adding charges - * with calculation type percentage of amount + * Test case for checking CashBasedAccounting functionality adding charges with calculation type percentage of + * amount */ @Test public void loanWithCahargesOfTypeAmountPercentageAndCashBasedAccountingEnabled() { @@ -1606,8 +1604,8 @@ public class ClientLoanIntegrationTest { } /*** - * Test case for checking CashBasedAccounting functionality adding charges - * with calculation type percentage of amount plus interest + * Test case for checking CashBasedAccounting functionality adding charges with calculation type percentage of + * amount plus interest */ @Test public void loanWithCahargesOfTypeAmountPlusInterestPercentageAndCashBasedAccountingEnabled() { @@ -1787,8 +1785,7 @@ public class ClientLoanIntegrationTest { } /*** - * Test case for checking AccuralUpfrontAccounting functionality adding - * charges with calculation type flat + * Test case for checking AccuralUpfrontAccounting functionality adding charges with calculation type flat */ @Test public void loanWithFlatCahargesAndUpfrontAccrualAccountingEnabled() { @@ -1981,8 +1978,8 @@ public class ClientLoanIntegrationTest { } /*** - * Test case for checking AccuralUpfrontAccounting functionality adding - * charges with calculation type percentage of amount + * Test case for checking AccuralUpfrontAccounting functionality adding charges with calculation type percentage of + * amount */ @Test public void loanWithCahargesAndUpfrontAccrualAccountingEnabled() { @@ -2171,8 +2168,8 @@ public class ClientLoanIntegrationTest { } /*** - * Test case for checking AccuralUpfrontAccounting functionality adding - * charges with calculation type percentage of amount plus interest + * Test case for checking AccuralUpfrontAccounting functionality adding charges with calculation type percentage of + * amount plus interest */ @Test public void loanWithCahargesOfTypeAmountPlusInterestPercentageAndUpfrontAccrualAccountingEnabled() { @@ -2368,8 +2365,7 @@ public class ClientLoanIntegrationTest { } /*** - * Test case for checking AccuralPeriodicAccounting functionality adding - * charges with calculation type flat + * Test case for checking AccuralPeriodicAccounting functionality adding charges with calculation type flat */ @Test public void loanWithFlatChargesAndPeriodicAccrualAccountingEnabled() throws InterruptedException { @@ -2467,14 +2463,10 @@ public class ClientLoanIntegrationTest { validateCharge(flatInstallmentFee, loanCharges, "50", "100.00", "50.0", "50.0"); /* - * this.journalEntryHelper.checkJournalEntryForAssetAccount( - * assetAccount, "20 September 2011", new - * JournalEntry(Float.valueOf("50.0"), - * JournalEntry.TransactionType.CREDIT)); - * this.journalEntryHelper.checkJournalEntryForExpenseAccount - * (expenseAccount, "20 September 2011", new - * JournalEntry(Float.valueOf("50.0"), - * JournalEntry.TransactionType.DEBIT)); + * this.journalEntryHelper.checkJournalEntryForAssetAccount( assetAccount, "20 September 2011", new + * JournalEntry(Float.valueOf("50.0"), JournalEntry.TransactionType.CREDIT)); + * this.journalEntryHelper.checkJournalEntryForExpenseAccount (expenseAccount, "20 September 2011", new + * JournalEntry(Float.valueOf("50.0"), JournalEntry.TransactionType.DEBIT)); */ final String jobName = "Add Accrual Transactions"; @@ -2561,8 +2553,8 @@ public class ClientLoanIntegrationTest { } /** - * Test case for checking AccuralPeriodicAccounting functionality adding - * charges with calculation type percentage of amount + * Test case for checking AccuralPeriodicAccounting functionality adding charges with calculation type percentage of + * amount */ @Test public void loanWithChargesOfTypeAmountPercentageAndPeriodicAccrualAccountingEnabled() throws InterruptedException { @@ -2663,14 +2655,10 @@ public class ClientLoanIntegrationTest { validateCharge(percentageInstallmentFee, loanCharges, "1", "61.19", "29.11", "29.70"); /* - * this.journalEntryHelper.checkJournalEntryForAssetAccount( - * assetAccount, "20 September 2011", new - * JournalEntry(Float.valueOf("29.7"), - * JournalEntry.TransactionType.CREDIT)); - * this.journalEntryHelper.checkJournalEntryForExpenseAccount - * (expenseAccount, "20 September 2011", new - * JournalEntry(Float.valueOf("29.7"), - * JournalEntry.TransactionType.DEBIT)); + * this.journalEntryHelper.checkJournalEntryForAssetAccount( assetAccount, "20 September 2011", new + * JournalEntry(Float.valueOf("29.7"), JournalEntry.TransactionType.CREDIT)); + * this.journalEntryHelper.checkJournalEntryForExpenseAccount (expenseAccount, "20 September 2011", new + * JournalEntry(Float.valueOf("29.7"), JournalEntry.TransactionType.DEBIT)); */ final String jobName = "Add Accrual Transactions"; @@ -2758,8 +2746,8 @@ public class ClientLoanIntegrationTest { } /*** - * Test case for checking AccuralPeriodicAccounting functionality adding - * charges with calculation type percentage of amount and interest + * Test case for checking AccuralPeriodicAccounting functionality adding charges with calculation type percentage of + * amount and interest */ @Test public void loanWithChargesOfTypeAmountPlusInterestPercentageAndPeriodicAccrualAccountingEnabled() throws InterruptedException { @@ -2861,13 +2849,10 @@ public class ClientLoanIntegrationTest { validateCharge(amountPlusInterestPercentageInstallmentFee, loanCharges, "1", "63.02", "31.51", "31.51"); /* - * this.journalEntryHelper.checkJournalEntryForAssetAccount( - * assetAccount, "20 September 2011", new JournalEntry( - * Float.valueOf("31.51"), JournalEntry.TransactionType.CREDIT)); - * this.journalEntryHelper.checkJournalEntryForExpenseAccount - * (expenseAccount, "20 September 2011", new - * JournalEntry(Float.valueOf("31.51"), - * JournalEntry.TransactionType.DEBIT)); + * this.journalEntryHelper.checkJournalEntryForAssetAccount( assetAccount, "20 September 2011", new + * JournalEntry( Float.valueOf("31.51"), JournalEntry.TransactionType.CREDIT)); + * this.journalEntryHelper.checkJournalEntryForExpenseAccount (expenseAccount, "20 September 2011", new + * JournalEntry(Float.valueOf("31.51"), JournalEntry.TransactionType.DEBIT)); */ final String jobName = "Add Accrual Transactions"; @@ -3032,8 +3017,7 @@ public class ClientLoanIntegrationTest { validateNumberForEqual("0.00", String.valueOf(firstInstallment.get("totalOutstandingForPeriod"))); /*** - * Verify 2nd and 3rd repayments dues before making excess payment for - * installment no 2 + * Verify 2nd and 3rd repayments dues before making excess payment for installment no 2 */ HashMap secondInstallment = loanSchedule.get(2); HashMap thirdInstallment = loanSchedule.get(3); @@ -3051,18 +3035,15 @@ public class ClientLoanIntegrationTest { loanSchedule.clear(); loanSchedule = this.loanTransactionHelper.getLoanRepaymentSchedule(this.requestSpec, this.responseSpec, loanID); /*** - * Verify 2nd and 3rd repayments after making excess payment for - * installment no 2 + * Verify 2nd and 3rd repayments after making excess payment for installment no 2 */ secondInstallment = loanSchedule.get(2); validateNumberForEqual("0.00", String.valueOf(secondInstallment.get("totalOutstandingForPeriod"))); /*** - * According to RBI Excess payment should go to principal portion of - * next installment, but as interest recalculation is not implemented, - * it wont make any difference to schedule even though if we made excess - * payment, so excess payments will behave the same as regular payment - * with the excess amount + * According to RBI Excess payment should go to principal portion of next installment, but as interest + * recalculation is not implemented, it wont make any difference to schedule even though if we made excess + * payment, so excess payments will behave the same as regular payment with the excess amount */ thirdInstallment = loanSchedule.get(3); validateNumberForEqual("3200", String.valueOf(thirdInstallment.get("totalOutstandingForPeriod"))); @@ -3072,16 +3053,14 @@ public class ClientLoanIntegrationTest { validateNumberForEqual("100.00", String.valueOf(thirdInstallment.get("interestOutstanding"))); /*** - * Make payment with due amount of 3rd installment on 4th installment - * date + * Make payment with due amount of 3rd installment on 4th installment date */ this.loanTransactionHelper.makeRepayment("20 January 2012", Float.valueOf("3200"), loanID); loanSchedule.clear(); loanSchedule = this.loanTransactionHelper.getLoanRepaymentSchedule(this.requestSpec, this.responseSpec, loanID); /*** - * Verify overdue interests are deducted first and then remaining amount - * for interest portion of due installment + * Verify overdue interests are deducted first and then remaining amount for interest portion of due installment */ thirdInstallment = loanSchedule.get(3); HashMap fourthInstallment = loanSchedule.get(4); @@ -4948,8 +4927,8 @@ public class ClientLoanIntegrationTest { .withMoratorium("2", "3").withLoanProductConfiguration(loanProductConfigurationAsFalse).build(null)); LOG.info("-------------------LOAN PRODUCT CREATED WITH ATTRIBUTE CONFIGURATION AS FALSE---------------------- {}", loanProductID); /* - * Try to override attribute values in loan account when attribute - * configurations are set to false at product level + * Try to override attribute values in loan account when attribute configurations are set to false at product + * level */ loanID = applyForLoanApplicationWithProductConfigurationAsFalse(clientID, loanProductID, proposedAmount); LOG.info("--------------------------LOAN CREATED WITH ID------------------------- {}", loanID); diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientSavingsIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientSavingsIntegrationTest.java index db31fdfa3..93d074edc 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientSavingsIntegrationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientSavingsIntegrationTest.java @@ -656,9 +656,8 @@ public class ClientSavingsIntegrationTest { } /*** - * Test case for overdraft account functionality. Open account with zero - * balance, perform transactions then post interest and verify posted - * interest + * Test case for overdraft account functionality. Open account with zero balance, perform transactions then post + * interest and verify posted interest */ @SuppressWarnings("unchecked") @Test @@ -675,8 +674,7 @@ public class ClientSavingsIntegrationTest { final String minBalanceForInterestCalculation = null; /*** - * Create savings product with zero opening balance and overdraft - * enabled + * Create savings product with zero opening balance and overdraft enabled */ final String zeroOpeningBalance = "0.0"; final String minRequiredBalance = null; @@ -734,9 +732,8 @@ public class ClientSavingsIntegrationTest { Float balance = Float.valueOf(zeroOpeningBalance); /*** - * Perform withdraw transaction, verify account balance(account balance - * will go to negative as no deposits are there prior to this - * transaction) + * Perform withdraw transaction, verify account balance(account balance will go to negative as no deposits are + * there prior to this transaction) */ Integer withdrawTransactionId = (Integer) this.savingsAccountHelper.withdrawalFromSavingsAccount(savingsId, WITHDRAW_AMOUNT, ACTIVATION_DATE, CommonConstants.RESPONSE_RESOURCE_ID); @@ -746,8 +743,7 @@ public class ClientSavingsIntegrationTest { assertEquals(balance, withdrawTransaction.get("runningBalance"), "Verifying Balance after Withdrawal"); /*** - * Perform Deposit transaction on last day of month and verify account - * balance. + * Perform Deposit transaction on last day of month and verify account balance. * * @param transactionDate * this value is every time last day of previous month @@ -768,9 +764,8 @@ public class ClientSavingsIntegrationTest { Float actualInterestPosted = Float.valueOf(summary.get("totalInterestPosted").toString()); /*** - * Calculate expected interest to be posted, interest should be posted - * for one day only because deposit transaction happened on last day of - * month before this account balance is negative. + * Calculate expected interest to be posted, interest should be posted for one day only because deposit + * transaction happened on last day of month before this account balance is negative. */ final Float nominalAnnualInterest = Float.valueOf(accountDetails.get("nominalAnnualInterestRate").toString()); final HashMap interestCalculationDaysInYearType = (HashMap) accountDetails.get("interestCalculationDaysInYearType"); @@ -781,8 +776,7 @@ public class ClientSavingsIntegrationTest { Float interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ DecimalFormat decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -812,8 +806,7 @@ public class ClientSavingsIntegrationTest { final String minBalanceForInterestCalculation = null; /*** - * Create savings product with zero opening balance and overdraft - * enabled + * Create savings product with zero opening balance and overdraft enabled */ final String zeroOpeningBalance = "0.0"; final String minRequiredBalance = null; @@ -876,8 +869,7 @@ public class ClientSavingsIntegrationTest { String TRANSACTION_DATE = dateFormat.format(transactionDate.getTime()); /*** - * Perform Deposit transaction on last day of month and verify account - * balance. + * Perform Deposit transaction on last day of month and verify account balance. * * @param transactionDate * this value is every time last day of previous month @@ -890,9 +882,8 @@ public class ClientSavingsIntegrationTest { assertEquals(balance, depositTransaction.get("runningBalance"), "Verifying Balance after Deposit"); /*** - * Calculate expected interest to be posted, interest should be posted - * for one day only because deposit transaction happened on last day of - * month before this account balance is negative. + * Calculate expected interest to be posted, interest should be posted for one day only because deposit + * transaction happened on last day of month before this account balance is negative. */ this.savingsAccountHelper.postInterestForSavings(savingsId); HashMap accountDetails = this.savingsAccountHelper.getSavingsDetails(savingsId); @@ -908,8 +899,7 @@ public class ClientSavingsIntegrationTest { Float interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ DecimalFormat decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -931,8 +921,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -958,8 +947,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -989,8 +977,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 19); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1020,8 +1007,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 8); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1047,8 +1033,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1072,8 +1057,7 @@ public class ClientSavingsIntegrationTest { final String minBalanceForInterestCalculation = null; /*** - * Create savings product with zero opening balance and overdraft - * enabled + * Create savings product with zero opening balance and overdraft enabled */ final String zeroOpeningBalance = "0.0"; final String minRequiredBalance = null; @@ -1136,9 +1120,8 @@ public class ClientSavingsIntegrationTest { String TRANSACTION_DATE = dateFormat.format(transactionDate.getTime()); /*** - * Perform withdraw transaction, verify account balance(account balance - * will go to negative as no deposits are there prior to this - * transaction) + * Perform withdraw transaction, verify account balance(account balance will go to negative as no deposits are + * there prior to this transaction) */ Integer withdrawTransactionId = (Integer) this.savingsAccountHelper.withdrawalFromSavingsAccount(savingsId, WITHDRAW_AMOUNT, ACTIVATION_DATE, CommonConstants.RESPONSE_RESOURCE_ID); @@ -1148,8 +1131,7 @@ public class ClientSavingsIntegrationTest { assertEquals(balance, withdrawTransaction.get("runningBalance"), "Verifying Balance after Withdrawal"); /*** - * Perform Deposit transaction on last day of month and verify account - * balance. + * Perform Deposit transaction on last day of month and verify account balance. * * @param transactionDate * this value is every time last day of previous month @@ -1162,9 +1144,8 @@ public class ClientSavingsIntegrationTest { assertEquals(balance, depositTransaction.get("runningBalance"), "Verifying Balance after Deposit"); /*** - * Calculate expected interest to be posted, interest should be posted - * for one day only because deposit transaction happened on last day of - * month before this account balance is negative. + * Calculate expected interest to be posted, interest should be posted for one day only because deposit + * transaction happened on last day of month before this account balance is negative. */ this.savingsAccountHelper.postInterestForSavings(savingsId); HashMap accountDetails = this.savingsAccountHelper.getSavingsDetails(savingsId); @@ -1180,8 +1161,7 @@ public class ClientSavingsIntegrationTest { Float interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ DecimalFormat decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1203,8 +1183,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1230,8 +1209,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1261,8 +1239,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 19); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1292,8 +1269,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 8); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1319,8 +1295,7 @@ public class ClientSavingsIntegrationTest { interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1344,8 +1319,7 @@ public class ClientSavingsIntegrationTest { final String minBalanceForInterestCalculation = null; /*** - * Create savings product with zero opening balance and overdraft - * enabled + * Create savings product with zero opening balance and overdraft enabled */ final String zeroOpeningBalance = "0.0"; final String minRequiredBalance = null; @@ -1408,9 +1382,8 @@ public class ClientSavingsIntegrationTest { Float balance = Float.valueOf(zeroOpeningBalance); /*** - * Perform withdraw transaction, verify account balance(account balance - * will go to negative as no deposits are there prior to this - * transaction) + * Perform withdraw transaction, verify account balance(account balance will go to negative as no deposits are + * there prior to this transaction) */ Integer withdrawTransactionId = (Integer) this.savingsAccountHelper.withdrawalFromSavingsAccount(savingsId, WITHDRAW_AMOUNT, ACTIVATION_DATE, CommonConstants.RESPONSE_RESOURCE_ID); @@ -1420,8 +1393,7 @@ public class ClientSavingsIntegrationTest { assertEquals(balance, withdrawTransaction.get("runningBalance"), "Verifying Balance after Withdrawal"); /*** - * Perform Deposit transaction on last day of month and verify account - * balance. + * Perform Deposit transaction on last day of month and verify account balance. * * @param transactionDate * this value is every time last day of previous month @@ -1442,9 +1414,8 @@ public class ClientSavingsIntegrationTest { Float actualInterestPosted = Float.valueOf(summary.get("totalInterestPosted").toString()); /*** - * Calculate expected interest to be posted, interest should be posted - * for one day only because deposit transaction happened on last day of - * month before this account balance is negative. + * Calculate expected interest to be posted, interest should be posted for one day only because deposit + * transaction happened on last day of month before this account balance is negative. */ this.savingsAccountHelper.postInterestAsOnSavings(savingsId, POSTED_TRANSACTION_DATE); HashMap accountDetailsPostInterest = this.savingsAccountHelper.getSavingsDetails(savingsId); @@ -1453,9 +1424,8 @@ public class ClientSavingsIntegrationTest { Float accountDetailsPostInterestPosted = Float.valueOf(summary.get("totalInterestPosted").toString()); /*** - * Calculate expected interest to be posted, interest should be posted - * for one day only because deposit transaction happened on last day of - * month before this account balance is negative. + * Calculate expected interest to be posted, interest should be posted for one day only because deposit + * transaction happened on last day of month before this account balance is negative. */ final Float nominalAnnualInterest = Float.valueOf(accountDetails.get("nominalAnnualInterestRate").toString()); final HashMap interestCalculationDaysInYearType = (HashMap) accountDetails.get("interestCalculationDaysInYearType"); @@ -1466,8 +1436,7 @@ public class ClientSavingsIntegrationTest { Float interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ DecimalFormat decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1518,8 +1487,7 @@ public class ClientSavingsIntegrationTest { final String minBalanceForInterestCalculation = null; /*** - * Create savings product with zero opening balance and overdraft - * enabled + * Create savings product with zero opening balance and overdraft enabled */ final String zeroOpeningBalance = "0.0"; final String minRequiredBalance = null; @@ -1587,9 +1555,8 @@ public class ClientSavingsIntegrationTest { Float balance = Float.valueOf(zeroOpeningBalance); /*** - * Perform withdraw transaction, verify account balance(account balance - * will go to negative as no deposits are there prior to this - * transaction) + * Perform withdraw transaction, verify account balance(account balance will go to negative as no deposits are + * there prior to this transaction) */ Integer withdrawTransactionId = (Integer) this.savingsAccountHelper.withdrawalFromSavingsAccount(savingsId, WITHDRAW_AMOUNT, ACTIVATION_DATE, CommonConstants.RESPONSE_RESOURCE_ID); @@ -1599,8 +1566,7 @@ public class ClientSavingsIntegrationTest { assertEquals(balance, withdrawTransaction.get("runningBalance"), "Verifying Balance after Withdrawal"); /*** - * Perform Deposit transaction on last day of month and verify account - * balance. + * Perform Deposit transaction on last day of month and verify account balance. * * @param transactionDate * this value is every time last day of previous month @@ -1621,9 +1587,8 @@ public class ClientSavingsIntegrationTest { Float actualInterestPosted = Float.valueOf(summary.get("totalInterestPosted").toString()); /*** - * Calculate expected interest to be posted, interest should be posted - * for one day only because deposit transaction happened on last day of - * month before this account balance is negative. + * Calculate expected interest to be posted, interest should be posted for one day only because deposit + * transaction happened on last day of month before this account balance is negative. */ final Float nominalAnnualInterest = Float.valueOf(accountDetails.get("nominalAnnualInterestRate").toString()); final HashMap interestCalculationDaysInYearType = (HashMap) accountDetails.get("interestCalculationDaysInYearType"); @@ -1634,8 +1599,7 @@ public class ClientSavingsIntegrationTest { Float interestPosted = (float) (interestPerDay * balance * 1); /*** - * Apply rounding on interestPosted, actualInterestPosted and verify - * both are same + * Apply rounding on interestPosted, actualInterestPosted and verify both are same */ DecimalFormat decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US)); decimalFormat.applyPattern("#.###"); @@ -1957,13 +1921,10 @@ public class ClientSavingsIntegrationTest { } /* - * private void verifySavingsInterest(final Object savingsInterest) { - * LOG.info( - * "--------------------VERIFYING THE BALANCE, INTEREST --------------------------" - * ); + * private void verifySavingsInterest(final Object savingsInterest) { LOG.info( + * "--------------------VERIFYING THE BALANCE, INTEREST --------------------------" ); * - * assertEquals("Verifying Interest Calculation", Float.valueOf("238.3399"), - * savingsInterest); } + * assertEquals("Verifying Interest Calculation", Float.valueOf("238.3399"), savingsInterest); } */ @SuppressWarnings("unchecked") @@ -2082,8 +2043,8 @@ public class ClientSavingsIntegrationTest { } /** - * incorrect savings account balance when charge transaction is reversed - * during an overdraft recalculate Daily Balances + * incorrect savings account balance when charge transaction is reversed during an overdraft recalculate Daily + * Balances */ @Test diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/DisbursalAndRepaymentScheduleTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/DisbursalAndRepaymentScheduleTest.java index a9bac38ee..fd4462421 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/DisbursalAndRepaymentScheduleTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/DisbursalAndRepaymentScheduleTest.java @@ -46,8 +46,7 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** - * Tests loan schedule change based on group meeting changes and loan - * rescheduling + * Tests loan schedule change based on group meeting changes and loan rescheduling **/ @SuppressWarnings({ "rawtypes" }) @Disabled diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FinancialActivityAccountsTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FinancialActivityAccountsTest.java index 453601f80..87ca0e088 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FinancialActivityAccountsTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FinancialActivityAccountsTest.java @@ -83,15 +83,13 @@ public class FinancialActivityAccountsTest { Assertions.assertNotNull(financialActivityAccountId); /*** - * Fetch Created Financial Activity to Account Mapping and validate - * created values + * Fetch Created Financial Activity to Account Mapping and validate created values **/ assertFinancialActivityAccountCreation(financialActivityAccountId, LIABILITY_TRANSFER_FINANCIAL_ACTIVITY_ID, liabilityTransferAccount); /** - * Update Existing Financial Activity to Account Mapping and assert - * changes + * Update Existing Financial Activity to Account Mapping and assert changes **/ Account newLiabilityTransferAccount = accountHelper.createLiabilityAccount(); Assertions.assertNotNull(newLiabilityTransferAccount); @@ -120,8 +118,7 @@ public class FinancialActivityAccountsTest { duplicateFinancialActivityAccountError.get(0).get(CommonConstants.RESPONSE_ERROR_MESSAGE_CODE)); /** - * Associating incorrect GL account types with a financial activity - * should fail + * Associating incorrect GL account types with a financial activity should fail **/ List invalidFinancialActivityAccountError = (List) financialActivityAccountHelper.updateFinancialActivityAccount( financialActivityAccountId, assetTransferFinancialActivityId, newLiabilityTransferAccount.getAccountID(), diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java index 25f125be2..7fc0aaf84 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java @@ -121,8 +121,8 @@ public class FixedDepositTest { } /*** - * Test case for Fixed Deposit Account premature closure with transaction - * type withdrawal and Cash Based accounting enabled + * Test case for Fixed Deposit Account premature closure with transaction type withdrawal and Cash Based accounting + * enabled */ @Test public void testFixedDepositAccountWithPrematureClosureTypeWithdrawal() { @@ -202,8 +202,7 @@ public class FixedDepositTest { Float depositAmount = (Float) accountSummary.get("totalDeposits"); /*** - * Verify journal entries posted for initial deposit transaction which - * happened at activation time + * Verify journal entries posted for initial deposit transaction which happened at activation time */ final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.DEBIT) }; final JournalEntry[] liablilityAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.CREDIT) }; @@ -336,8 +335,7 @@ public class FixedDepositTest { Float depositAmount = (Float) accountSummary.get("totalDeposits"); /*** - * Verify journal entries posted for initial deposit transaction which - * happened at activation time + * Verify journal entries posted for initial deposit transaction which happened at activation time */ final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.DEBIT) }; final JournalEntry[] liablilityAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.CREDIT) }; @@ -479,8 +477,7 @@ public class FixedDepositTest { Float depositAmount = (Float) accountSummary.get("totalDeposits"); /*** - * Verify journal entries posted for initial deposit transaction which - * happened at activation time + * Verify journal entries posted for initial deposit transaction which happened at activation time */ final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.DEBIT) }; final JournalEntry[] liablilityAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.CREDIT) }; @@ -686,8 +683,8 @@ public class FixedDepositTest { } /*** - * Test case for FD Account premature closure with transaction transfers to - * savings account and Cash Based accounting enabled + * Test case for FD Account premature closure with transaction transfers to savings account and Cash Based + * accounting enabled */ @Test public void testFixedDepositAccountWithPrematureClosureTypeTransferToSavings() { @@ -777,8 +774,7 @@ public class FixedDepositTest { Float depositAmount = (Float) accountSummary.get("totalDeposits"); /*** - * Verify journal entries posted for initial deposit transaction which - * happened at activation time + * Verify journal entries posted for initial deposit transaction which happened at activation time */ final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.DEBIT) }; final JournalEntry[] liablilityAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.CREDIT) }; @@ -834,9 +830,8 @@ public class FixedDepositTest { Float prematurityAmount = (Float) fixedDepositData.get("maturityAmount"); /*** - * Verify journal entry transactions for preclosure transaction As this - * transaction is an account transfer you should get financial account - * mapping details and verify amounts + * Verify journal entry transactions for preclosure transaction As this transaction is an account transfer you + * should get financial account mapping details and verify amounts */ this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityAccount, CLOSED_ON_DATE, new JournalEntry(prematurityAmount, JournalEntry.TransactionType.CREDIT), @@ -855,8 +850,8 @@ public class FixedDepositTest { } /*** - * Test case for Fixed Deposit Account premature closure with transaction - * type ReInvest and Cash Based accounting enabled + * Test case for Fixed Deposit Account premature closure with transaction type ReInvest and Cash Based accounting + * enabled */ @Test public void testFixedDepositAccountWithPrematureClosureTypeReinvest() { @@ -930,8 +925,7 @@ public class FixedDepositTest { Float depositAmount = (Float) accountSummary.get("totalDeposits"); /*** - * Verify journal entries posted for initial deposit transaction which - * happened at activation time + * Verify journal entries posted for initial deposit transaction which happened at activation time */ final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.DEBIT) }; final JournalEntry[] liablilityAccountInitialEntry = { new JournalEntry(depositAmount, JournalEntry.TransactionType.CREDIT) }; @@ -2376,8 +2370,8 @@ public class FixedDepositTest { } /*** - * Test case for Fixed Deposit Account rollover with maturity instruction as - * re invest maturity amount(principal+interest) + * Test case for Fixed Deposit Account rollover with maturity instruction as re invest maturity + * amount(principal+interest) */ @Test public void testFixedDepositAccountWithRolloverMaturityAmount() { @@ -2457,8 +2451,7 @@ public class FixedDepositTest { } /*** - * Test case for Fixed Deposit Account rollover with maturity instruction as - * re invest principal only + * Test case for Fixed Deposit Account rollover with maturity instruction as re invest principal only */ @Test public void testFixedDepositAccountWithRolloverPrincipal() { @@ -2648,8 +2641,7 @@ public class FixedDepositTest { List financialActivities = this.financialActivityAccountHelper.getAllFinancialActivityAccounts(this.responseSpec); final Account financialAccount; /*** - * if no financial activities are defined for account transfers, create - * liability financial accounting mappings + * if no financial activities are defined for account transfers, create liability financial accounting mappings */ if (financialActivities.isEmpty()) { financialAccount = createLiabilityFinancialAccountTransferType(LIABILITY_TRANSFER_FINANCIAL_ACTIVITY_ID); diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FlexibleSavingsInterestPostingIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FlexibleSavingsInterestPostingIntegrationTest.java index 9401d7377..7ca4884d4 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FlexibleSavingsInterestPostingIntegrationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FlexibleSavingsInterestPostingIntegrationTest.java @@ -78,8 +78,7 @@ public class FlexibleSavingsInterestPostingIntegrationTest { this.savingsAccountHelper.depositToSavingsAccount(savingsId, "1000", startDate, CommonConstants.RESPONSE_RESOURCE_ID); /*** - * Perform Post interest transaction and verify the posted transaction - * date + * Perform Post interest transaction and verify the posted transaction date */ this.savingsAccountHelper.postInterestForSavings(savingsId); HashMap accountDetails = this.savingsAccountHelper.getSavingsDetails(savingsId); diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GlobalConfigurationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GlobalConfigurationTest.java index 0d9058d53..51d6a15de 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GlobalConfigurationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GlobalConfigurationTest.java @@ -160,8 +160,7 @@ public class GlobalConfigurationTest { Assertions.assertNotNull(configId); /* - * Update force-password-reset-days with value as 0 and Enable - * as true - failure case + * Update force-password-reset-days with value as 0 and Enable as true - failure case */ ArrayList error = (ArrayList) GlobalConfigurationHelper.updatePasswordResetDaysForGlobalConfiguration(this.requestSpec, this.httpStatusForidden, configId, newValue, newBooleanValue, CommonConstants.RESPONSE_ERROR); @@ -172,8 +171,7 @@ public class GlobalConfigurationTest { "Force Password Reset days value must be greater than zero."); /* - * Update force-password-reset-days with value as 50 and Enable - * as true - success case + * Update force-password-reset-days with value as 50 and Enable as true - success case */ final HashMap updateSuccess = (HashMap) GlobalConfigurationHelper.updatePasswordResetDaysForGlobalConfiguration( this.requestSpec, this.responseSpec, configId, "50", newBooleanValue, "changes"); @@ -185,8 +183,7 @@ public class GlobalConfigurationTest { Assertions.assertNotNull(updateSuccess1); /* - * Update without sending value and Enable as true - failure - * case + * Update without sending value and Enable as true - failure case */ ArrayList failure = (ArrayList) GlobalConfigurationHelper.updatePasswordResetDaysForGlobalConfiguration(this.requestSpec, this.httpStatusForidden, configId, null, newBooleanValue, CommonConstants.RESPONSE_ERROR); diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GroupTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GroupTest.java index 9320ae039..7d7392ab1 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GroupTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/GroupTest.java @@ -41,8 +41,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Group Test for checking Group: Creation, Activation, Client Association, - * Updating & Deletion + * Group Test for checking Group: Creation, Activation, Client Association, Updating & Deletion */ public class GroupTest { diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/HookIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/HookIntegrationTest.java index 3729c464e..36cc3b2aa 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/HookIntegrationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/HookIntegrationTest.java @@ -70,8 +70,8 @@ public class HookIntegrationTest { try { /** - * sleep for a three seconds after each failure to increase the - * likelihood of the previous request for creating office completing + * sleep for a three seconds after each failure to increase the likelihood of the previous request for + * creating office completing **/ for (int i = 0; i < 6; i++) { diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanApplicationApprovalTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanApplicationApprovalTest.java index 8d3ee936c..8cb924c27 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanApplicationApprovalTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanApplicationApprovalTest.java @@ -87,8 +87,7 @@ public class LoanApplicationApprovalTest { } /* - * Negative test case: Approved amount non zero is greater than proposed - * amount + * Negative test case: Approved amount non zero is greater than proposed amount */ @Test public void loanApplicationApprovedAmountGreaterThanProposedAmount() { @@ -236,10 +235,8 @@ public class LoanApplicationApprovalTest { /* If tranches are not specified for a multi-disburse loan */ /** - * error = - * this.loanTransactionHelper.approveLoanForTranches(approveDate, - * expectedDisbursementDate, approvalAmount5, loanID, approveTranche5, - * CommonConstants.RESPONSE_ERROR); + * error = this.loanTransactionHelper.approveLoanForTranches(approveDate, expectedDisbursementDate, + * approvalAmount5, loanID, approveTranche5, CommonConstants.RESPONSE_ERROR); * assertEquals("error.msg.disbursementData.required", * error.get(0).get(CommonConstants.RESPONSE_ERROR_MESSAGE_CODE)); **/ diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanDisbursementDetailsIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanDisbursementDetailsIntegrationTest.java index dc98baa98..0a8381594 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanDisbursementDetailsIntegrationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanDisbursementDetailsIntegrationTest.java @@ -232,113 +232,79 @@ public class LoanDisbursementDetailsIntegrationTest { /* Uncomment and modify test builder values once MIFOSX-2006 is closed. */ /* - * private void validateRepaymentScheduleWithoutEMI(ArrayList - * periods){ LoanDisbursementTestBuilder expectedRepaymentSchedule0 = new - * LoanDisbursementTestBuilder( "[2015, 6, 1]", 0.0f, 0.0f, null, null, - * 5000.0f, null, null, null); + * private void validateRepaymentScheduleWithoutEMI(ArrayList periods){ LoanDisbursementTestBuilder + * expectedRepaymentSchedule0 = new LoanDisbursementTestBuilder( "[2015, 6, 1]", 0.0f, 0.0f, null, null, 5000.0f, + * null, null, null); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule1 = new - * LoanDisbursementTestBuilder( "[2015, 7, 1]", 800.0f, 800.0f, 50.0f, - * 750.0f, 4250.0f, 750.0f, 750.0f, "[2015, 6, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule1 = new LoanDisbursementTestBuilder( "[2015, 7, 1]", 800.0f, + * 800.0f, 50.0f, 750.0f, 4250.0f, 750.0f, 750.0f, "[2015, 6, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule2 = new - * LoanDisbursementTestBuilder( "[2015, 8, 1]", 800.0f, 800.0f, 42.5f, - * 757.5f, 3492.5f, 757.5f, 757.5f, "[2015, 7, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule2 = new LoanDisbursementTestBuilder( "[2015, 8, 1]", 800.0f, + * 800.0f, 42.5f, 757.5f, 3492.5f, 757.5f, 757.5f, "[2015, 7, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule3 = new - * LoanDisbursementTestBuilder( "[2015, 9, 1]", 0.0f, 0.0f, null, null, - * 5000.0f, null, null, null); + * LoanDisbursementTestBuilder expectedRepaymentSchedule3 = new LoanDisbursementTestBuilder( "[2015, 9, 1]", 0.0f, + * 0.0f, null, null, 5000.0f, null, null, null); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule4 = new - * LoanDisbursementTestBuilder( "[2015, 9, 1]", 800.0f, 800.0f, 34.92f, - * 765.08f, 7727.42f, 765.08f, 765.08f, "[2015, 8, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule4 = new LoanDisbursementTestBuilder( "[2015, 9, 1]", 800.0f, + * 800.0f, 34.92f, 765.08f, 7727.42f, 765.08f, 765.08f, "[2015, 8, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule5 = new - * LoanDisbursementTestBuilder( "[2015, 10, 1]", 800.0f, 800.0f, 77.27f, - * 722.73f, 7004.69f, 722.73f, 722.73f, "[2015, 9, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule5 = new LoanDisbursementTestBuilder( "[2015, 10, 1]", + * 800.0f, 800.0f, 77.27f, 722.73f, 7004.69f, 722.73f, 722.73f, "[2015, 9, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule6 = new - * LoanDisbursementTestBuilder( "[2015, 11, 1]", 800.0f, 800.0f, 70.05f, - * 729.95f, 6274.74f, 729.95f, 729.95f, "[2015, 10, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule6 = new LoanDisbursementTestBuilder( "[2015, 11, 1]", + * 800.0f, 800.0f, 70.05f, 729.95f, 6274.74f, 729.95f, 729.95f, "[2015, 10, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule7 = new - * LoanDisbursementTestBuilder( "[2015, 12, 1]", 800.0f, 800.0f, 62.75f, - * 737.25f, 5537.49f, 737.25f, 737.25f, "[2015, 11, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule7 = new LoanDisbursementTestBuilder( "[2015, 12, 1]", + * 800.0f, 800.0f, 62.75f, 737.25f, 5537.49f, 737.25f, 737.25f, "[2015, 11, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule8 = new - * LoanDisbursementTestBuilder( "[2016, 1, 1]", 800.0f, 800.0f, 55.37f, - * 744.63f, 4792.86f, 744.63f, 744.63f, "[2015, 12, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule8 = new LoanDisbursementTestBuilder( "[2016, 1, 1]", 800.0f, + * 800.0f, 55.37f, 744.63f, 4792.86f, 744.63f, 744.63f, "[2015, 12, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule9 = new - * LoanDisbursementTestBuilder( "[2016, 2, 1]", 800.0f, 800.0f, 47.93f, - * 752.07f, 4040.79f, 752.07f, 752.07f, "[2016, 1, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule9 = new LoanDisbursementTestBuilder( "[2016, 2, 1]", 800.0f, + * 800.0f, 47.93f, 752.07f, 4040.79f, 752.07f, 752.07f, "[2016, 1, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule10 = new - * LoanDisbursementTestBuilder( "[2016, 3, 1]", 800.0f, 800.0f, 40.41f, - * 759.59f, 3281.2f, 759.59f, 759.59f, "[2016, 2, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule10 = new LoanDisbursementTestBuilder( "[2016, 3, 1]", + * 800.0f, 800.0f, 40.41f, 759.59f, 3281.2f, 759.59f, 759.59f, "[2016, 2, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule11 = new - * LoanDisbursementTestBuilder( "[2016, 4, 1]", 800.0f, 800.0f, 32.81f, - * 767.19f, 2514.01f, 767.19f, 767.19f, "[2016, 3, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule11 = new LoanDisbursementTestBuilder( "[2016, 4, 1]", + * 800.0f, 800.0f, 32.81f, 767.19f, 2514.01f, 767.19f, 767.19f, "[2016, 3, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule12 = new - * LoanDisbursementTestBuilder( "[2016, 5, 1]", 800.0f, 800.0f, 25.14f, - * 774.86f, 1739.15f, 774.86f, 774.86f, "[2016, 4, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule12 = new LoanDisbursementTestBuilder( "[2016, 5, 1]", + * 800.0f, 800.0f, 25.14f, 774.86f, 1739.15f, 774.86f, 774.86f, "[2016, 4, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule13 = new - * LoanDisbursementTestBuilder( "[2016, 6, 1]", 800.0f, 800.0f, 17.39f, - * 782.61f, 956.54f, 782.61f, 782.61f, "[2016, 5, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule13 = new LoanDisbursementTestBuilder( "[2016, 6, 1]", + * 800.0f, 800.0f, 17.39f, 782.61f, 956.54f, 782.61f, 782.61f, "[2016, 5, 1]"); * - * LoanDisbursementTestBuilder expectedRepaymentSchedule14 = new - * LoanDisbursementTestBuilder( "[2016, 7, 1]", 966.11f, 966.11f, 9.57f, - * 956.54f, 0.0f, 956.54f, 956.54f, "[2016, 6, 1]"); + * LoanDisbursementTestBuilder expectedRepaymentSchedule14 = new LoanDisbursementTestBuilder( "[2016, 7, 1]", + * 966.11f, 966.11f, 9.57f, 956.54f, 0.0f, 956.54f, 956.54f, "[2016, 6, 1]"); * - * ArrayList list = new - * ArrayList(); - * list.add(expectedRepaymentSchedule0); - * list.add(expectedRepaymentSchedule1); - * list.add(expectedRepaymentSchedule2); - * list.add(expectedRepaymentSchedule3); - * list.add(expectedRepaymentSchedule4); - * list.add(expectedRepaymentSchedule5); - * list.add(expectedRepaymentSchedule6); - * list.add(expectedRepaymentSchedule7); - * list.add(expectedRepaymentSchedule8); - * list.add(expectedRepaymentSchedule9); - * list.add(expectedRepaymentSchedule10); - * list.add(expectedRepaymentSchedule11); - * list.add(expectedRepaymentSchedule12); - * list.add(expectedRepaymentSchedule13); - * list.add(expectedRepaymentSchedule14); + * ArrayList list = new ArrayList(); + * list.add(expectedRepaymentSchedule0); list.add(expectedRepaymentSchedule1); list.add(expectedRepaymentSchedule2); + * list.add(expectedRepaymentSchedule3); list.add(expectedRepaymentSchedule4); list.add(expectedRepaymentSchedule5); + * list.add(expectedRepaymentSchedule6); list.add(expectedRepaymentSchedule7); list.add(expectedRepaymentSchedule8); + * list.add(expectedRepaymentSchedule9); list.add(expectedRepaymentSchedule10); + * list.add(expectedRepaymentSchedule11); list.add(expectedRepaymentSchedule12); + * list.add(expectedRepaymentSchedule13); list.add(expectedRepaymentSchedule14); * - * for (int i = 0; i < list.size(); i++) { - * this.assertRepaymentScheduleValuesWithoutEMI(periods.get(i), list.get(i), + * for (int i = 0; i < list.size(); i++) { this.assertRepaymentScheduleValuesWithoutEMI(periods.get(i), list.get(i), * i); } } * - * private void assertRepaymentScheduleValuesWithoutEMI(HashMap period, - * LoanDisbursementTestBuilder expectedRepaymentSchedule, int position) { + * private void assertRepaymentScheduleValuesWithoutEMI(HashMap period, LoanDisbursementTestBuilder + * expectedRepaymentSchedule, int position) { * - * assertEquals(period.get("dueDate").toString(), - * expectedRepaymentSchedule.getDueDate()); + * assertEquals(period.get("dueDate").toString(), expectedRepaymentSchedule.getDueDate()); * assertEquals(period.get("principalLoanBalanceOutstanding"), * expectedRepaymentSchedule.getPrincipalLoanBalanceOutstanding()); - * assertEquals(period.get("totalOriginalDueForPeriod"), - * expectedRepaymentSchedule.getTotalOriginalDueForPeriod()); - * assertEquals(period.get("totalOutstandingForPeriod"), - * expectedRepaymentSchedule.getTotalOutstandingForPeriod()); + * assertEquals(period.get("totalOriginalDueForPeriod"), expectedRepaymentSchedule.getTotalOriginalDueForPeriod()); + * assertEquals(period.get("totalOutstandingForPeriod"), expectedRepaymentSchedule.getTotalOutstandingForPeriod()); * * if (position != 0 && position != 3) { * - * assertEquals(period.get("interestOutstanding"), - * expectedRepaymentSchedule.getInterestOutstanding()); - * assertEquals(period.get("principalOutstanding"), - * expectedRepaymentSchedule.getPrincipalOutstanding()); - * assertEquals(period.get("principalDue"), - * expectedRepaymentSchedule.getPrincipalDue()); - * assertEquals(period.get("principalOriginalDue"), - * expectedRepaymentSchedule.getPrincipalOriginalDue()); - * assertEquals(period.get("fromDate").toString(), - * expectedRepaymentSchedule.getFromDate()); } } + * assertEquals(period.get("interestOutstanding"), expectedRepaymentSchedule.getInterestOutstanding()); + * assertEquals(period.get("principalOutstanding"), expectedRepaymentSchedule.getPrincipalOutstanding()); + * assertEquals(period.get("principalDue"), expectedRepaymentSchedule.getPrincipalDue()); + * assertEquals(period.get("principalOriginalDue"), expectedRepaymentSchedule.getPrincipalOriginalDue()); + * assertEquals(period.get("fromDate").toString(), expectedRepaymentSchedule.getFromDate()); } } */ private Integer applyForLoanApplicationWithEmiAmount(final Integer clientID, final Integer loanProductID, final String proposedAmount, List tranches, final String installmentAmount) { diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanWithWaiveInterestAndWriteOffIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanWithWaiveInterestAndWriteOffIntegrationTest.java index 53ce86a4f..3570e89b0 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanWithWaiveInterestAndWriteOffIntegrationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanWithWaiveInterestAndWriteOffIntegrationTest.java @@ -37,8 +37,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Client Loan Integration Test for checking Loan Disbursement with Waive - * Interest and Write-Off. + * Client Loan Integration Test for checking Loan Disbursement with Waive Interest and Write-Off. */ @SuppressWarnings({ "rawtypes" }) public class LoanWithWaiveInterestAndWriteOffIntegrationTest { diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/MinimumDaysBetweenDisbursalAndFirstRepaymentTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/MinimumDaysBetweenDisbursalAndFirstRepaymentTest.java index 3de38288f..7acd7cfc0 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/MinimumDaysBetweenDisbursalAndFirstRepaymentTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/MinimumDaysBetweenDisbursalAndFirstRepaymentTest.java @@ -66,9 +66,8 @@ public class MinimumDaysBetweenDisbursalAndFirstRepaymentTest { } /* - * MinimumDaysBetweenDisbursalAndFirstRepayment is set to 7 days and days - * between disbursal date and first repayment is set as 7. system should - * allow to create this loan and allow to disburse + * MinimumDaysBetweenDisbursalAndFirstRepayment is set to 7 days and days between disbursal date and first repayment + * is set as 7. system should allow to create this loan and allow to disburse */ @Test public void createLoanEntity_WITH_DAY_BETWEEN_DISB_DATE_AND_REPAY_START_DATE_GREATER_THAN_MIN_DAY_CRITERIA() { @@ -112,9 +111,8 @@ public class MinimumDaysBetweenDisbursalAndFirstRepaymentTest { } /* - * MinimumDaysBetweenDisbursalAndFirstRepayment is set to 7 days and days - * between disbursal date and first repayment is set as 7. system should - * allow to create this loan and allow to disburse + * MinimumDaysBetweenDisbursalAndFirstRepayment is set to 7 days and days between disbursal date and first repayment + * is set as 7. system should allow to create this loan and allow to disburse */ @SuppressWarnings("unchecked") @Test diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java index 45f72622a..7474bf90f 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java @@ -122,8 +122,8 @@ public class RecurringDepositTest { } /*** - * Test case for Recurring Deposit Account premature closure with - * transaction type withdrawal and Cash Based accounting enabled + * Test case for Recurring Deposit Account premature closure with transaction type withdrawal and Cash Based + * accounting enabled */ @Test public void testRecurringDepositAccountWithPrematureClosureTypeWithdrawal() { @@ -208,8 +208,7 @@ public class RecurringDepositTest { Float depositAmount = (Float) recurringDepositAccountData.get("mandatoryRecommendedDepositAmount"); /*** - * Perform Deposit transaction and verify journal entries are posted for - * the transaction + * Perform Deposit transaction and verify journal entries are posted for the transaction */ Integer depositTransactionId = this.recurringDepositAccountHelper.depositToRecurringDepositAccount(recurringDepositAccountId, depositAmount, EXPECTED_FIRST_DEPOSIT_ON_DATE); @@ -272,9 +271,8 @@ public class RecurringDepositTest { } /*** - * Test case for Recurring Deposit Account premature closure with - * transaction transfers to savings account and Cash Based accounting - * enabled + * Test case for Recurring Deposit Account premature closure with transaction transfers to savings account and Cash + * Based accounting enabled */ @Test public void testRecurringDepositAccountWithPrematureClosureTypeTransferToSavings() { @@ -388,8 +386,7 @@ public class RecurringDepositTest { Float depositAmount = (Float) recurringDepositAccountData.get("mandatoryRecommendedDepositAmount"); /*** - * Perform Deposit transaction and verify journal entries are posted for - * the transaction + * Perform Deposit transaction and verify journal entries are posted for the transaction */ Integer depositTransactionId = this.recurringDepositAccountHelper.depositToRecurringDepositAccount(recurringDepositAccountId, depositAmount, EXPECTED_FIRST_DEPOSIT_ON_DATE); @@ -451,9 +448,8 @@ public class RecurringDepositTest { recurringDepositAccountId); Float maturityAmount = Float.valueOf(recurringDepositAccountData.get("maturityAmount").toString()); /*** - * Verify journal entry transactions for preclosure transaction As this - * transaction is an account transfer you should get financial account - * mapping details and verify amounts + * Verify journal entry transactions for preclosure transaction As this transaction is an account transfer you + * should get financial account mapping details and verify amounts */ this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityAccount, CLOSED_ON_DATE, new JournalEntry(maturityAmount, JournalEntry.TransactionType.CREDIT), @@ -592,8 +588,7 @@ public class RecurringDepositTest { Float depositAmount = (Float) recurringDepositAccountData.get("mandatoryRecommendedDepositAmount"); /*** - * Perform Deposit transaction and verify journal entries are posted for - * the transaction + * Perform Deposit transaction and verify journal entries are posted for the transaction */ Integer depositTransactionId = this.recurringDepositAccountHelper.depositToRecurringDepositAccount(recurringDepositAccountId, depositAmount, EXPECTED_FIRST_DEPOSIT_ON_DATE); @@ -656,9 +651,8 @@ public class RecurringDepositTest { recurringDepositAccountId); Float maturityAmount = Float.valueOf(recurringDepositAccountData.get("maturityAmount").toString()); /*** - * Verify journal entry transactions for preclosure transaction As this - * transaction is an account transfer you should get financial account - * mapping details and verify amounts + * Verify journal entry transactions for preclosure transaction As this transaction is an account transfer you + * should get financial account mapping details and verify amounts */ this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityAccount, CLOSED_ON_DATE, new JournalEntry(maturityAmount, JournalEntry.TransactionType.CREDIT), @@ -804,8 +798,7 @@ public class RecurringDepositTest { Float depositAmount = (Float) recurringDepositAccountData.get("mandatoryRecommendedDepositAmount"); /*** - * Perform Deposit transaction and verify journal entries are posted for - * the transaction + * Perform Deposit transaction and verify journal entries are posted for the transaction */ todaysDate = Calendar.getInstance(); todaysDate.add(Calendar.MONTH, -20); @@ -846,8 +839,8 @@ public class RecurringDepositTest { } /*** - * Test case for Recurring Deposit Account premature closure with - * transaction type ReInvest and Cash Based accounting enabled + * Test case for Recurring Deposit Account premature closure with transaction type ReInvest and Cash Based + * accounting enabled */ @Test public void testRecurringDepositAccountWithPrematureClosureTypeReinvest() { @@ -941,8 +934,7 @@ public class RecurringDepositTest { Float depositAmount = (Float) recurringDepositAccountData.get("mandatoryRecommendedDepositAmount"); /*** - * Perform Deposit transaction and verify journal entries are posted for - * the transaction + * Perform Deposit transaction and verify journal entries are posted for the transaction */ Integer depositTransactionId = this.recurringDepositAccountHelper.depositToRecurringDepositAccount(recurringDepositAccountId, DEPOSIT_AMOUNT, EXPECTED_FIRST_DEPOSIT_ON_DATE); @@ -981,8 +973,7 @@ public class RecurringDepositTest { .calculatePrematureAmountForRecurringDeposit(recurringDepositAccountId, CLOSED_ON_DATE); /*** - * Expected to get an error response from api because re-invest option - * is not supported for account preClosure + * Expected to get an error response from api because re-invest option is not supported for account preClosure */ ArrayList errorResponse = (ArrayList) recurringDepositAccountHelperValidationError .prematureCloseForRecurringDeposit(recurringDepositAccountId, CLOSED_ON_DATE, CLOSURE_TYPE_REINVEST, null, @@ -1130,8 +1121,7 @@ public class RecurringDepositTest { } /*** - * Test case for Closure of Recurring Deposit Account(Withdrawn by - * applicant) + * Test case for Closure of Recurring Deposit Account(Withdrawn by applicant) */ @Test public void testRecurringDepositAccountWithdrawnByClientAndClosed() { @@ -1298,8 +1288,7 @@ public class RecurringDepositTest { Float balanceBefore = (Float) recurringDepositSummaryBefore.get("accountBalance"); /*** - * Perform Deposit transaction and verify journal entries are posted for - * the transaction + * Perform Deposit transaction and verify journal entries are posted for the transaction */ Integer transactionIdForDeposit = this.recurringDepositAccountHelper.depositToRecurringDepositAccount(recurringDepositAccountId, DEPOSIT_AMOUNT, DEPOSIT_DATE); @@ -1351,8 +1340,7 @@ public class RecurringDepositTest { } /*** - * Test case for verify maturity amount with monthly compounding and monthly - * posting with 365 days in year + * Test case for verify maturity amount with monthly compounding and monthly posting with 365 days in year */ @Test public void testMaturityAmountForMonthlyCompoundingAndMonthlyPosting_With_365_Days() { @@ -1429,8 +1417,7 @@ public class RecurringDepositTest { } /*** - * Test case for verify maturity amount with monthly compounding and monthly - * posting with 360 days in year + * Test case for verify maturity amount with monthly compounding and monthly posting with 360 days in year */ @Test public void testMaturityAmountForMonthlyCompoundingAndMonthlyPosting_With_360_Days() { @@ -1606,8 +1593,8 @@ public class RecurringDepositTest { } /*** - * Test case for verify premature closure amount with penal interest for - * whole term with closure transaction type withdrawal and 365 days in year + * Test case for verify premature closure amount with penal interest for whole term with closure transaction type + * withdrawal and 365 days in year */ @Test public void testPrematureClosureAmountWithPenalInterestForWholeTerm_With_365_Days() { @@ -1731,8 +1718,8 @@ public class RecurringDepositTest { } /*** - * Test case for verify premature closure amount with penal interest for - * whole term with closure transaction type withdrawal and 360 days in year + * Test case for verify premature closure amount with penal interest for whole term with closure transaction type + * withdrawal and 360 days in year */ @Test public void testPrematureClosureAmountWithPenalInterestForWholeTerm_With_360_Days() { @@ -1861,9 +1848,8 @@ public class RecurringDepositTest { } /*** - * Test case for verify premature closure amount with penal interest till - * maturity date with closure transaction type withdrawal and 365 days in - * year + * Test case for verify premature closure amount with penal interest till maturity date with closure transaction + * type withdrawal and 365 days in year */ @Test public void testPrematureClosureAmountWithPenalInterestTillPrematureWithdrawal_With_365_Days() { @@ -1999,9 +1985,8 @@ public class RecurringDepositTest { } /*** - * Test case verify premature closure amount with penal interest till - * maturity date with closure transaction type withdrawal and 360 days in - * year + * Test case verify premature closure amount with penal interest till maturity date with closure transaction type + * withdrawal and 360 days in year */ @Test public void testPrematureClosureAmountWithPenalInterestTillPrematureWithdrawal_With_360_Days() { @@ -2142,8 +2127,7 @@ public class RecurringDepositTest { } /*** - * Test case for verify maturity amount with daily compounding and monthly - * posting with 365 days in year + * Test case for verify maturity amount with daily compounding and monthly posting with 365 days in year */ @Test public void testMaturityAmountForDailyCompoundingAndMonthlyPosting_With_365_Days() { @@ -2224,8 +2208,7 @@ public class RecurringDepositTest { } /*** - * Test case for verify maturity amount with daily compounding and monthly - * posting with 360 days in year + * Test case for verify maturity amount with daily compounding and monthly posting with 360 days in year */ @Test public void testMaturityAmountForDailyCompoundingAndMonthlyPosting_With_360_Days() { @@ -2307,8 +2290,8 @@ public class RecurringDepositTest { } /*** - * Test case for verify premature closure amount with Bi-annual interest - * compounding and Bi-annual interest posting with 365 days in year + * Test case for verify premature closure amount with Bi-annual interest compounding and Bi-annual interest posting + * with 365 days in year */ @Test public void testRecurringDepositWithBi_AnnualCompoundingAndPosting_365_Days() { @@ -2397,8 +2380,8 @@ public class RecurringDepositTest { } /*** - * Test case for verify premature closure amount with Bi-annual interest - * compounding and Bi-annual interest posting with 360 days in year + * Test case for verify premature closure amount with Bi-annual interest compounding and Bi-annual interest posting + * with 360 days in year */ @Test public void testRecurringDepositWithBi_AnnualCompoundingAndPosting_360_Days() { @@ -2487,8 +2470,8 @@ public class RecurringDepositTest { } /*** - * Test case for verify maturity amount with Daily interest compounding and - * annual interest posting with 365 days in year + * Test case for verify maturity amount with Daily interest compounding and annual interest posting with 365 days in + * year */ @Test public void testMaturityAmountForDailyCompoundingAndAnnuallyPosting_With_365_Days() { @@ -2577,8 +2560,8 @@ public class RecurringDepositTest { } /*** - * Test case for verify maturity amount with Daily interest compounding and - * annual interest posting with 360 days in year + * Test case for verify maturity amount with Daily interest compounding and annual interest posting with 360 days in + * year */ @Test public void testMaturityAmountForDailyCompoundingAndAnnuallyPosting_With_360_Days() { @@ -2667,8 +2650,8 @@ public class RecurringDepositTest { } /*** - * Test case for verify premature closure amount with Quarterly interest - * compounding and Quarterly interest posting with 365 days in year + * Test case for verify premature closure amount with Quarterly interest compounding and Quarterly interest posting + * with 365 days in year */ @Test public void testRecurringDepositQuarterlyCompoundingAndQuarterlyPosting_365_Days() { @@ -2757,8 +2740,8 @@ public class RecurringDepositTest { } /*** - * Test case for verify premature closure amount with Quarterly interest - * compounding and Quarterly interest posting with 360 days in year + * Test case for verify premature closure amount with Quarterly interest compounding and Quarterly interest posting + * with 360 days in year */ @Test public void testRecurringDepositQuarterlyCompoundingAndQuarterlyPosting_360_Days() { @@ -3112,8 +3095,7 @@ public class RecurringDepositTest { List financialActivities = this.financialActivityAccountHelper.getAllFinancialActivityAccounts(this.responseSpec); final Account financialAccount; /*** - * if no financial activities are defined for account transfers, create - * liability financial accounting mappings + * if no financial activities are defined for account transfers, create liability financial accounting mappings */ if (financialActivities.isEmpty()) { financialAccount = createLiabilityFinancialAccountTransferType(LIABILITY_TRANSFER_FINANCIAL_ACTIVITY_ID); diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/SurveyIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/SurveyIntegrationTest.java index 0ae3d3864..d417e4b1e 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/SurveyIntegrationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/SurveyIntegrationTest.java @@ -28,8 +28,7 @@ import org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper; import org.junit.jupiter.api.BeforeEach; /** - * Client Loan Integration Test for checking Loan Application Repayment - * Schedule. + * Client Loan Integration Test for checking Loan Application Repayment Schedule. */ @SuppressWarnings({ "rawtypes", "unchecked" }) public class SurveyIntegrationTest { diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/BatchHelper.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/BatchHelper.java index 5a026b523..bc70fbae3 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/BatchHelper.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/BatchHelper.java @@ -32,9 +32,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Helper class for {@link org.apache.fineract.integrationtests.BatchApiTest}. - * It takes care of creation of {@code BatchRequest} list and posting this list - * to the server. + * Helper class for {@link org.apache.fineract.integrationtests.BatchApiTest}. It takes care of creation of + * {@code BatchRequest} list and posting this list to the server. * * @author Rishabh Shukla * @@ -81,9 +80,8 @@ public final class BatchHelper { } /** - * Returns a list of BatchResponse with query parameter enclosing - * transaction set to false by posting the jsonified BatchRequest to the - * server. + * Returns a list of BatchResponse with query parameter enclosing transaction set to false by posting the jsonified + * BatchRequest to the server. * * @param requestSpec * @param responseSpec @@ -97,9 +95,8 @@ public final class BatchHelper { } /** - * Returns a list of BatchResponse with query parameter enclosing - * transaction set to true by posting the jsonified BatchRequest to the - * server. + * Returns a list of BatchResponse with query parameter enclosing transaction set to true by posting the jsonified + * BatchRequest to the server. * * @param requestSpec * @param responseSpec @@ -113,8 +110,7 @@ public final class BatchHelper { } /** - * Returns a BatchResponse based on the given BatchRequest, by posting the - * request to the server. + * Returns a BatchResponse based on the given BatchRequest, by posting the request to the server. * * @param BatchRequest * @return List @@ -137,9 +133,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.CreateClientCommandStrategy} - * Request as one of the request in Batch. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.CreateClientCommandStrategy} Request as + * one of the request in Batch. * * @param reqId * @param externalId @@ -168,9 +163,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.CreateClientCommandStrategy} - * Request as one of the request in Batch. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.CreateClientCommandStrategy} Request as + * one of the request in Batch. * * @param reqId * @param externalId @@ -200,9 +194,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.UpdateClientCommandStrategy} - * Request with given requestId and reference. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.UpdateClientCommandStrategy} Request with + * given requestId and reference. * * @param reqId * @param clientId @@ -222,9 +215,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.ApplyLoanCommandStrategy} - * Request with given requestId and reference. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.ApplyLoanCommandStrategy} Request with + * given requestId and reference. * * @param requestId * @param reference @@ -253,9 +245,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.ApplySavingsCommandStrategy} - * Request with given requestId and reference. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.ApplySavingsCommandStrategy} Request with + * given requestId and reference. * * @param requestId * @param reference @@ -279,9 +270,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.CreateChargeCommandStrategy} - * Request with given requestId and reference + * Creates and returns a {@link org.apache.fineract.batch.command.internal.CreateChargeCommandStrategy} Request with + * given requestId and reference * * @param requestId * @param reference @@ -303,9 +293,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.CollectChargesCommandStrategy} - * Request with given requestId and reference. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.CollectChargesCommandStrategy} Request + * with given requestId and reference. * * @param requestId * @param reference @@ -325,9 +314,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.ActivateClientCommandStrategy} - * Request with given requestId and reference. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.ActivateClientCommandStrategy} Request + * with given requestId and reference. * * * @param requestId @@ -348,9 +336,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.ApproveLoanCommandStrategy} - * Request with given requestId and reference. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.ApproveLoanCommandStrategy} Request with + * given requestId and reference. * * * @param requestId @@ -371,9 +358,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.DisburseLoanCommandStrategy} - * Request with given requestId and reference. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.DisburseLoanCommandStrategy} Request with + * given requestId and reference. * * * @param requestId @@ -393,9 +379,8 @@ public final class BatchHelper { } /** - * Creates and returns a - * {@link org.apache.fineract.batch.command.internal.RepayLoanCommandStrategy} - * Request with given requestId. + * Creates and returns a {@link org.apache.fineract.batch.command.internal.RepayLoanCommandStrategy} Request with + * given requestId. * * * @param requestId @@ -416,8 +401,7 @@ public final class BatchHelper { } /** - * Checks that the client with given externalId is not created on the - * server. + * Checks that the client with given externalId is not created on the server. * * @param requestSpec * @param responseSpec diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/ClientChargesTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/ClientChargesTest.java index 0a0b4af6c..89c769cd6 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/ClientChargesTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/ClientChargesTest.java @@ -66,9 +66,8 @@ public class ClientChargesTest { Assertions.assertNotNull(clientId); /** - * create a charge for loan and try to associate to client created in - * the above lines.it will be an invalid scenario the reason is client - * is not allowed to have only client charge. + * create a charge for loan and try to associate to client created in the above lines.it will be an invalid + * scenario the reason is client is not allowed to have only client charge. * */ final Integer loanChargeId = ChargesHelper.createCharges(this.requestSpec, this.responseSpec, @@ -80,8 +79,7 @@ public class ClientChargesTest { Assertions.assertNull(clientLoanChargeId); /** - * associates a clientCharge to a client and pay client charge for 10 - * USD--success scenario + * associates a clientCharge to a client and pay client charge for 10 USD--success scenario **/ final Integer clientChargeId = ClientHelper.addChargesForClient(this.requestSpec, this.responseSpec, clientId, ClientHelper.getSpecifiedDueDateChargesClientAsJSON(chargeId.toString(), "29 October 2011")); @@ -93,16 +91,15 @@ public class ClientChargesTest { (float) 190.0); /** - * Revert the paid client charge transaction by passing the - * clientChargePaidTransactionId and ensure the same is reverted. + * Revert the paid client charge transaction by passing the clientChargePaidTransactionId and ensure the same is + * reverted. */ final Integer undoTrxnId = ClientHelper.revertClientChargeTransaction(this.requestSpec, this.responseSpec, clientId.toString(), clientChargePaidTransactionId); Assertions.assertNotNull(undoTrxnId); isReversedTransaction(clientId.toString(), undoTrxnId.toString()); /** - * Now pay client charge for 20 USD and ensure the outstanding amount is - * updated properly + * Now pay client charge for 20 USD and ensure the outstanding amount is updated properly */ ResponseSpecification responseSpecFailure = new ResponseSpecBuilder().expectStatusCode(400).build(); DateFormat dateFormat = new SimpleDateFormat("dd MMMM yyyy"); @@ -119,32 +116,28 @@ public class ClientChargesTest { Assertions.assertNotNull(waiveOffClientChargeTransactionId); /** - * Revert the waived off client charge transaction by passing the - * waiveOffClientChargeTransactionId and ensured the transaction is - * reversed. + * Revert the waived off client charge transaction by passing the waiveOffClientChargeTransactionId and ensured + * the transaction is reversed. */ final Integer undoWaiveTrxnId = ClientHelper.revertClientChargeTransaction(this.requestSpec, this.responseSpec, clientId.toString(), waiveOffClientChargeTransactionId); Assertions.assertNotNull(undoWaiveTrxnId); isReversedTransaction(clientId.toString(), undoWaiveTrxnId.toString()); /** - * pay client charge before client activation date and ensured its a - * failure test case + * pay client charge before client activation date and ensured its a failure test case */ final String responseId_activationDate_failure = ClientHelper.payChargesForClients(this.requestSpec, responseSpecFailure, clientId, clientChargeId, ClientHelper.getPayChargeJSON("30 September 2011", "20")); Assertions.assertNull(responseId_activationDate_failure); /** - * pay client charge more than outstanding amount amount and ensured its - * a failure test case + * pay client charge more than outstanding amount amount and ensured its a failure test case */ final String responseId_moreAmount_failure = ClientHelper.payChargesForClients(this.requestSpec, responseSpecFailure, clientId, clientChargeId, ClientHelper.getPayChargeJSON("25 AUGUST 2015", "300")); Assertions.assertNull(responseId_moreAmount_failure); /** - * pay client charge for 10 USD and ensure outstanding amount is updated - * properly + * pay client charge for 10 USD and ensure outstanding amount is updated properly */ final String chargePaid_responseId = ClientHelper.payChargesForClients(this.requestSpec, this.responseSpec, clientId, clientChargeId, ClientHelper.getPayChargeJSON("25 AUGUST 2015", "100")); @@ -168,8 +161,8 @@ public class ClientChargesTest { } /** - * Check whether the outStandingAmount is equal to expected Amount or not - * after paying or after waiving off the client charge. + * Check whether the outStandingAmount is equal to expected Amount or not after paying or after waiving off the + * client charge. * * @param outStandingAmount * @param expectedAmount diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/GlobalConfigurationHelper.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/GlobalConfigurationHelper.java index fa52e444d..6710ed2d3 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/GlobalConfigurationHelper.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/GlobalConfigurationHelper.java @@ -110,16 +110,13 @@ public class GlobalConfigurationHelper { } /** - * Helper method to get the current default instance data of the - * /configurations endpoint. Used to reset and verify that no global - * configuration affects state between integration tests. + * Helper method to get the current default instance data of the /configurations endpoint. Used to reset and verify + * that no global configuration affects state between integration tests. * - * @see FINERACT-722 - * This is a quick, fail fast and early implementation to resolve this - * issue. TODO: A more robust future solution would be isolating all - * integration test state using Spring Framework's integration test - * infrastructure for transaction commits and rollbacks. + * @see FINERACT-722 This is a quick, fail fast + * and early implementation to resolve this issue. TODO: A more robust future solution would be isolating all + * integration test state using Spring Framework's integration test infrastructure for transaction commits and + * rollbacks. */ private static ArrayList getAllDefaultGlobalConfigurations() { diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/SchedulerJobHelper.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/SchedulerJobHelper.java index 1a4f2871c..990c1ff1b 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/SchedulerJobHelper.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/SchedulerJobHelper.java @@ -142,9 +142,7 @@ public class SchedulerJobHelper { * Launches a Job and awaits its completion. * * @param jobName - * displayName (see - * {@link org.apache.fineract.infrastructure.jobs.service.JobName}) - * of Scheduler Job + * displayName (see {@link org.apache.fineract.infrastructure.jobs.service.JobName}) of Scheduler Job * * @author Michael Vorburger.ch */ diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/Utils.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/Utils.java index 512e62702..38b3cb747 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/Utils.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/Utils.java @@ -45,8 +45,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Util for RestAssured tests. This class here in src/integrationTest is - * copy/pasted to src/test; please keep them in sync. + * Util for RestAssured tests. This class here in src/integrationTest is copy/pasted to src/test; please keep them in + * sync. */ @SuppressWarnings("unchecked") public class Utils { diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/loans/LoanApplicationTestBuilder.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/loans/LoanApplicationTestBuilder.java index c3c39999f..9e811821b 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/loans/LoanApplicationTestBuilder.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/loans/LoanApplicationTestBuilder.java @@ -334,12 +334,10 @@ public class LoanApplicationTestBuilder { } /** - * calendarID parameter is used to sync repayments with group meetings, - * especially when using jlg loans + * calendarID parameter is used to sync repayments with group meetings, especially when using jlg loans * * @param calendarId - * the id of the calender record of the group meeting from - * m_calendar table + * the id of the calender record of the group meeting from m_calendar table * @return */ public LoanApplicationTestBuilder withCalendarID(String calendarId) { @@ -348,10 +346,8 @@ public class LoanApplicationTestBuilder { } /** - * This indicator is used mainly for jlg loans when we want to sync - * disbursement with the group meetings (it seems that if we do use this - * parameter we should also use calendarID to sync repayment with group - * meetings) + * This indicator is used mainly for jlg loans when we want to sync disbursement with the group meetings (it seems + * that if we do use this parameter we should also use calendarID to sync repayment with group meetings) * * @return */ diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/loans/LoanDisbursementTestBuilder.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/loans/LoanDisbursementTestBuilder.java index e2b78eb5e..70357c594 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/loans/LoanDisbursementTestBuilder.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/loans/LoanDisbursementTestBuilder.java @@ -81,27 +81,18 @@ public class LoanDisbursementTestBuilder { } /* - * public HashMap build(String dueDate,String - * totalOriginalDueForPeriod,String totalOutstandingForPeriod, String - * interestOutstanding, String principalOutstanding, String - * principalLoanBalanceOutstanding, String principalDue, String - * principalOriginalDue, String fromDate) { HashMap - * expectedRepaymentSchedule = new HashMap(); - * expectedRepaymentSchedule.put("dueDate", dueDate); - * expectedRepaymentSchedule.put("totalOriginalDueForPeriod", - * totalOriginalDueForPeriod); - * expectedRepaymentSchedule.put("totalOutstandingForPeriod", - * totalOutstandingForPeriod); - * expectedRepaymentSchedule.put("interestOutstanding", - * interestOutstanding); - * expectedRepaymentSchedule.put("principalOutstanding", - * principalOutstanding); - * expectedRepaymentSchedule.put("principalLoanBalanceOutstanding", - * principalLoanBalanceOutstanding); + * public HashMap build(String dueDate,String totalOriginalDueForPeriod,String + * totalOutstandingForPeriod, String interestOutstanding, String principalOutstanding, String + * principalLoanBalanceOutstanding, String principalDue, String principalOriginalDue, String fromDate) { + * HashMap expectedRepaymentSchedule = new HashMap(); + * expectedRepaymentSchedule.put("dueDate", dueDate); expectedRepaymentSchedule.put("totalOriginalDueForPeriod", + * totalOriginalDueForPeriod); expectedRepaymentSchedule.put("totalOutstandingForPeriod", + * totalOutstandingForPeriod); expectedRepaymentSchedule.put("interestOutstanding", interestOutstanding); + * expectedRepaymentSchedule.put("principalOutstanding", principalOutstanding); + * expectedRepaymentSchedule.put("principalLoanBalanceOutstanding", principalLoanBalanceOutstanding); * expectedRepaymentSchedule.put("principalDue", principalDue); - * expectedRepaymentSchedule.put("principalOriginalDue", - * principalOriginalDue); expectedRepaymentSchedule.put("fromDate", - * fromDate); + * expectedRepaymentSchedule.put("principalOriginalDue", principalOriginalDue); + * expectedRepaymentSchedule.put("fromDate", fromDate); * * return expectedRepaymentSchedule; } */ diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/organisation/EntityDatatableChecksIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/organisation/EntityDatatableChecksIntegrationTest.java index 630c1eec1..f7c82fad9 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/organisation/EntityDatatableChecksIntegrationTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/organisation/EntityDatatableChecksIntegrationTest.java @@ -46,8 +46,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Entity Datatable Checks Integration Test for checking Creation, Deletion and - * Retrieval of Entity-Datatable Check + * Entity Datatable Checks Integration Test for checking Creation, Deletion and Retrieval of Entity-Datatable Check */ public class EntityDatatableChecksIntegrationTest { diff --git a/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java b/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java index 34d3175de..aad208e5b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java +++ b/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java @@ -29,16 +29,13 @@ import org.springframework.context.annotation.Import; import org.springframework.context.annotation.ImportResource; /** - * Fineract main() application which launches Fineract in an embedded Tomcat - * HTTP (using Spring Boot). + * Fineract main() application which launches Fineract in an embedded Tomcat HTTP (using Spring Boot). * - * The DataSource used is a to a "normal" external database (not use MariaDB4j). - * This DataSource can be configured with parameters, see - * {@link DataSourceProperties}. + * The DataSource used is a to a "normal" external database (not use MariaDB4j). This DataSource can be configured with + * parameters, see {@link DataSourceProperties}. * - * You can easily launch this via Debug as Java Application in your IDE - - * without needing command line Gradle stuff, no need to build and deploy a WAR, - * remote attachment etc. + * You can easily launch this via Debug as Java Application in your IDE - without needing command line Gradle stuff, no + * need to build and deploy a WAR, remote attachment etc. * * It's the old/classic Mifos (non-X) Workspace 2.0 reborn for Fineract! ;-) * diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java index 6d42ebaec..c4ee398b1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java @@ -45,8 +45,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link GuarantorCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link GuarantorCommand}'s. */ @Component public final class AccrualAccountingDataValidator { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java index 703dd3328..99345a13c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java @@ -29,8 +29,7 @@ final class GLClosuresApiResourceSwagger { } /** - * TODO: describe where this belongs: {@link GLClosuresApiResource } - * {@Link GLClosuresApiResource} + * TODO: describe where this belongs: {@link GLClosuresApiResource } {@Link GLClosuresApiResource} */ // Check !! diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/data/GLClosureData.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/data/GLClosureData.java index 889d0c08d..e346b2d18 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/data/GLClosureData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/data/GLClosureData.java @@ -26,8 +26,7 @@ import org.joda.time.LocalDate; /** * Immutable object representing a General Ledger Account * - * Note: no getter/setters required as google-gson will produce json from fields - * of object. + * Note: no getter/setters required as google-gson will produce json from fields of object. */ public class GLClosureData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureDuplicateException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureDuplicateException.java index 52862b03f..41ea6ef15 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureDuplicateException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureDuplicateException.java @@ -22,8 +22,7 @@ import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainR import org.joda.time.LocalDate; /** - * A {@link RuntimeException} thrown when a GL Closure for a given date and - * Office combination is already present + * A {@link RuntimeException} thrown when a GL Closure for a given date and Office combination is already present */ public class GLClosureDuplicateException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureNotFoundException.java index b627444bf..92fa3f5d9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.closure.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when GL account closure resources are not - * found. + * A {@link RuntimeException} thrown when GL account closure resources are not found. */ public class GLClosureNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/serialization/GLClosureCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/serialization/GLClosureCommandFromApiJsonDeserializer.java index a59b503b9..a0e9a4251 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/serialization/GLClosureCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/serialization/GLClosureCommandFromApiJsonDeserializer.java @@ -36,8 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link GuarantorCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link GuarantorCommand}'s. */ @Component public final class GLClosureCommandFromApiJsonDeserializer extends AbstractFromApiJsonDeserializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java index 411836a54..9f6c7686a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java @@ -124,8 +124,7 @@ public class GLClosureWritePlatformServiceJpaRepositoryImpl implements GLClosure .orElseThrow(() -> new GLClosureNotFoundException(glClosureId)); /** - * check if any closures are present for this branch at a later date - * than this closure date + * check if any closures are present for this branch at a later date than this closure date **/ final Date closureDate = glClosure.getClosingDate(); final GLClosure latestGLClosure = this.glClosureRepository.getLatestGLClosureByBranch(glClosure.getOffice().getId()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/common/AccountingConstants.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/common/AccountingConstants.java index 3df460077..e87a01e2a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/common/AccountingConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/common/AccountingConstants.java @@ -102,8 +102,7 @@ public class AccountingConstants { } /*** - * Enum of all accounting related input parameter names used while - * creating/updating a loan product + * Enum of all accounting related input parameter names used while creating/updating a loan product ***/ public static enum LoanProductAccountingParams { @@ -201,8 +200,7 @@ public class AccountingConstants { } /*** - * Enum of all accounting related input parameter names used while - * creating/updating a savings product + * Enum of all accounting related input parameter names used while creating/updating a savings product ***/ public static enum SavingProductAccountingParams { @@ -374,8 +372,7 @@ public class AccountingConstants { } /*** - * Enum of all accounting related input parameter names used while - * creating/updating a savings product + * Enum of all accounting related input parameter names used while creating/updating a savings product ***/ public static enum SharesProductAccountingParams { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepositoryWrapper.java index 169182409..6ff241e71 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepositoryWrapper.java @@ -25,8 +25,7 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link FinancialActivityAccountRepository} that adds NULL - * checking and Error handling capabilities + * Wrapper for {@link FinancialActivityAccountRepository} that adds NULL checking and Error handling capabilities *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/DuplicateFinancialActivityAccountFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/DuplicateFinancialActivityAccountFoundException.java index 070532b1b..c88139fed 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/DuplicateFinancialActivityAccountFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/DuplicateFinancialActivityAccountFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.financialactivityaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when product to GL account mapping are not - * found. + * A {@link RuntimeException} thrown when product to GL account mapping are not found. */ public class DuplicateFinancialActivityAccountFoundException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountInvalidException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountInvalidException.java index 1e62cb3b6..5b4431a55 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountInvalidException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountInvalidException.java @@ -23,8 +23,7 @@ import org.apache.fineract.accounting.glaccount.domain.GLAccount; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when product to GL account mapping are not - * found. + * A {@link RuntimeException} thrown when product to GL account mapping are not found. */ public class FinancialActivityAccountInvalidException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountNotFoundException.java index a99523969..e6350be58 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.financialactivityaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when product to GL account mapping are not - * found. + * A {@link RuntimeException} thrown when product to GL account mapping are not found. */ public class FinancialActivityAccountNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformServiceImpl.java index 7d14a953d..e3ccb20b3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformServiceImpl.java @@ -89,8 +89,7 @@ public class FinancialActivityAccountWritePlatformServiceImpl implements Financi } /** - * Validate that the GL Account is appropriate for the particular Financial - * Activity Type + * Validate that the GL Account is appropriate for the particular Financial Activity Type **/ private void validateFinancialActivityAndAccountMapping(FinancialActivityAccount financialActivityAccount) { FinancialActivity financialActivity = FinancialActivity.fromInt(financialActivityAccount.getFinancialActivityType()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java index 8d725b208..0859cb2eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java @@ -30,8 +30,7 @@ import org.apache.fineract.infrastructure.core.data.EnumOptionData; /** * Immutable object representing a General Ledger Account * - * Note: no getter/setters required as google-gson will produce json from fields - * of object. + * Note: no getter/setters required as google-gson will produce json from fields of object. */ public class GLAccountData implements Serializable { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDisableException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDisableException.java index 251e87cc6..ca47194a4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDisableException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDisableException.java @@ -22,8 +22,7 @@ import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainR /** * - * when gl account is attached with any product(loan/saving) then we can not - * disable the gl account + * when gl account is attached with any product(loan/saving) then we can not disable the gl account */ public class GLAccountDisableException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDuplicateException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDuplicateException.java index fb9b831b3..c7906d7a5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDuplicateException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDuplicateException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.glaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when a GL Account with a given GL Code of - * the particular type is already present + * A {@link RuntimeException} thrown when a GL Account with a given GL Code of the particular type is already present */ public class GLAccountDuplicateException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidClassificationException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidClassificationException.java index dce9a7e5c..f0ecc86df 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidClassificationException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidClassificationException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.glaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when trying to fetch accounts belonging to - * an Invalid Usage Type + * A {@link RuntimeException} thrown when trying to fetch accounts belonging to an Invalid Usage Type */ public class GLAccountInvalidClassificationException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidDeleteException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidDeleteException.java index efd53a25b..f90a76f78 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidDeleteException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidDeleteException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.glaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when a GL Account with a given GL Code of - * the particular type is already present + * A {@link RuntimeException} thrown when a GL Account with a given GL Code of the particular type is already present */ public class GLAccountInvalidDeleteException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidParentException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidParentException.java index e541d9c51..529d4d261 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidParentException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidParentException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.glaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when trying to map invalid parents to a GL - * account + * A {@link RuntimeException} thrown when trying to map invalid parents to a GL account */ public class GLAccountInvalidParentException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUpdateException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUpdateException.java index 1c88da238..157a57d2f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUpdateException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUpdateException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.glaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when an error is encountered during - * updating a GL Account + * A {@link RuntimeException} thrown when an error is encountered during updating a GL Account */ public class GLAccountInvalidUpdateException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUsageException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUsageException.java index b13f3fb63..c0996c638 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUsageException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUsageException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.glaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when trying to fetch accounts belonging to - * an Invalid Type + * A {@link RuntimeException} thrown when trying to fetch accounts belonging to an Invalid Type */ public class GLAccountInvalidUsageException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/serialization/GLAccountCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/serialization/GLAccountCommandFromApiJsonDeserializer.java index 284e979cb..d960cb29e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/serialization/GLAccountCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/serialization/GLAccountCommandFromApiJsonDeserializer.java @@ -35,8 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link GuarantorCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link GuarantorCommand}'s. */ @Component public final class GLAccountCommandFromApiJsonDeserializer extends AbstractFromApiJsonDeserializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformServiceJpaRepositoryImpl.java index 88083f0fe..fd83c9d2c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformServiceJpaRepositoryImpl.java @@ -151,8 +151,7 @@ public class GLAccountWritePlatformServiceJpaRepositoryImpl implements GLAccount } /** - * a detail account cannot be changed to a header account if - * transactions are already logged against it + * a detail account cannot be changed to a header account if transactions are already logged against it **/ if (changesOnly.containsKey(GLAccountJsonInputParams.USAGE.getValue())) { if (glAccount.isHeaderAccount()) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java index 347ae8802..fd4b5e67f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java @@ -28,8 +28,7 @@ import org.joda.time.LocalDate; /** * Immutable object representing a General Ledger Account * - * Note: no getter/setters required as google will produce json from fields of - * object. + * Note: no getter/setters required as google will produce json from fields of object. */ public class JournalEntryData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryRepository.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryRepository.java index 8014c64f8..1ad32c78e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryRepository.java @@ -46,13 +46,11 @@ public interface JournalEntryRepository * @Query("select journalEntry from JournalEntry journalEntry where glAccount.id= :accountId and transactionId= :transactionId and transactionDate= :transactionDate" * + * " and type= :journalEntryType and entityType=1 and entityId= :loanId and loanTransaction.id= :loanTransactionId" - * ) JournalEntry findLOANJournalEntryWith(@Param("accountId") Long - * accountId, @Param("transactionId") String transactionId, + * ) JournalEntry findLOANJournalEntryWith(@Param("accountId") Long accountId, @Param("transactionId") String + * transactionId, * - * @Param("transactionDate") Date - * transactionDate, @Param("journalEntryType") Integer journalEntryType, + * @Param("transactionDate") Date transactionDate, @Param("journalEntryType") Integer journalEntryType, * - * @Param("loanId") Long loanId, @Param("loanTransactionId") Long - * loanTransactionId); + * @Param("loanId") Long loanId, @Param("loanTransactionId") Long loanTransactionId); */ } diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/serialization/JournalEntryCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/serialization/JournalEntryCommandFromApiJsonDeserializer.java index d98a5df23..2741eda53 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/serialization/JournalEntryCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/serialization/JournalEntryCommandFromApiJsonDeserializer.java @@ -41,8 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link JournalEntryCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link JournalEntryCommand}'s. */ @Component public final class JournalEntryCommandFromApiJsonDeserializer extends AbstractFromApiJsonDeserializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavingsFactory.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavingsFactory.java old mode 100755 new mode 100644 index 13947229b..35e7e219d --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavingsFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavingsFactory.java @@ -34,9 +34,8 @@ public class AccountingProcessorForSavingsFactory { } /*** - * Looks like overkill for now, but wanted to keep the savings side of - * accounting identical to that of Loans (would we need an Accrual based - * accounting in the future?) + * Looks like overkill for now, but wanted to keep the savings side of accounting identical to that of Loans (would + * we need an Accrual based accounting in the future?) ***/ public AccountingProcessorForSavings determineProcessor(final SavingsDTO savingsDTO) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorHelper.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorHelper.java index 700668e3a..b555f74b6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorHelper.java @@ -338,11 +338,9 @@ public class AccountingProcessorHelper { } /** - * Convenience method that creates a pair of related Debits and Credits for - * Accrual Based accounting. + * Convenience method that creates a pair of related Debits and Credits for Accrual Based accounting. * - * The target accounts for debits and credits are switched in case of a - * reversal + * The target accounts for debits and credits are switched in case of a reversal * * @param office * @param accountTypeToBeDebited @@ -372,11 +370,9 @@ public class AccountingProcessorHelper { } /** - * Convenience method that creates a pair of related Debits and Credits for - * Accrual Based accounting. + * Convenience method that creates a pair of related Debits and Credits for Accrual Based accounting. * - * The target accounts for debits and credits are switched in case of a - * reversal + * The target accounts for debits and credits are switched in case of a reversal * * @param office * office @@ -445,11 +441,9 @@ public class AccountingProcessorHelper { } /** - * Convenience method that creates a pair of related Debits and Credits for - * Cash Based accounting. + * Convenience method that creates a pair of related Debits and Credits for Cash Based accounting. * - * The target accounts for debits and credits are switched in case of a - * reversal + * The target accounts for debits and credits are switched in case of a reversal * * @param office * @param accountTypeToBeDebited @@ -480,11 +474,9 @@ public class AccountingProcessorHelper { } /** - * Convenience method that creates a pair of related Debits and Credits for - * Cash Based accounting. + * Convenience method that creates a pair of related Debits and Credits for Cash Based accounting. * - * The target accounts for debits and credits are switched in case of a - * reversal + * The target accounts for debits and credits are switched in case of a reversal * * @param office * @param accountTypeToBeDebited @@ -535,8 +527,7 @@ public class AccountingProcessorHelper { */ public void checkForBranchClosures(final GLClosure latestGLClosure, final Date transactionDate) { /** - * check if an accounting closure has happened for this branch after the - * transaction Date + * check if an accounting closure has happened for this branch after the transaction Date **/ if (latestGLClosure != null) { if (latestGLClosure.getClosingDate().after(transactionDate) || latestGLClosure.getClosingDate().equals(transactionDate)) { @@ -573,11 +564,9 @@ public class AccountingProcessorHelper { } /** - * Convenience method that creates a pair of related Debits and Credits for - * Cash Based accounting. + * Convenience method that creates a pair of related Debits and Credits for Cash Based accounting. * - * The target accounts for debits and credits are switched in case of a - * reversal + * The target accounts for debits and credits are switched in case of a reversal * * @param office * @param currencyCode @@ -695,8 +684,7 @@ public class AccountingProcessorHelper { final Date transactionDate, final BigDecimal totalAmount, final Boolean isReversal, final List chargePaymentDTOs) { /*** - * Map to track each account and the net credit to be made for a - * particular account + * Map to track each account and the net credit to be made for a particular account ***/ final Map creditDetailsMap = new LinkedHashMap<>(); for (final ChargePaymentDTO chargePaymentDTO : chargePaymentDTOs) { @@ -736,11 +724,9 @@ public class AccountingProcessorHelper { } /** - * Convenience method that creates a pair of related Debits and Credits for - * Cash Based accounting. + * Convenience method that creates a pair of related Debits and Credits for Cash Based accounting. * - * The target accounts for debits and credits are switched in case of a - * reversal + * The target accounts for debits and credits are switched in case of a reversal * * @param office * office @@ -775,10 +761,9 @@ public class AccountingProcessorHelper { // TODO Vishwas: Remove this validation, as and when appropriate Junit // tests are written for accounting /** - * Accounting module currently supports a single charge per transaction, - * throw an error if this is not the case here so any developers - * changing the expected portfolio behavior would also take care of - * modifying the accounting code appropriately + * Accounting module currently supports a single charge per transaction, throw an error if this is not the case + * here so any developers changing the expected portfolio behavior would also take care of modifying the + * accounting code appropriately **/ if (chargePaymentDTOs.size() != 1) { throw new PlatformDataIntegrityException("Recent Portfolio changes w.r.t Charges for Savings have Broken the accounting code", @@ -1124,9 +1109,8 @@ public class AccountingProcessorHelper { PortfolioProductType.LOAN.getValue(), accountMappingTypeId); /**** - * Get more specific mapping for FUND source accounts (based on - * payment channels). Note that fund source placeholder ID would be - * same for both cash and accrual accounts + * Get more specific mapping for FUND source accounts (based on payment channels). Note that fund source + * placeholder ID would be same for both cash and accrual accounts ***/ if (accountMappingTypeId == CashAccountsForLoan.FUND_SOURCE.getValue()) { final ProductToGLAccountMapping paymentChannelSpecificAccountMapping = this.accountMappingRepository @@ -1150,10 +1134,9 @@ public class AccountingProcessorHelper { ProductToGLAccountMapping accountMapping = this.accountMappingRepository.findCoreProductToFinAccountMapping(loanProductId, PortfolioProductType.LOAN.getValue(), accountMappingTypeId); /***** - * Get more specific mappings for Charges and penalties (based on the - * actual charge /penalty coupled with the loan product). Note the - * income from fees and income from penalties placeholder ID would be - * the same for both cash and accrual based accounts + * Get more specific mappings for Charges and penalties (based on the actual charge /penalty coupled with the + * loan product). Note the income from fees and income from penalties placeholder ID would be the same for both + * cash and accrual based accounts *****/ // Vishwas TODO: remove this condition as it should always be true @@ -1174,10 +1157,9 @@ public class AccountingProcessorHelper { ProductToGLAccountMapping accountMapping = this.accountMappingRepository.findCoreProductToFinAccountMapping(savingsProductId, PortfolioProductType.SAVING.getValue(), accountMappingTypeId); /***** - * Get more specific mappings for Charges and penalties (based on the - * actual charge /penalty coupled with the loan product). Note the - * income from fees and income from penalties placeholder ID would be - * the same for both cash and accrual based accounts + * Get more specific mappings for Charges and penalties (based on the actual charge /penalty coupled with the + * loan product). Note the income from fees and income from penalties placeholder ID would be the same for both + * cash and accrual based accounts *****/ // Vishwas TODO: remove this condition as it should always be true @@ -1204,9 +1186,8 @@ public class AccountingProcessorHelper { ProductToGLAccountMapping accountMapping = this.accountMappingRepository.findCoreProductToFinAccountMapping(savingsProductId, PortfolioProductType.SAVING.getValue(), accountMappingTypeId); /**** - * Get more specific mapping for FUND source accounts (based on - * payment channels). Note that fund source placeholder ID would be - * same for both cash and accrual accounts + * Get more specific mapping for FUND source accounts (based on payment channels). Note that fund source + * placeholder ID would be same for both cash and accrual accounts ***/ if (accountMappingTypeId == CashAccountsForSavings.SAVINGS_REFERENCE.getValue()) { final ProductToGLAccountMapping paymentChannelSpecificAccountMapping = this.accountMappingRepository @@ -1249,10 +1230,9 @@ public class AccountingProcessorHelper { ProductToGLAccountMapping accountMapping = this.accountMappingRepository.findCoreProductToFinAccountMapping(shareProductId, PortfolioProductType.SHARES.getValue(), accountMappingTypeId); /***** - * Get more specific mappings for Charges and penalties (based on the - * actual charge /penalty coupled with the loan product). Note the - * income from fees and income from penalties placeholder ID would be - * the same for both cash and accrual based accounts + * Get more specific mappings for Charges and penalties (based on the actual charge /penalty coupled with the + * loan product). Note the income from fees and income from penalties placeholder ID would be the same for both + * cash and accrual based accounts *****/ final ProductToGLAccountMapping chargeSpecificIncomeAccountMapping = this.accountMappingRepository @@ -1276,8 +1256,7 @@ public class AccountingProcessorHelper { final Long clientId, final Long transactionId, final Date transactionDate, final Boolean isReversal, final List clientChargePaymentDTOs) { /*** - * Map to track each account affected and the net credit to be made for - * a particular account + * Map to track each account affected and the net credit to be made for a particular account ***/ final Map creditDetailsMap = new LinkedHashMap<>(); for (final ClientChargePaymentDTO clientChargePaymentDTO : clientChargePaymentDTOs) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java index 6f9079ec7..5836042ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java @@ -65,8 +65,7 @@ public class AccrualBasedAccountingProcessorForLoan implements AccountingProcess } /*** - * Handle repayments, repayments at disbursement and reversal of - * Repayments and Repayments at disbursement + * Handle repayments, repayments at disbursement and reversal of Repayments and Repayments at disbursement ***/ else if (loanTransactionDTO.getTransactionType().isRepayment() || loanTransactionDTO.getTransactionType().isRepaymentAtDisbursement() @@ -144,35 +143,27 @@ public class AccrualBasedAccountingProcessorForLoan implements AccountingProcess *
*
* - * Principal Repayment: Debits "Fund Source" and Credits "Loan - * Portfolio"
+ * Principal Repayment: Debits "Fund Source" and Credits "Loan Portfolio"
* - * Interest Repayment:Debits "Fund Source" and and Credits - * "Receivable Interest"
+ * Interest Repayment:Debits "Fund Source" and and Credits "Receivable Interest"
* - * Fee Repayment:Debits "Fund Source" (or "Interest on Loans" in case - * of repayment at disbursement) and and Credits "Receivable Fees"
+ * Fee Repayment:Debits "Fund Source" (or "Interest on Loans" in case of repayment at disbursement) and and + * Credits "Receivable Fees"
* - * Penalty Repayment: Debits "Fund Source" and and Credits - * "Receivable Penalties"
+ * Penalty Repayment: Debits "Fund Source" and and Credits "Receivable Penalties"
*
* Handles write offs using the following posting rules
*
- * Principal Write off: Debits "Losses Written Off" and Credits "Loan - * Portfolio"
+ * Principal Write off: Debits "Losses Written Off" and Credits "Loan Portfolio"
* - * Interest Write off:Debits "Losses Written off" and and Credits - * "Receivable Interest"
+ * Interest Write off:Debits "Losses Written off" and and Credits "Receivable Interest"
* - * Fee Write off:Debits "Losses Written off" and and Credits - * "Receivable Fees"
+ * Fee Write off:Debits "Losses Written off" and and Credits "Receivable Fees"
* - * Penalty Write off: Debits "Losses Written off" and and Credits - * "Receivable Penalties"
+ * Penalty Write off: Debits "Losses Written off" and and Credits "Receivable Penalties"
*
*
- * In case the loan transaction has been reversed, all debits are turned - * into credits and vice versa + * In case the loan transaction has been reversed, all debits are turned into credits and vice versa * * @param loanTransactionDTO * @param loanDTO @@ -289,8 +280,7 @@ public class AccrualBasedAccountingProcessorForLoan implements AccountingProcess } /** - * Single DEBIT transaction for write-offs or Repayments (and their - * reversals) + * Single DEBIT transaction for write-offs or Repayments (and their reversals) ***/ if (!(totalDebitAmount.compareTo(BigDecimal.ZERO) == 0)) { if (writeOff) { @@ -315,11 +305,9 @@ public class AccrualBasedAccountingProcessorForLoan implements AccountingProcess } /** - * Create a single Debit to fund source and a single credit to "Income from - * Recovery" + * Create a single Debit to fund source and a single credit to "Income from Recovery" * - * In case the loan transaction is a reversal, all debits are turned into - * credits and vice versa + * In case the loan transaction is a reversal, all debits are turned into credits and vice versa */ private void createJournalEntriesForRecoveryRepayments(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, final Office office) { @@ -345,11 +333,9 @@ public class AccrualBasedAccountingProcessorForLoan implements AccountingProcess * Recognize the receivable interest
* Debit "Interest Receivable" and Credit "Income from Interest" * - * Fees: Debit Fees Receivable and credit Income from - * Fees
+ * Fees: Debit Fees Receivable and credit Income from Fees
* - * Penalties: Debit Penalties Receivable and credit Income - * from Penalties + * Penalties: Debit Penalties Receivable and credit Income from Penalties * * Also handles reversals for both fees and payment applications * diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForClientTransactions.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForClientTransactions.java index 4f240690a..e21759224 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForClientTransactions.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForClientTransactions.java @@ -52,11 +52,10 @@ public class CashBasedAccountingProcessorForClientTransactions implements Accoun } /** - * Create a single debit to fund source and multiple credits for the income - * account mapped with each charge this payment pays off + * Create a single debit to fund source and multiple credits for the income account mapped with each charge this + * payment pays off * - * In case the loan transaction is a reversal, all debits are turned into - * credits and vice versa + * In case the loan transaction is a reversal, all debits are turned into credits and vice versa */ private void createJournalEntriesForChargePayments(final ClientTransactionDTO clientTransactionDTO, final Office office) { // client properties @@ -74,9 +73,8 @@ public class CashBasedAccountingProcessorForClientTransactions implements Accoun transactionId, transactionDate, isReversal, clientTransactionDTO.getChargePayments()); /*** - * create a single Debit entry (or reversal) for the entire amount - * that was credited (accounting is turned on at the level of for - * each charge that has been paid by this transaction) + * create a single Debit entry (or reversal) for the entire amount that was credited (accounting is turned + * on at the level of for each charge that has been paid by this transaction) **/ this.helper.createDebitJournalEntryOrReversalForClientChargePayments(office, currencyCode, clientId, transactionId, transactionDate, totalCreditedAmount, isReversal); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForLoan.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForLoan.java index 22c42d246..bd7d0a31d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForLoan.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForLoan.java @@ -63,8 +63,8 @@ public class CashBasedAccountingProcessorForLoan implements AccountingProcessorF createJournalEntriesForDisbursements(loanDTO, loanTransactionDTO, office); } /*** - * Logic for repayments, repayments at disbursement and reversal of - * Repayments and Repayments at disbursement + * Logic for repayments, repayments at disbursement and reversal of Repayments and Repayments at + * disbursement ***/ else if (loanTransactionDTO.getTransactionType().isRepayment() || loanTransactionDTO.getTransactionType().isRepaymentAtDisbursement() @@ -82,9 +82,8 @@ public class CashBasedAccountingProcessorForLoan implements AccountingProcessorF createJournalEntriesForRefund(loanDTO, loanTransactionDTO, office); } /*** - * Only principal write off affects cash based accounting (interest - * and fee write off need not be considered). Debit losses written - * off and credit Loan Portfolio + * Only principal write off affects cash based accounting (interest and fee write off need not be + * considered). Debit losses written off and credit Loan Portfolio **/ else if (loanTransactionDTO.getTransactionType().isWriteOff()) { final BigDecimal principalAmount = loanTransactionDTO.getPrincipal(); @@ -109,8 +108,7 @@ public class CashBasedAccountingProcessorForLoan implements AccountingProcessorF /** * Debit loan Portfolio and credit Fund source for a Disbursement
* - * All debits are turned into credits and vice versa in case of disbursement - * reversals + * All debits are turned into credits and vice versa in case of disbursement reversals * * * @param loanDTO @@ -149,8 +147,7 @@ public class CashBasedAccountingProcessorForLoan implements AccountingProcessorF /** * Debit loan Portfolio and credit Fund source for a Disbursement
* - * All debits are turned into credits and vice versa in case of disbursement - * reversals + * All debits are turned into credits and vice versa in case of disbursement reversals * * * @param loanDTO @@ -182,13 +179,11 @@ public class CashBasedAccountingProcessorForLoan implements AccountingProcessorF } /** - * Create a single Debit to fund source and multiple credits if applicable - * (loan portfolio for principal repayments, Interest on loans for interest - * repayments, Income from fees for fees payment and Income from penalties - * for penalty payment) + * Create a single Debit to fund source and multiple credits if applicable (loan portfolio for principal repayments, + * Interest on loans for interest repayments, Income from fees for fees payment and Income from penalties for + * penalty payment) * - * In case the loan transaction is a reversal, all debits are turned into - * credits and vice versa + * In case the loan transaction is a reversal, all debits are turned into credits and vice versa */ private void createJournalEntriesForRepayments(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, final Office office) { @@ -256,11 +251,9 @@ public class CashBasedAccountingProcessorForLoan implements AccountingProcessorF } /** - * Create a single Debit to fund source and a single credit to "Income from - * Recovery" + * Create a single Debit to fund source and a single credit to "Income from Recovery" * - * In case the loan transaction is a reversal, all debits are turned into - * credits and vice versa + * In case the loan transaction is a reversal, all debits are turned into credits and vice versa */ private void createJournalEntriesForRecoveryRepayments(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, final Office office) { @@ -283,12 +276,10 @@ public class CashBasedAccountingProcessorForLoan implements AccountingProcessorF } /** - * Credit loan Portfolio and Debit Suspense Account for a Transfer - * Initiation. A Transfer acceptance would be treated the opposite i.e Debit - * Loan Portfolio and Credit Suspense Account
+ * Credit loan Portfolio and Debit Suspense Account for a Transfer Initiation. A Transfer acceptance would be + * treated the opposite i.e Debit Loan Portfolio and Credit Suspense Account
* - * All debits are turned into credits and vice versa in case of Transfer - * Initiation disbursals + * All debits are turned into credits and vice versa in case of Transfer Initiation disbursals * * * @param loanDTO diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForSavings.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForSavings.java index 6d57f7a6b..746ffe6e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForSavings.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForSavings.java @@ -146,8 +146,7 @@ public class CashBasedAccountingProcessorForSavings implements AccountingProcess savingsProductId, paymentTypeId, savingsId, transactionId, transactionDate, amount, isReversal); } /** - * Handle Interest Applications and reversals of Interest - * Applications + * Handle Interest Applications and reversals of Interest Applications **/ else if (savingsTransactionDTO.getTransactionType().isInterestPosting() && savingsTransactionDTO.isOverdraftTransaction()) { // Post journal entry if earned interest amount is greater than diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java index c121fd642..15295e0ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java @@ -226,8 +226,8 @@ public class JournalEntryWritePlatformServiceJpaRepositoryImpl implements Journa private void validateDebitOrCreditArrayForExistingGLAccount(final GLAccount glaccount, final SingleDebitOrCreditEntryCommand[] creditOrDebits) { /** - * If a glaccount is assigned for a rule the credits or debits array - * should have only one entry and it must be same as existing account + * If a glaccount is assigned for a rule the credits or debits array should have only one entry and it must be + * same as existing account */ if (creditOrDebits.length != 1) { throw new JournalEntryInvalidException(GlJournalEntryInvalidReason.INVALID_DEBIT_OR_CREDIT_ACCOUNTS, null, null, null); @@ -305,8 +305,7 @@ public class JournalEntryWritePlatformServiceJpaRepositoryImpl implements Journa private void validateGLAccountForTransaction(final GLAccount creditOrDebitAccountHead) { /*** - * validate that the account allows manual adjustments and is not - * disabled + * validate that the account allows manual adjustments and is not disabled **/ if (creditOrDebitAccountHead.isDisabled()) { throw new JournalEntryInvalidException(GlJournalEntryInvalidReason.GL_ACCOUNT_DISABLED, null, @@ -644,8 +643,8 @@ public class JournalEntryWritePlatformServiceJpaRepositoryImpl implements Journa } /** - * TODO: Need a better implementation with guaranteed uniqueness (but not a - * long UUID)...maybe something tied to system clock.. + * TODO: Need a better implementation with guaranteed uniqueness (but not a long UUID)...maybe something tied to + * system clock.. */ private String generateTransactionId(final Long officeId) { final AppUser user = this.context.authenticatedUser(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java index acc074034..1d6717be5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.producttoaccountmapping.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when product to GL account mapping are not - * found. + * A {@link RuntimeException} thrown when product to GL account mapping are not found. */ public class ProductToGLAccountMappingInvalidException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java index 35541be0d..7ea65125e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java @@ -22,8 +22,7 @@ import org.apache.fineract.accounting.producttoaccountmapping.domain.PortfolioPr import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when product to GL account mapping are not - * found. + * A {@link RuntimeException} thrown when product to GL account mapping are not found. */ public class ProductToGLAccountMappingNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java index 67f12f294..e53fb6059 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java @@ -47,25 +47,21 @@ import org.springframework.stereotype.Component; /** * TODO Vishwas find a better approach for validation * - * Currently, validation of the passed in JSON is done before calling save or - * update method on the target resource (in our case the loan Product) + * Currently, validation of the passed in JSON is done before calling save or update method on the target resource (in + * our case the loan Product) * - * However, in the case of a loan product it would be difficult to validate the - * passed in JSON for valid {@link LoanProduct} to {@link GLAccount} mappings - * during update because of the following scenario + * However, in the case of a loan product it would be difficult to validate the passed in JSON for valid + * {@link LoanProduct} to {@link GLAccount} mappings during update because of the following scenario * - * The accounting rule type may be changed in the update command, so we would - * have to validate if all required account heads for a particular account type - * have been passed in (would be different for CASH and Accrual based). However, - * till we have access to the domain object it would not be possible to detect - * if an accounting rule has actually been changed + * The accounting rule type may be changed in the update command, so we would have to validate if all required account + * heads for a particular account type have been passed in (would be different for CASH and Accrual based). However, + * till we have access to the domain object it would not be possible to detect if an accounting rule has actually been + * changed * - * Hence, method {@link #validateForLoanProductCreate(String)} from this class - * is called separately for validation only if an accounting rule change is - * detected by {@link ProductToGLAccountMappingWritePlatformService} + * Hence, method {@link #validateForLoanProductCreate(String)} from this class is called separately for validation only + * if an accounting rule change is detected by {@link ProductToGLAccountMappingWritePlatformService} * - * Also, the class is probably named wrong (*FromApiJsonDeserializer) should - * probably be named as (*Validator) instead + * Also, the class is probably named wrong (*FromApiJsonDeserializer) should probably be named as (*Validator) instead * */ @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/LoanProductToGLAccountMappingHelper.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/LoanProductToGLAccountMappingHelper.java index 8e6f2f59b..9dd074e89 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/LoanProductToGLAccountMappingHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/LoanProductToGLAccountMappingHelper.java @@ -212,8 +212,7 @@ public class LoanProductToGLAccountMappingHelper extends ProductToGLAccountMappi } /** - * Examines and updates each account mapping for given loan product with - * changes passed in from the Json element + * Examines and updates each account mapping for given loan product with changes passed in from the Json element * * @param loanProductId * @param changes diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java index d8c9fba3a..2db50c55f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java @@ -127,8 +127,8 @@ public class ProductToGLAccountMappingHelper { } /** - * Saves the payment type to Fund source mappings for a particular - * product/product type (also populates the changes array if passed in) + * Saves the payment type to Fund source mappings for a particular product/product type (also populates the changes + * array if passed in) * * @param command * @param element @@ -154,8 +154,8 @@ public class ProductToGLAccountMappingHelper { } /** - * Saves the Charge to Income / Liability account mappings for a particular - * product/product type (also populates the changes array if passed in) + * Saves the Charge to Income / Liability account mappings for a particular product/product type (also populates the + * changes array if passed in) * * @param command * @param element @@ -210,14 +210,12 @@ public class ProductToGLAccountMappingHelper { final JsonArray chargeToIncomeAccountMappingArray = this.fromApiJsonHelper.extractJsonArrayNamed(arrayFragmentName, element); /** - * Variable stores a map representation of charges (key) and their - * associated income Id's (value) extracted from the passed in - * Jsoncommand + * Variable stores a map representation of charges (key) and their associated income Id's (value) extracted from + * the passed in Jsoncommand **/ final Map inputChargeToIncomeAccountMap = new HashMap<>(); /*** - * Variable stores all charges which have already been mapped to Income - * Accounts in the system + * Variable stores all charges which have already been mapped to Income Accounts in the system **/ final Set existingCharges = new HashSet<>(); if (chargeToIncomeAccountMappingArray != null) { @@ -238,10 +236,8 @@ public class ProductToGLAccountMappingHelper { } /** * Else,
* update existing mappings OR
- * delete old mappings (which are already present, but not passed - * in as a part of Jsoncommand)
- * Create new mappings for charges that are passed in as a part of - * the Jsoncommand but not already present + * delete old mappings (which are already present, but not passed in as a part of Jsoncommand)
+ * Create new mappings for charges that are passed in as a part of the Jsoncommand but not already present * **/ else { @@ -296,13 +292,12 @@ public class ProductToGLAccountMappingHelper { final JsonArray paymentChannelMappingArray = this.fromApiJsonHelper .extractJsonArrayNamed(LoanProductAccountingParams.PAYMENT_CHANNEL_FUND_SOURCE_MAPPING.getValue(), element); /** - * Variable stores a map representation of Payment channels (key) and - * their fund sources (value) extracted from the passed in Jsoncommand + * Variable stores a map representation of Payment channels (key) and their fund sources (value) extracted from + * the passed in Jsoncommand **/ final Map inputPaymentChannelFundSourceMap = new HashMap<>(); /*** - * Variable stores all payment types which have already been mapped to - * Fund Sources in the system + * Variable stores all payment types which have already been mapped to Fund Sources in the system **/ final Set existingPaymentTypes = new HashSet<>(); if (paymentChannelMappingArray != null) { @@ -324,10 +319,9 @@ public class ProductToGLAccountMappingHelper { } /** * Else,
* update existing mappings OR
- * delete old mappings (which re already present, but not passed - * in as a part of Jsoncommand)
- * Create new mappings for payment types that are passed in as a - * part of the Jsoncommand but not already present + * delete old mappings (which re already present, but not passed in as a part of Jsoncommand)
+ * Create new mappings for payment types that are passed in as a part of the Jsoncommand but not already + * present * **/ else { @@ -388,8 +382,7 @@ public class ProductToGLAccountMappingHelper { GLAccount glAccount; /** - * Both CASH and Accrual placeholders have the same value for income - * from Interest and penalties + * Both CASH and Accrual placeholders have the same value for income from Interest and penalties **/ CashAccountsForLoan placeHolderAccountType; if (isPenalty) { @@ -415,8 +408,8 @@ public class ProductToGLAccountMappingHelper { } /** - * Fetches account with a particular Id and throws and Exception it is not - * of the expected Account Category ('ASSET','liability' etc) + * Fetches account with a particular Id and throws and Exception it is not of the expected Account Category + * ('ASSET','liability' etc) * * @param paramName * @param expectedAccountType diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java index 8d87f3f81..a745a280d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java @@ -288,16 +288,15 @@ public class ProductToGLAccountMappingWritePlatformServiceImpl implements Produc public Map updateLoanProductToGLAccountMapping(final Long loanProductId, final JsonCommand command, final boolean accountingRuleChanged, final int accountingRuleTypeId) { /*** - * Variable tracks all accounting mapping properties that have been - * updated + * Variable tracks all accounting mapping properties that have been updated ***/ Map changes = new HashMap<>(); final JsonElement element = this.fromApiJsonHelper.parse(command.json()); final AccountingRuleType accountingRuleType = AccountingRuleType.fromInt(accountingRuleTypeId); /*** - * If the accounting rule has been changed, delete all existing mapping - * for the product and recreate a new set of mappings + * If the accounting rule has been changed, delete all existing mapping for the product and recreate a new set + * of mappings ***/ if (accountingRuleChanged) { this.deserializer.validateForLoanProductCreate(command.json()); @@ -319,16 +318,15 @@ public class ProductToGLAccountMappingWritePlatformServiceImpl implements Produc public Map updateSavingsProductToGLAccountMapping(final Long savingsProductId, final JsonCommand command, final boolean accountingRuleChanged, final int accountingRuleTypeId, final DepositAccountType accountType) { /*** - * Variable tracks all accounting mapping properties that have been - * updated + * Variable tracks all accounting mapping properties that have been updated ***/ Map changes = new HashMap<>(); final JsonElement element = this.fromApiJsonHelper.parse(command.json()); final AccountingRuleType accountingRuleType = AccountingRuleType.fromInt(accountingRuleTypeId); /*** - * If the accounting rule has been changed, delete all existing mapping - * for the product and recreate a new set of mappings + * If the accounting rule has been changed, delete all existing mapping for the product and recreate a new set + * of mappings ***/ if (accountingRuleChanged) { this.deserializer.validateForSavingsProductCreate(command.json(), accountType); @@ -351,16 +349,15 @@ public class ProductToGLAccountMappingWritePlatformServiceImpl implements Produc public Map updateShareProductToGLAccountMapping(final Long shareProductId, final JsonCommand command, final boolean accountingRuleChanged, final int accountingRuleTypeId) { /*** - * Variable tracks all accounting mapping properties that have been - * updated + * Variable tracks all accounting mapping properties that have been updated ***/ Map changes = new HashMap<>(); final JsonElement element = this.fromApiJsonHelper.parse(command.json()); final AccountingRuleType accountingRuleType = AccountingRuleType.fromInt(accountingRuleTypeId); /*** - * If the accounting rule has been changed, delete all existing mapping - * for the product and recreate a new set of mappings + * If the accounting rule has been changed, delete all existing mapping for the product and recreate a new set + * of mappings ***/ if (accountingRuleChanged) { this.shareProductToGLAccountMappingHelper.deleteSharesProductToGLAccountMapping(shareProductId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java index 0fd9f9e28..37a4dc8f0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java @@ -177,8 +177,7 @@ public class SavingsProductToGLAccountMappingHelper extends ProductToGLAccountMa } /** - * Examines and updates each account mapping for given loan product with - * changes passed in from the Json element + * Examines and updates each account mapping for given loan product with changes passed in from the Json element * * @param savingsProductId * @param changes diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java index be609103c..0ec048330 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java @@ -154,8 +154,7 @@ public class ShareProductToGLAccountMappingHelper extends ProductToGLAccountMapp } /** - * Examines and updates each account mapping for given loan product with - * changes passed in from the Json element + * Examines and updates each account mapping for given loan product with changes passed in from the Json element * * @param sharesProductId * @param changes diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/data/AccountingRuleData.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/data/AccountingRuleData.java index 655e60888..70cc8e7f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/data/AccountingRuleData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/data/AccountingRuleData.java @@ -29,8 +29,7 @@ import org.apache.fineract.organisation.office.data.OfficeData; /** * Immutable object representing a General Ledger Account * - * Note: no getter/setters required as google-gson will produce json from fields - * of object. + * Note: no getter/setters required as google-gson will produce json from fields of object. */ public class AccountingRuleData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDuplicateException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDuplicateException.java index 7cd76a28f..6bc678f07 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDuplicateException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDuplicateException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.rule.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when an Accounting rule with a given name - * already exists + * A {@link RuntimeException} thrown when an Accounting rule with a given name already exists */ public class AccountingRuleDuplicateException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleNotFoundException.java index 293679931..0768b46a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.accounting.rule.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when Accounting rule resources are not - * found. + * A {@link RuntimeException} thrown when Accounting rule resources are not found. */ public class AccountingRuleNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocApiResource.java index 4bf684207..5daf44e6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocApiResource.java @@ -59,8 +59,7 @@ import org.springframework.stereotype.Component; public class AdHocApiResource { /** - * The set of parameters that are supported in response for - * {@link AdhocData} + * The set of parameters that are supported in response for {@link AdhocData} */ private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "query", "tableName", "tableField", "isActive", "createdBy", "createdOn", "createdById", "updatedById", "updatedOn", "email")); diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocDataValidator.java index bdf513e27..08930ea4d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocDataValidator.java @@ -139,12 +139,9 @@ public final class AdHocDataValidator { baseDataValidator.reset().parameter("reportRunEvery").value(reportRunEvery).integerGreaterThanZero(); } /* - * if (this.fromApiJsonHelper.parameterExists("isActive", element)) { - * final Integer isActive = - * this.fromApiJsonHelper.extractIntegerNamed("isActive", element, - * Locale.getDefault()); - * baseDataValidator.reset().parameter("isActive").value(isActive). - * notNull().inMinMaxRange(1, 2); } + * if (this.fromApiJsonHelper.parameterExists("isActive", element)) { final Integer isActive = + * this.fromApiJsonHelper.extractIntegerNamed("isActive", element, Locale.getDefault()); + * baseDataValidator.reset().parameter("isActive").value(isActive). notNull().inMinMaxRange(1, 2); } */ throwExceptionIfValidationWarningsExist(dataValidationErrors); diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformServiceJpaRepositoryImpl.java index beeefa9ee..cd5861276 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformServiceJpaRepositoryImpl.java @@ -73,8 +73,7 @@ public class AdHocWritePlatformServiceJpaRepositoryImpl implements AdHocWritePla } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final DataIntegrityViolationException dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java index 3a7ecd668..2cf855314 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java @@ -50,12 +50,10 @@ import org.springframework.stereotype.Component; /** * Provides a REST resource for Batch Requests. This class acts as a proxy to - * {@link org.apache.fineract.batch.service.BatchApiService} and de-serializes - * the incoming JSON string to a list of - * {@link org.apache.fineract.batch.domain .BatchRequest} type. This list is - * forwarded to BatchApiService which finally returns a list of - * {@link org.apache.fineract.batch.domain.BatchResponse} type which is then - * serialized into JSON response by this Resource class. + * {@link org.apache.fineract.batch.service.BatchApiService} and de-serializes the incoming JSON string to a list of + * {@link org.apache.fineract.batch.domain .BatchRequest} type. This list is forwarded to BatchApiService which finally + * returns a list of {@link org.apache.fineract.batch.domain.BatchResponse} type which is then serialized into JSON + * response by this Resource class. * * @author Rishabh Shukla * @@ -83,8 +81,7 @@ public class BatchApiResource { private final BatchRequestJsonHelper batchRequestJsonHelper; /** - * Constructs a 'BatchApiService' with context, toApiJsonSerializer, service - * and batchRequestJsonHelper. + * Constructs a 'BatchApiService' with context, toApiJsonSerializer, service and batchRequestJsonHelper. * * @param context * @param toApiJsonSerializer @@ -102,8 +99,7 @@ public class BatchApiResource { } /** - * Rest assured POST method to get {@link BatchRequest} and returns back the - * consolidated {@link BatchResponse} + * Rest assured POST method to get {@link BatchRequest} and returns back the consolidated {@link BatchResponse} * * @param jsonRequestString * @param enclosingTransaction diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandContext.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandContext.java index 5ee2dc361..010943a57 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandContext.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandContext.java @@ -19,10 +19,8 @@ package org.apache.fineract.batch.command; /** - * Provides an object to - * {@link org.apache.fineract.batch.service.BatchApiService} to get the proper - * commandStrategy for each request in BatchRequest. It uses Builder pattern to - * create object of this type. + * Provides an object to {@link org.apache.fineract.batch.service.BatchApiService} to get the proper commandStrategy for + * each request in BatchRequest. It uses Builder pattern to create object of this type. * * @author Rishabh Shukla * @@ -69,9 +67,8 @@ public final class CommandContext { } /** - * Returns a boolean value if the relativeUrl 'matches' one of the regex - * keys in the available commandStrategies. It take CommandContext object as - * parameter which contains a 'resource' member as a regex key for available + * Returns a boolean value if the relativeUrl 'matches' one of the regex keys in the available commandStrategies. It + * take CommandContext object as parameter which contains a 'resource' member as a regex key for available * commandStrategies. * * @param other diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandStrategy.java index 01fa6edfc..62cf78903 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandStrategy.java @@ -23,8 +23,8 @@ import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; /** - * An interface for various Command Strategies. It contains a single function - * which returns appropriate response from a particular command strategy. + * An interface for various Command Strategies. It contains a single function which returns appropriate response from a + * particular command strategy. * * @author Rishabh Shukla * @@ -33,10 +33,8 @@ import org.apache.fineract.batch.domain.BatchResponse; public interface CommandStrategy { /** - * Returns an object of type - * {@link org.apache.fineract.batch.domain.BatchResponse}. This takes - * {@link org.apache.fineract.batch.domain.BatchRequest} as it's single - * argument and provides appropriate response. + * Returns an object of type {@link org.apache.fineract.batch.domain.BatchResponse}. This takes + * {@link org.apache.fineract.batch.domain.BatchRequest} as it's single argument and provides appropriate response. * * @param batchRequest * @param uriInfo diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java index 4aa4301cd..47877d7d1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java @@ -25,8 +25,8 @@ import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; /** - * Provides an appropriate CommandStrategy using the 'method' and 'resourceUrl'. - * CommandStrategy bean is created using Spring Application Context. + * Provides an appropriate CommandStrategy using the 'method' and 'resourceUrl'. CommandStrategy bean is created using + * Spring Application Context. * * @author Rishabh Shukla * @@ -39,9 +39,8 @@ public class CommandStrategyProvider { private final ConcurrentHashMap commandStrategies = new ConcurrentHashMap<>(); /** - * Constructs a CommandStrategyProvider with argument of ApplicationContext - * type. It also initialize commandStrategies using init() function by - * filling it with available CommandStrategies in + * Constructs a CommandStrategyProvider with argument of ApplicationContext type. It also initialize + * commandStrategies using init() function by filling it with available CommandStrategies in * {@link org.apache.fineract.batch.command.internal}. * * @param applicationContext @@ -56,9 +55,8 @@ public class CommandStrategyProvider { } /** - * Returns an appropriate commandStrategy after determining it using the - * CommandContext of the request. If no such Strategy is found then a - * default strategy is returned back. + * Returns an appropriate commandStrategy after determining it using the CommandContext of the request. If no such + * Strategy is found then a default strategy is returned back. * * @param commandContext * @return CommandStrategy @@ -80,10 +78,8 @@ public class CommandStrategyProvider { } /** - * Contains various available command strategies in - * {@link org.apache.fineract.batch.command.internal}. Any new command - * Strategy will have to be added within this function in order to initiate - * it within the constructor. + * Contains various available command strategies in {@link org.apache.fineract.batch.command.internal}. Any new + * command Strategy will have to be added within this function in order to initiate it within the constructor. */ private void init() { this.commandStrategies.put(CommandContext.resource("clients").method("POST").build(), "createClientCommandStrategy"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ActivateClientCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ActivateClientCommandStrategy.java index 1d8dadff2..934641ee8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ActivateClientCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ActivateClientCommandStrategy.java @@ -31,13 +31,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link org.apache.fineract.batch.command.CommandStrategy} to - * handle activation of a pending client. It passes the contents of the body - * from the BatchRequest to - * {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and gets - * back the response. This class will also catch any errors raised by - * {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and map - * those errors to appropriate status codes in BatchResponse. + * Implements {@link org.apache.fineract.batch.command.CommandStrategy} to handle activation of a pending client. It + * passes the contents of the body from the BatchRequest to + * {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and gets back the response. This class will also + * catch any errors raised by {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and map those errors + * to appropriate status codes in BatchResponse. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplyLoanCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplyLoanCommandStrategy.java index 49142b2de..5d5b1b851 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplyLoanCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplyLoanCommandStrategy.java @@ -29,13 +29,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and - * applies a new loan on an existing client. It passes the contents of the body - * from the BatchRequest to - * {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and - * gets back the response. This class will also catch any errors raised by - * {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and - * map those errors to appropriate status codes in BatchResponse. + * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and applies a new loan on an existing client. It + * passes the contents of the body from the BatchRequest to + * {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and gets back the response. This class will + * also catch any errors raised by {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and map those + * errors to appropriate status codes in BatchResponse. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplySavingsCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplySavingsCommandStrategy.java index 042a5e9a1..e7a5df0ea 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplySavingsCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplySavingsCommandStrategy.java @@ -29,13 +29,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and - * applies a new savings on an existing client. It passes the contents of the - * body from the BatchRequest to - * {@link org.apache.fineract.portfolio.savings.api.SavingsAccountsApiResource} - * and gets back the response. This class will also catch any errors raised by - * {@link org.apache.fineract.portfolio.savings.api.SavingsAccountsApiResource} - * and map those errors to appropriate status codes in BatchResponse. + * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and applies a new savings on an existing client. + * It passes the contents of the body from the BatchRequest to + * {@link org.apache.fineract.portfolio.savings.api.SavingsAccountsApiResource} and gets back the response. This class + * will also catch any errors raised by {@link org.apache.fineract.portfolio.savings.api.SavingsAccountsApiResource} and + * map those errors to appropriate status codes in BatchResponse. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanCommandStrategy.java index 5b5ad34c3..111e1f720 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanCommandStrategy.java @@ -31,13 +31,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link org.apache.fineract.batch.command.CommandStrategy} to - * handle approval of a pending loan. It passes the contents of the body from - * the BatchRequest to - * {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and - * gets back the response. This class will also catch any errors raised by - * {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and - * map those errors to appropriate status codes in BatchResponse. + * Implements {@link org.apache.fineract.batch.command.CommandStrategy} to handle approval of a pending loan. It passes + * the contents of the body from the BatchRequest to + * {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and gets back the response. This class will + * also catch any errors raised by {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and map those + * errors to appropriate status codes in BatchResponse. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesCommandStrategy.java index 197d6dde2..4fdebcccd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesCommandStrategy.java @@ -31,13 +31,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and - * Collect Charges for a Loan. It passes the contents of the body from the - * BatchRequest to - * {@link org.apache.fineract.portfolio.loanaccount.api.LoanChargesApiResource} - * and gets back the response. This class will also catch any errors raised by - * {@link org.apache.fineract.portfolio.loanaccount.api.LoanChargesApiResource} - * and map those errors to appropriate status codes in BatchResponse. + * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and Collect Charges for a Loan. It passes the + * contents of the body from the BatchRequest to + * {@link org.apache.fineract.portfolio.loanaccount.api.LoanChargesApiResource} and gets back the response. This class + * will also catch any errors raised by {@link org.apache.fineract.portfolio.loanaccount.api.LoanChargesApiResource} and + * map those errors to appropriate status codes in BatchResponse. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeCommandStrategy.java index 39b186750..479f02d63 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeCommandStrategy.java @@ -31,13 +31,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and - * Create Charge for a Loan. It passes the contents of the body from the - * BatchRequest to - * {@link org.apache.fineract.portfolio.loanaccount.api.LoanChargesApiResource} - * and gets back the response. This class will also catch any errors raised by - * {@link org.apache.fineract.portfolio.loanaccount.api.LoanChargesApiResource} - * and map those errors to appropriate status codes in BatchResponse. + * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and Create Charge for a Loan. It passes the + * contents of the body from the BatchRequest to + * {@link org.apache.fineract.portfolio.loanaccount.api.LoanChargesApiResource} and gets back the response. This class + * will also catch any errors raised by {@link org.apache.fineract.portfolio.loanaccount.api.LoanChargesApiResource} and + * map those errors to appropriate status codes in BatchResponse. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateClientCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateClientCommandStrategy.java index d599212d7..400258964 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateClientCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateClientCommandStrategy.java @@ -29,13 +29,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link org.apache.fineract.batch.command.CommandStrategy} to - * handle creation of a new client. It passes the contents of the body from the - * BatchRequest to - * {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and gets - * back the response. This class will also catch any errors raised by - * {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and map - * those errors to appropriate status codes in BatchResponse. + * Implements {@link org.apache.fineract.batch.command.CommandStrategy} to handle creation of a new client. It passes + * the contents of the body from the BatchRequest to {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} + * and gets back the response. This class will also catch any errors raised by + * {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and map those errors to appropriate status codes + * in BatchResponse. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DisburseLoanCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DisburseLoanCommandStrategy.java index f9074c1ca..0ac7d829f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DisburseLoanCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DisburseLoanCommandStrategy.java @@ -31,13 +31,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link org.apache.fineract.batch.command.CommandStrategy} to - * handle disburse of a loan. It passes the contents of the body from the - * BatchRequest to - * {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and - * gets back the response. This class will also catch any errors raised by - * {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and - * map those errors to appropriate status codes in BatchResponse. + * Implements {@link org.apache.fineract.batch.command.CommandStrategy} to handle disburse of a loan. It passes the + * contents of the body from the BatchRequest to {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} + * and gets back the response. This class will also catch any errors raised by + * {@link org.apache.fineract.portfolio.loanaccount.api.LoansApiResource} and map those errors to appropriate status + * codes in BatchResponse. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/RepayLoanCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/RepayLoanCommandStrategy.java index f0b0194f6..65c88010f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/RepayLoanCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/RepayLoanCommandStrategy.java @@ -31,11 +31,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link CommandStrategy} and handles repayment for a Loan. It - * passes the contents of the body from the BatchRequest to - * {@link LoanTransactionsApiResource} and gets back the response. This class - * will also catch any errors raised by {@link LoanTransactionsApiResource} and - * map those errors to appropriate status codes in BatchResponse. + * Implements {@link CommandStrategy} and handles repayment for a Loan. It passes the contents of the body from the + * BatchRequest to {@link LoanTransactionsApiResource} and gets back the response. This class will also catch any errors + * raised by {@link LoanTransactionsApiResource} and map those errors to appropriate status codes in BatchResponse. * * @author Mohit Sinha * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UnknownCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UnknownCommandStrategy.java index d19dc5d25..e76857dcd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UnknownCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UnknownCommandStrategy.java @@ -25,9 +25,8 @@ import org.apache.fineract.batch.domain.BatchResponse; import org.springframework.stereotype.Component; /** - * Provides a default CommandStrategy by implementing - * {@link org.apache.fineract.batch.command.CommandStrategy} in case there is no - * appropriate command strategy with requested 'method' and 'resoureUrl'. + * Provides a default CommandStrategy by implementing {@link org.apache.fineract.batch.command.CommandStrategy} in case + * there is no appropriate command strategy with requested 'method' and 'resoureUrl'. * * @author Rishabh Shukla */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateClientCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateClientCommandStrategy.java index 470a63e5c..e09ea4c4b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateClientCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateClientCommandStrategy.java @@ -29,13 +29,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and - * updates the information of an existing client. It passes the contents of the - * body from the BatchRequest to - * {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and gets - * back the response. This class will also catch any errors raised by - * {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and map - * those errors to appropriate status codes in BatchResponse. + * Implements {@link org.apache.fineract.batch.command.CommandStrategy} and updates the information of an existing + * client. It passes the contents of the body from the BatchRequest to + * {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and gets back the response. This class will also + * catch any errors raised by {@link org.apache.fineract.portfolio.client.api.ClientsApiResource} and map those errors + * to appropriate status codes in BatchResponse. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/domain/BatchRequest.java b/fineract-provider/src/main/java/org/apache/fineract/batch/domain/BatchRequest.java index b5a48ecc1..c172cd64a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/domain/BatchRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/domain/BatchRequest.java @@ -21,10 +21,9 @@ package org.apache.fineract.batch.domain; import java.util.Set; /** - * Provides an object for separate HTTP requests in the Batch Request for Batch - * API. A requestId is also included as data field which takes care of - * dependency issues among various requests. This class also provides getter and - * setter functions to access Batch Request data fields. + * Provides an object for separate HTTP requests in the Batch Request for Batch API. A requestId is also included as + * data field which takes care of dependency issues among various requests. This class also provides getter and setter + * functions to access Batch Request data fields. * * @author Rishabh Shukla * @@ -41,8 +40,8 @@ public class BatchRequest { private String body; /** - * Constructs a 'BatchRequest' with requestId, relativeUrl, method, headers, - * reference and body of the incoming request. + * Constructs a 'BatchRequest' with requestId, relativeUrl, method, headers, reference and body of the incoming + * request. * * @param requestId * of HTTP request. @@ -131,8 +130,7 @@ public class BatchRequest { } /** - * Returns the values of 'headers' of {@link Header} type of an object of - * this class. + * Returns the values of 'headers' of {@link Header} type of an object of this class. * * @return headers of the HTTP request. * @see Header @@ -142,8 +140,7 @@ public class BatchRequest { } /** - * Sets the values of 'headers' of {@link Header} type of an object of this - * class. + * Sets the values of 'headers' of {@link Header} type of an object of this class. * * @param headers * @see Header diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/domain/BatchResponse.java b/fineract-provider/src/main/java/org/apache/fineract/batch/domain/BatchResponse.java index faf83b649..73cbb8bf7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/domain/BatchResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/domain/BatchResponse.java @@ -21,10 +21,9 @@ package org.apache.fineract.batch.domain; import java.util.Set; /** - * Provides an object for separate HTTP responses in the Batch Response for - * Batch API. It contains all the information about a particular HTTP response - * in the Batch Response. Getter and Setter functions are also included to - * access response data fields. + * Provides an object for separate HTTP responses in the Batch Response for Batch API. It contains all the information + * about a particular HTTP response in the Batch Response. Getter and Setter functions are also included to access + * response data fields. * * @author Rishabh Shukla * @@ -40,8 +39,7 @@ public class BatchResponse { private String body; /** - * Constructs a 'BatchResponse' with requestId, statusCode, headers and body - * of the HTTP requests. + * Constructs a 'BatchResponse' with requestId, statusCode, headers and body of the HTTP requests. * * @param requestId * @param statusCode @@ -110,8 +108,7 @@ public class BatchResponse { } /** - * Sets the value of 'headers' of {@link Header} type of an object of this - * class. + * Sets the value of 'headers' of {@link Header} type of an object of this class. * * @param headers * of {@link Header} Type diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/domain/Header.java b/fineract-provider/src/main/java/org/apache/fineract/batch/domain/Header.java index a3c029efe..48b61c6ba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/domain/Header.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/domain/Header.java @@ -19,9 +19,8 @@ package org.apache.fineract.batch.domain; /** - * Provides an object to handle HTTP headers as name and value pairs for Batch - * API. It is used in {@link BatchRequest} and {@link BatchResponse} to store - * the information regarding the headers in incoming and outgoing JSON Strings. + * Provides an object to handle HTTP headers as name and value pairs for Batch API. It is used in {@link BatchRequest} + * and {@link BatchResponse} to store the information regarding the headers in incoming and outgoing JSON Strings. * * @author Rishabh Shukla * diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/exception/ErrorHandler.java b/fineract-provider/src/main/java/org/apache/fineract/batch/exception/ErrorHandler.java index 9bf21ea61..df4d37b0c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/exception/ErrorHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/exception/ErrorHandler.java @@ -38,11 +38,9 @@ import org.springframework.dao.NonTransientDataAccessException; import org.springframework.transaction.TransactionException; /** - * Provides an Error Handler method that returns an object of type - * {@link ErrorInfo} to the CommandStrategy which raised the exception. This - * class uses various subclasses of RuntimeException to check the kind of - * exception raised and provide appropriate status and error codes for each one - * of the raised exception. + * Provides an Error Handler method that returns an object of type {@link ErrorInfo} to the CommandStrategy which raised + * the exception. This class uses various subclasses of RuntimeException to check the kind of exception raised and + * provide appropriate status and error codes for each one of the raised exception. * * @author Rishabh Shukla * @@ -61,8 +59,7 @@ public class ErrorHandler extends RuntimeException { } /** - * Returns an object of ErrorInfo type containing the information regarding - * the raised error. + * Returns an object of ErrorInfo type containing the information regarding the raised error. * * @param exception * @return ErrorInfo diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/exception/ErrorInfo.java b/fineract-provider/src/main/java/org/apache/fineract/batch/exception/ErrorInfo.java index f1d34f003..f9d79913d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/exception/ErrorInfo.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/exception/ErrorInfo.java @@ -19,8 +19,7 @@ package org.apache.fineract.batch.exception; /** - * Provides members to hold the basic information about the exceptions raised in - * commandStrategy classes. + * Provides members to hold the basic information about the exceptions raised in commandStrategy classes. * * @author Rishabh Shukla * @@ -90,8 +89,7 @@ public final class ErrorInfo { } /** - * Getter method to provide the message of the error for an object of this - * type. + * Getter method to provide the message of the error for an object of this type. * * @return String */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/serialization/BatchRequestJsonHelper.java b/fineract-provider/src/main/java/org/apache/fineract/batch/serialization/BatchRequestJsonHelper.java index d2067650b..42071bb0f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/serialization/BatchRequestJsonHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/serialization/BatchRequestJsonHelper.java @@ -26,10 +26,8 @@ import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.springframework.stereotype.Component; /** - * Extends - * {@link org.apache.fineract.infrastructure.core.serialization.FromJsonHelper} - * to de-serialize the incoming String into a JSON List of type - * {@link org.apache.fineract.batch.domain.BatchRequest} + * Extends {@link org.apache.fineract.infrastructure.core.serialization.FromJsonHelper} to de-serialize the incoming + * String into a JSON List of type {@link org.apache.fineract.batch.domain.BatchRequest} * * @author Rishabh Shukla * @@ -40,8 +38,7 @@ import org.springframework.stereotype.Component; public class BatchRequestJsonHelper extends FromJsonHelper { /** - * Returns a list of batchRequests after de-serializing it from the input - * JSON string. + * Returns a list of batchRequests after de-serializing it from the input JSON string. * * @param json * @return List<BatchRequest> diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/service/BatchApiService.java b/fineract-provider/src/main/java/org/apache/fineract/batch/service/BatchApiService.java index e9d83f88f..ea387f007 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/service/BatchApiService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/service/BatchApiService.java @@ -24,8 +24,7 @@ import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; /** - * Provides an interface for service class, that implements the method to handle - * separate Batch Requests. + * Provides an interface for service class, that implements the method to handle separate Batch Requests. * * @author Rishabh Shukla * @@ -36,10 +35,9 @@ import org.apache.fineract.batch.domain.BatchResponse; public interface BatchApiService { /** - * Returns a list of {@link org.apache.fineract.batch.domain.BatchResponse}s - * by getting the appropriate CommandStrategy for every - * {@link org.apache.fineract.batch.domain.BatchRequest}. It will be used - * when the Query Parameter "enclosingTransaction "is set to 'false'. + * Returns a list of {@link org.apache.fineract.batch.domain.BatchResponse}s by getting the appropriate + * CommandStrategy for every {@link org.apache.fineract.batch.domain.BatchRequest}. It will be used when the Query + * Parameter "enclosingTransaction "is set to 'false'. * * @param requestList * @param uriInfo @@ -48,12 +46,10 @@ public interface BatchApiService { List handleBatchRequestsWithoutEnclosingTransaction(List requestList, UriInfo uriInfo); /** - * returns a list of {@link org.apache.fineract.batch.domain.BatchResponse}s - * by getting the appropriate CommandStrategy for every - * {@link org.apache.fineract.batch.domain.BatchRequest}. It will be used - * when the Query Parameter "enclosingTransaction "is set to 'true'. If one - * or more of the requests are not completed properly then whole of the - * transaction will be rolled back properly. + * returns a list of {@link org.apache.fineract.batch.domain.BatchResponse}s by getting the appropriate + * CommandStrategy for every {@link org.apache.fineract.batch.domain.BatchRequest}. It will be used when the Query + * Parameter "enclosingTransaction "is set to 'true'. If one or more of the requests are not completed properly then + * whole of the transaction will be rolled back properly. * * @param requestList * @param uriInfo diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/service/BatchApiServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/batch/service/BatchApiServiceImpl.java index c6b0378af..b04d7397b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/service/BatchApiServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/service/BatchApiServiceImpl.java @@ -44,9 +44,8 @@ import org.springframework.transaction.support.TransactionCallback; import org.springframework.transaction.support.TransactionTemplate; /** - * Implementation for {@link BatchApiService} to iterate through all the - * incoming requests and obtain the appropriate CommandStrategy from - * CommandStrategyProvider. + * Implementation for {@link BatchApiService} to iterate through all the incoming requests and obtain the appropriate + * CommandStrategy from CommandStrategyProvider. * * @author Rishabh Shukla * @@ -78,10 +77,8 @@ public class BatchApiServiceImpl implements BatchApiService { } /** - * Returns the response list by getting a proper - * {@link org.apache.fineract.batch.command.CommandStrategy}. execute() - * method of acquired commandStrategy is then provided with the separate - * Request. + * Returns the response list by getting a proper {@link org.apache.fineract.batch.command.CommandStrategy}. + * execute() method of acquired commandStrategy is then provided with the separate Request. * * @param requestList * @param uriInfo diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java b/fineract-provider/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java index ecd58b3f2..0ad028f8e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java @@ -34,9 +34,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Provides methods to create dependency map among the various batchRequests. It - * also provides method that takes care of dependency resolution among related - * requests. + * Provides methods to create dependency map among the various batchRequests. It also provides method that takes care of + * dependency resolution among related requests. * * @author Rishabh Shukla * @see BatchApiServiceImpl @@ -85,10 +84,9 @@ public class ResolutionHelper { } /** - * Returns a map containing requests that are divided in accordance of - * dependency relations among them. Each different list is identified with a - * "Key" which is the "requestId" of the request at topmost level in - * dependency hierarchy of that particular list. + * Returns a map containing requests that are divided in accordance of dependency relations among them. Each + * different list is identified with a "Key" which is the "requestId" of the request at topmost level in dependency + * hierarchy of that particular list. * * @param batchRequests * @return List<ArrayList<BatchRequestNode>> @@ -122,10 +120,8 @@ public class ResolutionHelper { } /** - * Returns a BatchRequest after dependency resolution. It takes a request - * and the response of the request it is dependent upon as its arguments and - * change the body or relativeUrl of the request according to parent - * Request. + * Returns a BatchRequest after dependency resolution. It takes a request and the response of the request it is + * dependent upon as its arguments and change the body or relativeUrl of the request according to parent Request. * * @param request * @param parentResponse diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/annotation/CommandType.java b/fineract-provider/src/main/java/org/apache/fineract/commands/annotation/CommandType.java index 351c07fb3..96a2919fb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/annotation/CommandType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/annotation/CommandType.java @@ -27,8 +27,7 @@ import java.lang.annotation.Target; /** * Specifies the command type for the annotated class.
*
- * The entity name (e.g. CLIENT, SAVINGSACCOUNT, LOANPRODUCT) and the action - * (e.g. CREATE, DELETE) must be given. + * The entity name (e.g. CLIENT, SAVINGSACCOUNT, LOANPRODUCT) and the action (e.g. CREATE, DELETE) must be given. * * @author Markus Geiss * @version 1.0 diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/exception/RollbackTransactionAsCommandIsNotApprovedByCheckerException.java b/fineract-provider/src/main/java/org/apache/fineract/commands/exception/RollbackTransactionAsCommandIsNotApprovedByCheckerException.java index 71fea23fb..b7172efee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/exception/RollbackTransactionAsCommandIsNotApprovedByCheckerException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/exception/RollbackTransactionAsCommandIsNotApprovedByCheckerException.java @@ -23,15 +23,12 @@ import org.apache.fineract.commands.domain.CommandSource; public class RollbackTransactionAsCommandIsNotApprovedByCheckerException extends RuntimeException { /** - * When maker-checker is configured globally and also for the current - * transaction. + * When maker-checker is configured globally and also for the current transaction. * - * An initial save determines if there are any integrity rule or data - * problems. + * An initial save determines if there are any integrity rule or data problems. * - * If there isn't... and the transaction is from a maker... then this roll - * back is issued and the commandSourceResult is used to write the audit - * entry. + * If there isn't... and the transaction is from a maker... then this roll back is issued and the + * commandSourceResult is used to write the audit entry. */ private final CommandSource commandSourceResult; diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/exception/UnsupportedCommandException.java b/fineract-provider/src/main/java/org/apache/fineract/commands/exception/UnsupportedCommandException.java index 67e8c8cbd..e4b3d4972 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/exception/UnsupportedCommandException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/exception/UnsupportedCommandException.java @@ -19,8 +19,8 @@ package org.apache.fineract.commands.exception; /** - * A {@link RuntimeException} that is thrown in the case where an invalid or - * unknown command is attempted to be processed by platform. + * A {@link RuntimeException} that is thrown in the case where an invalid or unknown command is attempted to be + * processed by platform. */ public class UnsupportedCommandException extends RuntimeException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/provider/CommandHandlerProvider.java b/fineract-provider/src/main/java/org/apache/fineract/commands/provider/CommandHandlerProvider.java index 1f9404847..260bd5eed 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/provider/CommandHandlerProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/provider/CommandHandlerProvider.java @@ -34,12 +34,10 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * {@link CommandHandlerProvider} provides {@link NewCommandSourceHandler}s for - * a given entity and action.
+ * {@link CommandHandlerProvider} provides {@link NewCommandSourceHandler}s for a given entity and action.
*
- * A {@link NewCommandSourceHandler} can be registered and the annotation - * {@link CommandType} is used to determine the entity and the action the - * handler is capable to process. + * A {@link NewCommandSourceHandler} can be registered and the annotation {@link CommandType} is used to determine the + * entity and the action the handler is capable to process. * * @author Markus Geiss * @version 1.0 @@ -63,8 +61,8 @@ public class CommandHandlerProvider implements ApplicationContextAware { /** * Returns a handler for the given entity and action.
*
- * Throws an {@link UnsupportedCommandException} if no handler for the given - * entity, action combination can be found. + * Throws an {@link UnsupportedCommandException} if no handler for the given entity, action combination can be + * found. * * @param entity * the entity to lookup the handler, must be given. diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java index b9804f494..aea732f6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java @@ -99,8 +99,7 @@ public class PortfolioCommandSourceWritePlatformServiceImpl implements Portfolio } catch (CannotAcquireLockException | ObjectOptimisticLockingFailureException exception) { LOG.info("The following command {} has been retried {} time(s)", command.json(), numberOfRetries); /*** - * Fail if the transaction has been retired for - * maxNumberOfRetries + * Fail if the transaction has been retired for maxNumberOfRetries **/ if (numberOfRetries >= maxNumberOfRetries) { LOG.warn("The following command {} has been retried for the max allowed attempts of {} and will be rolled back", @@ -108,8 +107,7 @@ public class PortfolioCommandSourceWritePlatformServiceImpl implements Portfolio throw (exception); } /*** - * Else sleep for a random time (between 1 to 10 seconds) and - * continue + * Else sleep for a random time (between 1 to 10 seconds) and continue **/ try { Random random = new Random(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java b/fineract-provider/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java index f0334107a..d519ae7ad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java @@ -111,15 +111,13 @@ public class SynchronousCommandProcessingService implements CommandProcessingSer if ((rollbackTransaction || result.isRollbackTransaction()) && !isApprovedByChecker) { /* - * JournalEntry will generate a new transactionId every time. - * Updating the transactionId with old transactionId, because as - * there are no entries are created with new transactionId, will - * throw an error when checker approves the transaction + * JournalEntry will generate a new transactionId every time. Updating the transactionId with old + * transactionId, because as there are no entries are created with new transactionId, will throw an error + * when checker approves the transaction */ commandSourceResult.updateTransaction(command.getTransactionId()); /* - * Update CommandSource json data with JsonCommand json data, line - * 77 and 81 may update the json data + * Update CommandSource json data with JsonCommand json data, line 77 and 81 may update the json data */ commandSourceResult.updateJsonTo(command.json()); throw new RollbackTransactionAsCommandIsNotApprovedByCheckerException(commandSourceResult); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java index d17a6f948..6be6da94b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java @@ -80,10 +80,8 @@ public class AccountNumberFormatDataValidator { .parameter(AccountNumberFormatConstants.prefixTypeParamName).value(prefixType).notNull().integerGreaterThanZero(); /** - * Permitted values for prefix type vary based on the actual - * selected accountType, carry out this validation only if data - * validation errors do not exist for both entity type and prefix - * type + * Permitted values for prefix type vary based on the actual selected accountType, carry out this validation + * only if data validation errors do not exist for both entity type and prefix type **/ boolean areAccountTypeAndPrefixTypeValid = true; for (ApiParameterError apiParameterError : dataValidationErrors) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatConstants.java index 2eb9fa6c3..9054a2564 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatConstants.java @@ -46,9 +46,8 @@ public class AccountNumberFormatConstants { public static final String prefixTypeOptionsParamName = "prefixTypeOptions"; /** - * These parameters will match the class level parameters of - * {@link AccountNumberFormatData}. Where possible, we try to get response - * parameters to match those of request parameters. + * These parameters will match the class level parameters of {@link AccountNumberFormatData}. Where possible, we try + * to get response parameters to match those of request parameters. */ // Error messages codes diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java index b2310b5f9..d79fe7c8a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java @@ -111,9 +111,8 @@ public class AccountNumberFormatReadPlatformServiceImpl implements AccountNumber Map> accountNumberPrefixTypeOptions = new HashMap<>(); /*** - * If an Account type is passed in, return prefixes only for the passed - * in account type, else return all allowed prefixes keyed by all - * possible entity type + * If an Account type is passed in, return prefixes only for the passed in account type, else return all allowed + * prefixes keyed by all possible entity type **/ if (entityAccountTypeForTemplate != null) { determinePrefixTypesForAccounts(accountNumberPrefixTypeOptions, entityAccountTypeForTemplate); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java index 84fcfe65d..1cea111a2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java @@ -136,8 +136,7 @@ public class AccountNumberFormatWritePlatformServiceJpaRepositoryImpl implements } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { if (realCause.getMessage().contains(AccountNumberFormatConstants.ACCOUNT_TYPE_UNIQUE_CONSTRAINT_NAME)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/PersonnelSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/PersonnelSheetPopulator.java index 8b0c48d60..96b0f3f07 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/PersonnelSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/PersonnelSheetPopulator.java @@ -40,9 +40,8 @@ public class PersonnelSheetPopulator extends AbstractWorkbookPopulator { private Map> officeToPersonnel; /* - * Guava Multimap would make this more readable. The value Integer[] - * contains the beginIndex and endIndex for the staff list of each office. - * Required for applying names in excel. + * Guava Multimap would make this more readable. The value Integer[] contains the beginIndex and endIndex for the + * staff list of each office. Required for applying names in excel. */ private Map officeNameToBeginEndIndexesOfStaff; @@ -61,9 +60,8 @@ public class PersonnelSheetPopulator extends AbstractWorkbookPopulator { setLayout(staffSheet); /* - * This piece of code could have been avoided by making multiple trips - * to the database for the staff of each office but this is more - * performance efficient + * This piece of code could have been avoided by making multiple trips to the database for the staff of each + * office but this is more performance efficient */ setOfficeToPersonnelMap(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/service/RuntimeDelegatingCacheManager.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/service/RuntimeDelegatingCacheManager.java index 5fabf79b7..5ab511d5d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/service/RuntimeDelegatingCacheManager.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/service/RuntimeDelegatingCacheManager.java @@ -35,12 +35,10 @@ import org.springframework.cache.support.NoOpCacheManager; import org.springframework.stereotype.Component; /** - * At present this implementation of {@link CacheManager} just delegates to the - * real {@link CacheManager} to use. + * At present this implementation of {@link CacheManager} just delegates to the real {@link CacheManager} to use. * - * By default it is {@link NoOpCacheManager} but we can change that by checking - * some persisted configuration in the database on startup and allow user to - * switch implementation through UI/API + * By default it is {@link NoOpCacheManager} but we can change that by checking some persisted configuration in the + * database on startup and allow user to switch implementation through UI/API */ @Component(value = "runtimeDelegatingCacheManager") public class RuntimeDelegatingCacheManager implements CacheManager { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailCampaignApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailCampaignApiResource.java index 7591b67db..b0c8bda62 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailCampaignApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailCampaignApiResource.java @@ -54,8 +54,8 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * Created with IntelliJ IDEA. User: andrew Date: 19-5-14 Time: 15:17 To change - * this template use File | Settings | File Templates. + * Created with IntelliJ IDEA. User: andrew Date: 19-5-14 Time: 15:17 To change this template use File | Settings | File + * Templates. */ @Path("/email/campaign") @Consumes({ MediaType.APPLICATION_JSON }) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformServiceImpl.java index 46a4ac07a..e56d988e0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformServiceImpl.java @@ -132,9 +132,8 @@ public class EmailCampaignReadPlatformServiceImpl implements EmailCampaignReadPl final boolean useReport = rs.getBoolean("useReport"); /* - * final ReportData stretchyReport = new ReportData(reportId, - * reportName, reportType, reportSubType, reportCategory, - * reportDescription, reportSql, coreReport, useReport, null); + * final ReportData stretchyReport = new ReportData(reportId, reportName, reportType, reportSubType, + * reportCategory, reportDescription, reportSql, coreReport, useReport, null); */ final Integer statusId = JdbcSupport.getInteger(rs, "statusEnum"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java index 0f8c3db30..4165aaea2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java @@ -313,8 +313,7 @@ public class EmailCampaignWritePlatformCommandHandlerImpl implements EmailCampai // calculate new trigger date and insert into next trigger date /** - * next run time has to be in the future if not calculate a new future - * date + * next run time has to be in the future if not calculate a new future date */ LocalDate nextRuntime = CalendarUtils.getNextRecurringDate(emailCampaign.getRecurrence(), emailCampaign.getNextTriggerDate().toLocalDate(), nextTriggerDate.toLocalDate()); @@ -366,9 +365,8 @@ public class EmailCampaignWritePlatformCommandHandlerImpl implements EmailCampai if (emailCampaign.isSchedule()) { /** - * if recurrence start date is in the future calculate next - * trigger date if not use recurrence start date us next trigger - * date when activating + * if recurrence start date is in the future calculate next trigger date if not use recurrence start + * date us next trigger date when activating */ LocalDate nextTriggerDate = null; if (emailCampaign.getRecurrenceStartDateTime().isBefore(tenantDateTime())) { @@ -391,8 +389,8 @@ public class EmailCampaignWritePlatformCommandHandlerImpl implements EmailCampai } /* - * if campaign is direct insert campaign message into email outbound - * table else if its a schedule create a job process for it + * if campaign is direct insert campaign message into email outbound table else if its a schedule create a job + * process for it */ return new CommandProcessingResultBuilder() // .withCommandId(command.commandId()) // @@ -515,9 +513,8 @@ public class EmailCampaignWritePlatformCommandHandlerImpl implements EmailCampai if (emailCampaign.isSchedule()) { /** - * if recurrence start date is in the future calculate next trigger - * date if not use recurrence start date us next trigger date when - * activating + * if recurrence start date is in the future calculate next trigger date if not use recurrence start date us + * next trigger date when activating */ LocalDate nextTriggerDate = null; if (emailCampaign.getRecurrenceStartDateTime().isBefore(tenantDateTime())) { @@ -718,8 +715,7 @@ public class EmailCampaignWritePlatformCommandHandlerImpl implements EmailCampai } /** - * This generates the the report and converts it to a file by passing the - * parameters below + * This generates the the report and converts it to a file by passing the parameters below * * @param emailCampaign * @param emailAttachmentFileFormat @@ -763,8 +759,7 @@ public class EmailCampaignWritePlatformCommandHandlerImpl implements EmailCampai } /** - * This matches the the actual values to the key in the report stretchy - * parameters map + * This matches the the actual values to the key in the report stretchy parameters map * * @param stretchyParams * @param client diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformServiceJpaRepositoryImpl.java index 44700da2d..9d8353a59 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformServiceJpaRepositoryImpl.java @@ -117,8 +117,7 @@ public class EmailWritePlatformServiceJpaRepositoryImpl implements EmailWritePla } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(@SuppressWarnings("unused") final JsonCommand command, final DataIntegrityViolationException dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java index 7199ba8f7..55b43b049 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java @@ -500,8 +500,7 @@ public class SmsCampaignDomainServiceImpl implements SmsCampaignDomainService { * * private final Object entity ; * - * public Task(final FineractPlatformTenant tenant, final String reportName, - * final Object entity) { this.tenant = tenant; this.reportName = reportName - * ; this.entity = entity ; } } + * public Task(final FineractPlatformTenant tenant, final String reportName, final Object entity) { this.tenant = + * tenant; this.reportName = reportName ; this.entity = entity ; } } */ } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java index 9378cca87..b243e6c29 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java @@ -409,8 +409,7 @@ public class SmsCampaignWritePlatformServiceJpaImpl implements SmsCampaignWriteP // calculate new trigger date and insert into next trigger date /** - * next run time has to be in the future if not calculate a new future - * date + * next run time has to be in the future if not calculate a new future date */ LocalDate nextRuntime = CalendarUtils.getNextRecurringDate(smsCampaign.getRecurrence(), smsCampaign.getNextTriggerDate().toLocalDate(), nextTriggerDate.toLocalDate()); @@ -460,9 +459,8 @@ public class SmsCampaignWritePlatformServiceJpaImpl implements SmsCampaignWriteP } else if (smsCampaign.isSchedule()) { /** - * if recurrence start date is in the future calculate next trigger - * date if not use recurrence start date us next trigger date when - * activating + * if recurrence start date is in the future calculate next trigger date if not use recurrence start date us + * next trigger date when activating */ LocalDate nextTriggerDate = null; if (smsCampaign.getRecurrenceStartDateTime().isBefore(tenantDateTime())) { @@ -484,8 +482,8 @@ public class SmsCampaignWritePlatformServiceJpaImpl implements SmsCampaignWriteP } /* - * if campaign is direct insert campaign message into sms outbound table - * else if its a schedule create a job process for it + * if campaign is direct insert campaign message into sms outbound table else if its a schedule create a job + * process for it */ return new CommandProcessingResultBuilder() // .withCommandId(command.commandId()) // @@ -621,9 +619,8 @@ public class SmsCampaignWritePlatformServiceJpaImpl implements SmsCampaignWriteP } else if (smsCampaign.isSchedule()) { /** - * if recurrence start date is in the future calculate next trigger - * date if not use recurrence start date us next trigger date when - * activating + * if recurrence start date is in the future calculate next trigger date if not use recurrence start date us + * next trigger date when activating */ LocalDate nextTriggerDate = null; if (smsCampaign.getRecurrenceStartDateTime().isBefore(tenantDateTime())) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/CodeConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/CodeConstants.java index 307b269bb..5b833ead5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/CodeConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/CodeConstants.java @@ -24,8 +24,7 @@ import java.util.Set; public class CodeConstants { /*** - * Enum of all parameters passed in while creating/updating a code and code - * value + * Enum of all parameters passed in while creating/updating a code and code value ***/ public static enum CodevalueJSONinputParams { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepositoryWrapper.java index 47c285445..5f363c25a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepositoryWrapper.java @@ -24,15 +24,14 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link CodeValueRepository} that is responsible for checking if - * {@link CodeValue} is returned when using findOne and - * findByCodeNameAndId repository methods and throwing an - * appropriate not found exception. + * Wrapper for {@link CodeValueRepository} that is responsible for checking if {@link CodeValue} is returned when using + * findOne and findByCodeNameAndId repository methods and throwing an appropriate not found + * exception. *

* *

- * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link CodeValueRepository} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where {@link CodeValueRepository} is + * required. *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/exception/SystemDefinedCodeCannotBeChangedException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/exception/SystemDefinedCodeCannotBeChangedException.java index da17e5e37..95f815e67 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/exception/SystemDefinedCodeCannotBeChangedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/exception/SystemDefinedCodeCannotBeChangedException.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.codes.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link AbstractPlatformDomainRuleException} thrown when someone attempts to - * update or delete a system defined code. + * A {@link AbstractPlatformDomainRuleException} thrown when someone attempts to update or delete a system defined code. */ public class SystemDefinedCodeCannotBeChangedException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformService.java index d6674fc0f..cfbd528a7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformService.java @@ -31,13 +31,11 @@ import org.apache.fineract.infrastructure.codes.data.CodeValueData; * * *

- * System defined codes cannot be altered or removed but their code values may - * be allowed to be added to or removed. + * System defined codes cannot be altered or removed but their code values may be allowed to be added to or removed. *

* *

- * User defined codes can be changed in any way by application users with system - * permissions. + * User defined codes can be changed in any way by application users with system permissions. *

*/ public interface CodeValueReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformServiceJpaRepositoryImpl.java index 3538a8127..e06e52a28 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformServiceJpaRepositoryImpl.java @@ -90,8 +90,7 @@ public class CodeValueWritePlatformServiceJpaRepositoryImpl implements CodeValue } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleCodeValueDataIntegrityIssues(final JsonCommand command, final DataIntegrityViolationException dve) { final Throwable realCause = dve.getMostSpecificCause(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformServiceJpaRepositoryImpl.java index ead12a043..f0b860dd1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformServiceJpaRepositoryImpl.java @@ -139,8 +139,7 @@ public class CodeWritePlatformServiceJpaRepositoryImpl implements CodeWritePlatf } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleCodeDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { if (realCause.getMessage().contains("code_name")) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java index 61c14e18e..efa1efa1c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java @@ -82,8 +82,7 @@ public class ConfigurationDomainServiceJpa implements ConfigurationDomainService /* * (non-Javadoc) * - * @see org.apache.fineract.infrastructure.configuration.domain. - * ConfigurationDomainService#isHolidaysEnabled() + * @see org.apache.fineract.infrastructure.configuration.domain. ConfigurationDomainService#isHolidaysEnabled() */ @Override public boolean isRescheduleRepaymentsOnHolidaysEnabled() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepositoryWrapper.java index 5b2b280ab..7276bcd22 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepositoryWrapper.java @@ -24,8 +24,7 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link GlobalConfigurationRepository} that adds NULL checking and - * Error handling capabilities + * Wrapper for {@link GlobalConfigurationRepository} that adds NULL checking and Error handling capabilities *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyNotFoundException.java index b92926f16..f725e5c36 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.configuration.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when global configuration properties are - * not found. + * A {@link RuntimeException} thrown when global configuration properties are not found. */ public class GlobalConfigurationPropertyNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/GlobalConfigurationCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/GlobalConfigurationCommandFromApiJsonDeserializer.java index 94970f6c3..67ac28555 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/GlobalConfigurationCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/GlobalConfigurationCommandFromApiJsonDeserializer.java @@ -34,8 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link UpdateGlobalConfigurationCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link UpdateGlobalConfigurationCommand}'s. */ @Component public final class GlobalConfigurationCommandFromApiJsonDeserializer diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformServiceJpaRepositoryImpl.java index 328e6fead..b63203c5a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformServiceJpaRepositoryImpl.java @@ -96,8 +96,7 @@ public class GlobalConfigurationWritePlatformServiceJpaRepositoryImpl implements } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final DataIntegrityViolationException dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/ApiRequestParameterHelper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/ApiRequestParameterHelper.java index 88fb3ec90..f6ddae008 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/ApiRequestParameterHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/ApiRequestParameterHelper.java @@ -25,13 +25,12 @@ import org.springframework.stereotype.Component; /** *

- * Used to process the query parameters provided in a API request to see - * features of the RESTful API are being asked for such as: + * Used to process the query parameters provided in a API request to see features of the RESTful API are being asked for + * such as: *

*
    *
  • Pretty printing through pretty=true, defaults to false
  • - *
  • Partial response through fields=id, name etc, when empty, the full data - * is returned by default.
  • + *
  • Partial response through fields=id, name etc, when empty, the full data is returned by default.
  • *
*/ @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/DateAdapter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/DateAdapter.java index 9a9163ba6..95a9c158b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/DateAdapter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/DateAdapter.java @@ -27,8 +27,8 @@ import java.time.format.DateTimeFormatter; import java.util.Date; /** - * GSON Serializer for JUL Dates (java.util.Date) in ISO-8601 format using - * {@link DateTimeFormatter#ISO_INSTANT} (see FINERACT-926). + * GSON Serializer for JUL Dates (java.util.Date) in ISO-8601 format using {@link DateTimeFormatter#ISO_INSTANT} (see + * FINERACT-926). * * @author Michael Vorburger.ch */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaDateTimeAdapter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaDateTimeAdapter.java index d9d611b10..128c2e19d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaDateTimeAdapter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaDateTimeAdapter.java @@ -26,8 +26,7 @@ import java.lang.reflect.Type; import org.joda.time.DateTime; /** - * Serializer for Joda Time {@link DateTime} that returns the date as long to - * match previous (Jackson) functionality. + * Serializer for Joda Time {@link DateTime} that returns the date as long to match previous (Jackson) functionality. */ public class JodaDateTimeAdapter implements JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaLocalDateAdapter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaLocalDateAdapter.java index 0e9381eb5..6004e6315 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaLocalDateAdapter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaLocalDateAdapter.java @@ -27,8 +27,8 @@ import java.lang.reflect.Type; import org.joda.time.LocalDate; /** - * Serializer for Joda Time {@link LocalDate} that returns the date in array - * format to match previous Jackson functionality. + * Serializer for Joda Time {@link LocalDate} that returns the date in array format to match previous Jackson + * functionality. */ public class JodaLocalDateAdapter implements JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaMonthDayAdapter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaMonthDayAdapter.java index f8d9724a9..659c70e2f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaMonthDayAdapter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JodaMonthDayAdapter.java @@ -27,8 +27,8 @@ import java.lang.reflect.Type; import org.joda.time.MonthDay; /** - * Serializer for Joda Time {@link MonthDay} that returns the date in array - * format to match previous Jackson functionality. + * Serializer for Joda Time {@link MonthDay} that returns the date in array format to match previous Jackson + * functionality. */ public class JodaMonthDayAdapter implements JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java index 94df4deab..72616401a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java @@ -43,8 +43,8 @@ import org.joda.time.format.DateTimeFormatter; /** * Immutable representation of a command. * - * Wraps the provided JSON with convenience functions for extracting parameter - * values and checking for changes against an existing value. + * Wraps the provided JSON with convenience functions for extracting parameter values and checking for changes against + * an existing value. */ public final class JsonCommand { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonQuery.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonQuery.java index 9fc5deaa5..9a5af6279 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonQuery.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonQuery.java @@ -35,8 +35,7 @@ import org.joda.time.LocalDate; /** * Immutable representation of a query. * - * Wraps the provided JSON with convenience functions for extracting parameter - * values. + * Wraps the provided JSON with convenience functions for extracting parameter values. */ public final class JsonQuery { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/AbstractApplicationConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/AbstractApplicationConfiguration.java index c9eef4fc0..42a93667b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/AbstractApplicationConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/AbstractApplicationConfiguration.java @@ -36,13 +36,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; /** * Base Spring Configuration with what's common to all Configuration subclasses. * - * Notably the EnableAutoConfiguration excludes relevant for (and often adjusted - * when upgrading versions of) Spring Boot, the "old" (pre. Spring Boot & - * MariaDB4j) fineract appContext.xml which all configurations need, and the + * Notably the EnableAutoConfiguration excludes relevant for (and often adjusted when upgrading versions of) Spring + * Boot, the "old" (pre. Spring Boot & MariaDB4j) fineract appContext.xml which all configurations need, and the * web.xml successor WebXmlConfiguration. * - * Should NOT include Configuration related to embedded Tomcat, data sources, - * and MariaDB4j (because those differ in the subclasses). + * Should NOT include Configuration related to embedded Tomcat, data sources, and MariaDB4j (because those differ in the + * subclasses). */ @Configuration @Import({ WebXmlConfiguration.class, WebXmlOauthConfiguration.class, WebFrontEndConfiguration.class, MessagingConfiguration.class, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/EmbeddedTomcatWithSSLConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/EmbeddedTomcatWithSSLConfiguration.java index ccd58c89c..8f5d26c05 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/EmbeddedTomcatWithSSLConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/EmbeddedTomcatWithSSLConfiguration.java @@ -88,13 +88,10 @@ public class EmbeddedTomcatWithSSLConfiguration { try { URL url = resource.getURL(); /** - * // If this creates filenames that are too long on Win, // then - * could just use resource.getFilename(), // even though not unique, - * real risk prob. min.bon String tempDir = - * System.getProperty("java.io.tmpdir"); tempDir = tempDir + "/" + - * getClass().getSimpleName() + "/"; String path = url.getPath(); - * String uniqName = path.replace("file:/", "").replace('!', '_'); - * String tempFullPath = tempDir + uniqName; + * // If this creates filenames that are too long on Win, // then could just use resource.getFilename(), // + * even though not unique, real risk prob. min.bon String tempDir = System.getProperty("java.io.tmpdir"); + * tempDir = tempDir + "/" + getClass().getSimpleName() + "/"; String path = url.getPath(); String uniqName + * = path.replace("file:/", "").replace('!', '_'); String tempFullPath = tempDir + uniqName; **/ // instead of File.createTempFile(prefix?, suffix?); File targetFile = new File(resource.getFilename()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/WebXmlOauthConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/WebXmlOauthConfiguration.java index 6338789ed..6e558e867 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/WebXmlOauthConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/WebXmlOauthConfiguration.java @@ -26,8 +26,7 @@ import org.springframework.context.annotation.Profile; import org.springframework.web.servlet.DispatcherServlet; /** - * This Configuration replaces what formerly was in web.xml. Beans are loaded - * only when "oauth" Profile is enabled. + * This Configuration replaces what formerly was in web.xml. Beans are loaded only when "oauth" Profile is enabled. * * @see #howto-convert-an-existing-application-to-spring-boot diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiGlobalErrorResponse.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiGlobalErrorResponse.java index 15b972037..8c648e4e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiGlobalErrorResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiGlobalErrorResponse.java @@ -29,8 +29,7 @@ import javax.xml.bind.annotation.XmlElementWrapper; public class ApiGlobalErrorResponse { /** - * A developer friendly plain English description of why the HTTP error - * response was returned from the API. + * A developer friendly plain English description of why the HTTP error response was returned from the API. */ private String developerMessage; @@ -40,21 +39,19 @@ public class ApiGlobalErrorResponse { private String httpStatusCode; /** - * A user friendly plain English description of why the HTTP error response - * was returned from the API that can be presented to end users. + * A user friendly plain English description of why the HTTP error response was returned from the API that can be + * presented to end users. */ private String defaultUserMessage; /** - * A code that can be used for globalisation support by client applications - * of the API. + * A code that can be used for globalisation support by client applications of the API. */ private String userMessageGlobalisationCode; /** - * A list of zero or more of the actual reasons for the HTTP error should - * they be needed. Typically used to express data validation errors with - * parameters passed to API. + * A list of zero or more of the actual reasons for the HTTP error should they be needed. Typically used to express + * data validation errors with parameters passed to API. */ private List errors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java index 5535c0e2a..b34217e6d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java @@ -26,26 +26,23 @@ import java.util.List; public class ApiParameterError { /** - * A developer friendly plain English description of why the HTTP error - * response was returned from the API. + * A developer friendly plain English description of why the HTTP error response was returned from the API. */ private String developerMessage; /** - * A user friendly plain English description of why the HTTP error response - * was returned from the API that can be presented to end users. + * A user friendly plain English description of why the HTTP error response was returned from the API that can be + * presented to end users. */ private String defaultUserMessage; /** - * A code that can be used for globalisation support by client applications - * of the API. + * A code that can be used for globalisation support by client applications of the API. */ private String userMessageGlobalisationCode; /** - * The name of the field or parameter passed to the API that this error - * relates to. + * The name of the field or parameter passed to the API that this error relates to. */ private String parameterName; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java index f45690284..fefae0e5b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java @@ -23,8 +23,7 @@ import java.util.HashMap; import java.util.Map; /** - * Represents the successful result of an REST API call that results in - * processing a command. + * Represents the successful result of an REST API call that results in processing a command. */ public class CommandProcessingResult implements Serializable { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResultBuilder.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResultBuilder.java index 606a6d2e6..1fdd91f00 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResultBuilder.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResultBuilder.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.core.data; import java.util.Map; /** - * Represents the successful result of an REST API call that results in - * processing a command. + * Represents the successful result of an REST API call that results in processing a command. */ public class CommandProcessingResultBuilder { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java index 4c071b82c..f48d3275e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java @@ -160,9 +160,8 @@ public class DataValidatorBuilder { /*** FIXME: Vishwas, why does this method have a parameter? Seems wrong ***/ /* - * This method is not meant for validation, if you have mandatory boolean - * param and if it has invalid value or value not passed then call this - * method, this method is always used with input as false + * This method is not meant for validation, if you have mandatory boolean param and if it has invalid value or value + * not passed then call this method, this method is always used with input as false */ public DataValidatorBuilder trueOrFalseRequired1(final boolean trueOfFalseFieldProvided) { if (!trueOfFalseFieldProvided && !this.ignoreNullValue) { @@ -982,9 +981,8 @@ public class DataValidatorBuilder { } boolean validationErr = true; /* - * supports numbers, parentheses(), hyphens and may contain + sign in - * the beginning and can contain whitespaces in between and length - * allowed is 0-25 chars. + * supports numbers, parentheses(), hyphens and may contain + sign in the beginning and can contain whitespaces + * in between and length allowed is 0-25 chars. */ final String regex = "^\\+?[0-9. ()-]{0,25}$"; final Pattern pattern = Pattern.compile(regex); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersResource.java index 97c94f38d..f2cd0dc7f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersResource.java @@ -29,15 +29,12 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * Returns HTTP Request headers. Useful for debugging (e.g. for FINERACT-914. Could - * later be replaced with FINERACT-914. Could later be replaced with Spring - * Boot's Actuator HTTP Tracing (see also - * related tutorial - * on Baeldung.com), but that exposes a lot more than just the current - * request out of the box, and would to be properly authenticated for a - * dedicated new debug role. + * Boot's Actuator HTTP Tracing (see also related + * tutorial on Baeldung.com), but that exposes a lot more than just the current request out of the box, and would to + * be properly authenticated for a dedicated new debug role. * * @author Michael Vorburger.ch */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableCustom.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableCustom.java index c674e9cf0..4bb109765 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableCustom.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableCustom.java @@ -33,12 +33,10 @@ import org.springframework.data.domain.Auditable; import org.springframework.data.jpa.domain.AbstractAuditable; /** - * A custom copy of {@link AbstractAuditable} to override the column names used - * on database. It also uses Instant instead of LocalDateTime for created and - * modified. + * A custom copy of {@link AbstractAuditable} to override the column names used on database. It also uses Instant + * instead of LocalDateTime for created and modified. * - * Abstract base class for auditable entities. Stores the audit values in - * persistent fields. + * Abstract base class for auditable entities. Stores the audit values in persistent fields. * * @param * the auditing type. Typically some kind of user. diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractPersistableCustom.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractPersistableCustom.java index 3b7976df7..be134dcc0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractPersistableCustom.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractPersistableCustom.java @@ -29,14 +29,12 @@ import org.springframework.data.domain.Persistable; /** * Abstract base class for entities. * - * Inspired by {@link org.springframework.data.jpa.domain.AbstractPersistable}, - * but Id is always Long (and this class thus does not require generic - * parameterization), and auto-generation is of strategy + * Inspired by {@link org.springframework.data.jpa.domain.AbstractPersistable}, but Id is always Long (and this class + * thus does not require generic parameterization), and auto-generation is of strategy * {@link javax.persistence.GenerationType#IDENTITY}. * - * The {@link #equals(Object)} and {@link #hashCode()} methods are NOT - * implemented here, which is untypical for JPA (it's usually implemented based - * on the Id), because "we end up with issues on OpenJPA" (TODO clarify this). + * The {@link #equals(Object)} and {@link #hashCode()} methods are NOT implemented here, which is untypical for JPA + * (it's usually implemented based on the Id), because "we end up with issues on OpenJPA" (TODO clarify this). */ @MappedSuperclass public abstract class AbstractPersistableCustom implements Persistable, Serializable { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/JdbcSupport.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/JdbcSupport.java index cbb3bfae3..3b2d7276d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/JdbcSupport.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/JdbcSupport.java @@ -31,8 +31,8 @@ import org.joda.time.LocalTime; import org.springframework.jdbc.support.JdbcUtils; /** - * Support for retrieving possibly null values from jdbc recordset delegating to - * springs {@link JdbcUtils} where possible. + * Support for retrieving possibly null values from jdbc recordset delegating to springs {@link JdbcUtils} where + * possible. */ public class JdbcSupport { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformDomainRuleException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformDomainRuleException.java index bb57263da..5d830ef29 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformDomainRuleException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformDomainRuleException.java @@ -19,8 +19,7 @@ package org.apache.fineract.infrastructure.core.exception; /** - * A {@link RuntimeException} thrown when valid api request end up violating - * some domain rule. + * A {@link RuntimeException} thrown when valid api request end up violating some domain rule. */ public abstract class AbstractPlatformDomainRuleException extends RuntimeException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformResourceNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformResourceNotFoundException.java index 7f66684cf..1f0d7c7cb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformResourceNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformResourceNotFoundException.java @@ -19,8 +19,7 @@ package org.apache.fineract.infrastructure.core.exception; /** - * A {@link RuntimeException} thrown when resources that are queried for are not - * found. + * A {@link RuntimeException} thrown when resources that are queried for are not found. */ public abstract class AbstractPlatformResourceNotFoundException extends RuntimeException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformServiceUnavailableException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformServiceUnavailableException.java index e718b9c73..cf905ec20 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformServiceUnavailableException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformServiceUnavailableException.java @@ -19,8 +19,7 @@ package org.apache.fineract.infrastructure.core.exception; /** - * A {@link RuntimeException} thrown when resources that are queried for are not - * found. + * A {@link RuntimeException} thrown when resources that are queried for are not found. */ public abstract class AbstractPlatformServiceUnavailableException extends RuntimeException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/GeneralPlatformDomainRuleException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/GeneralPlatformDomainRuleException.java index b5b9139eb..be6574eae 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/GeneralPlatformDomainRuleException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/GeneralPlatformDomainRuleException.java @@ -19,8 +19,7 @@ package org.apache.fineract.infrastructure.core.exception; /** - * A {@link RuntimeException} thrown when valid api request end up violating - * some domain rule. + * A {@link RuntimeException} thrown when valid api request end up violating some domain rule. */ public final class GeneralPlatformDomainRuleException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java index 2be934884..56cc5defb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java @@ -19,8 +19,8 @@ package org.apache.fineract.infrastructure.core.exception; /** - * A {@link RuntimeException} that is thrown in the case where invalid JSON is - * sent in the body of the request to the platform api. + * A {@link RuntimeException} that is thrown in the case where invalid JSON is sent in the body of the request to the + * platform api. */ public class InvalidJsonException extends RuntimeException { // diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java index 1e51d74d0..7f8e175bb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java @@ -31,14 +31,12 @@ import org.slf4j.LoggerFactory; /** * Exception with multiple root causes. * - * Intended to be used in places where N operations are performed in a loop over - * something, each of which could fail, but where we don't want to fail - * immediately but continue, and then fail at end. + * Intended to be used in places where N operations are performed in a loop over something, each of which could fail, + * but where we don't want to fail immediately but continue, and then fail at end. * *

- * The failures should typically also each be logged within the loop, as they - * occur; this exception is only thrown to propagate the failure, and the caller - * may or may not log this with the details. + * The failures should typically also each be logged within the loop, as they occur; this exception is only thrown to + * propagate the failure, and the caller may or may not log this with the details. * *

* Originally inspired by org.junit.runners.model.MultipleFailureException diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformDataIntegrityException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformDataIntegrityException.java index 0b58ae94e..d2a0c4a09 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformDataIntegrityException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformDataIntegrityException.java @@ -19,8 +19,7 @@ package org.apache.fineract.infrastructure.core.exception; /** - * A {@link RuntimeException} thrown when data integrity problems happen due to - * state modifying actions. + * A {@link RuntimeException} thrown when data integrity problems happen due to state modifying actions. */ public class PlatformDataIntegrityException extends RuntimeException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java index cb0fa114a..64d2c4d9c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java @@ -21,8 +21,8 @@ package org.apache.fineract.infrastructure.core.exception; import java.util.List; /** - * A {@link RuntimeException} that is thrown in the case where invalid - * parameters are sent in the body of the request to the platform api. + * A {@link RuntimeException} that is thrown in the case where invalid parameters are sent in the body of the request to + * the platform api. */ public class UnsupportedParameterException extends RuntimeException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/AccessDeniedExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/AccessDeniedExceptionMapper.java index 41b8af829..a4f78d637 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/AccessDeniedExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/AccessDeniedExceptionMapper.java @@ -29,12 +29,10 @@ import org.springframework.security.access.AccessDeniedException; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link AccessDeniedException} thrown by - * platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link AccessDeniedException} thrown by platform into a HTTP API friendly format. * - * The {@link AccessDeniedException} is thrown by spring security on platform - * when an attempt is made to use functionality for which the user does have - * sufficient privileges. + * The {@link AccessDeniedException} is thrown by spring security on platform when an attempt is made to use + * functionality for which the user does have sufficient privileges. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/BadCredentialsExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/BadCredentialsExceptionMapper.java index 58a0da706..f458ea86f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/BadCredentialsExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/BadCredentialsExceptionMapper.java @@ -29,12 +29,11 @@ import org.springframework.security.authentication.BadCredentialsException; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link BadCredentialsException} thrown by - * platform during authentication into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link BadCredentialsException} thrown by platform during authentication into a + * HTTP API friendly format. * - * The {@link BadCredentialsException} is thrown by spring security on platform - * when an attempt is made to authenticate using invalid username/password - * credentials. + * The {@link BadCredentialsException} is thrown by spring security on platform when an attempt is made to authenticate + * using invalid username/password credentials. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidJsonExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidJsonExceptionMapper.java index ed4e5422a..a1799ca25 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidJsonExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidJsonExceptionMapper.java @@ -29,8 +29,7 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link InvalidJsonException} thrown by - * platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link InvalidJsonException} thrown by platform into a HTTP API friendly format. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidTenantIdentifierExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidTenantIdentifierExceptionMapper.java index b59e2ab57..e17fb365c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidTenantIdentifierExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidTenantIdentifierExceptionMapper.java @@ -29,11 +29,11 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link InvalidTenantIdentiferException} - * thrown by platform during authentication into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link InvalidTenantIdentiferException} thrown by platform during authentication + * into a HTTP API friendly format. * - * The {@link InvalidTenantIdentiferException} is thrown by spring security on - * platform when a request contains an invalid tenant identifier. + * The {@link InvalidTenantIdentiferException} is thrown by spring security on platform when a request contains an + * invalid tenant identifier. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonSyntaxExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonSyntaxExceptionMapper.java index 5c4a7baed..dd3664a12 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonSyntaxExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonSyntaxExceptionMapper.java @@ -29,8 +29,7 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link JsonSyntaxException} thrown by - * platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link JsonSyntaxException} thrown by platform into a HTTP API friendly format. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/MalformedJsonExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/MalformedJsonExceptionMapper.java index ceff4a7e9..92ac18f0d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/MalformedJsonExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/MalformedJsonExceptionMapper.java @@ -29,8 +29,7 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link MalformedJsonException} thrown by - * platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link MalformedJsonException} thrown by platform into a HTTP API friendly format. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/NoAuthorizationExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/NoAuthorizationExceptionMapper.java index 81da8233f..7fc2b3424 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/NoAuthorizationExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/NoAuthorizationExceptionMapper.java @@ -29,11 +29,11 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link NoAuthorizationException} thrown by - * platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link NoAuthorizationException} thrown by platform into a HTTP API friendly + * format. * - * The {@link NoAuthorizationException} is thrown on platform when an attempt is - * made to use functionality for which the user does have sufficient privileges. + * The {@link NoAuthorizationException} is thrown on platform when an attempt is made to use functionality for which the + * user does have sufficient privileges. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformApiDataValidationExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformApiDataValidationExceptionMapper.java index 5568d7067..14a004540 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformApiDataValidationExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformApiDataValidationExceptionMapper.java @@ -29,11 +29,11 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link PlatformApiDataValidationException} - * thrown by platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link PlatformApiDataValidationException} thrown by platform into a HTTP API + * friendly format. * - * The {@link PlatformApiDataValidationException} is typically thrown in data - * validation of the parameters passed in with an api request. + * The {@link PlatformApiDataValidationException} is typically thrown in data validation of the parameters passed in + * with an api request. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDataIntegrityExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDataIntegrityExceptionMapper.java index b58b80b8a..304ec2a5c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDataIntegrityExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDataIntegrityExceptionMapper.java @@ -29,11 +29,11 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link PlatformDataIntegrityException} - * thrown by platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link PlatformDataIntegrityException} thrown by platform into a HTTP API friendly + * format. * - * The {@link PlatformDataIntegrityException} is thrown when modifying api call - * result in data integrity checks to be fired. + * The {@link PlatformDataIntegrityException} is thrown when modifying api call result in data integrity checks to be + * fired. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDomainRuleExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDomainRuleExceptionMapper.java index 4d4dc2fce..6ca3fd06f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDomainRuleExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDomainRuleExceptionMapper.java @@ -29,11 +29,11 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link AbstractPlatformDomainRuleException} - * thrown by platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link AbstractPlatformDomainRuleException} thrown by platform into a HTTP API + * friendly format. * - * The {@link AbstractPlatformDomainRuleException} is thrown when an api call - * results is some internal business/domain logic been violated. + * The {@link AbstractPlatformDomainRuleException} is thrown when an api call results is some internal business/domain + * logic been violated. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformInternalServerExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformInternalServerExceptionMapper.java index 77d4d8574..d10a0af43 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformInternalServerExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformInternalServerExceptionMapper.java @@ -29,11 +29,10 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link PlatformInternalServerException} - * thrown by platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link PlatformInternalServerException} thrown by platform into a HTTP API friendly + * format. * - * The {@link PlatformInternalServerException} is thrown when an api call - * results in unexpected server side exceptions. + * The {@link PlatformInternalServerException} is thrown when an api call results in unexpected server side exceptions. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformResourceNotFoundExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformResourceNotFoundExceptionMapper.java index 1a61b22c6..6cd9835f2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformResourceNotFoundExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformResourceNotFoundExceptionMapper.java @@ -29,12 +29,11 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map - * {@link AbstractPlatformResourceNotFoundException} thrown by platform into a - * HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link AbstractPlatformResourceNotFoundException} thrown by platform into a HTTP + * API friendly format. * - * The {@link AbstractPlatformResourceNotFoundException} is thrown when an api - * call for a resource that is expected to exist does not. + * The {@link AbstractPlatformResourceNotFoundException} is thrown when an api call for a resource that is expected to + * exist does not. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformServiceUnavailableExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformServiceUnavailableExceptionMapper.java old mode 100755 new mode 100644 index 2d64ae735..b9c216c14 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformServiceUnavailableExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformServiceUnavailableExceptionMapper.java @@ -29,12 +29,11 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map - * {@link AbstractPlatformServiceUnavailableException} thrown by platform into a - * HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link AbstractPlatformServiceUnavailableException} thrown by platform into a HTTP + * API friendly format. * - * The {@link AbstractPlatformServiceUnavailableException} is thrown when an api - * call for a resource that is expected to exist does not. + * The {@link AbstractPlatformServiceUnavailableException} is thrown when an api call for a resource that is expected to + * exist does not. */ @Provider diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnAuthenticatedUserExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnAuthenticatedUserExceptionMapper.java index beb2c902f..aa8092de1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnAuthenticatedUserExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnAuthenticatedUserExceptionMapper.java @@ -29,8 +29,8 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link UnAuthenticatedUserException} thrown - * by platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link UnAuthenticatedUserException} thrown by platform into a HTTP API friendly + * format. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnrecognizedQueryParamExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnrecognizedQueryParamExceptionMapper.java index 7e9760f1d..b441a2c80 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnrecognizedQueryParamExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnrecognizedQueryParamExceptionMapper.java @@ -32,11 +32,11 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link UnrecognizedQueryParamException} - * thrown by platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link UnrecognizedQueryParamException} thrown by platform into a HTTP API friendly + * format. * - * The {@link UnrecognizedQueryParamException} is typically thrown when a - * parameter is passed during and post or put that is not expected. + * The {@link UnrecognizedQueryParamException} is typically thrown when a parameter is passed during and post or put + * that is not expected. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedCommandExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedCommandExceptionMapper.java index 1d1f2a7ce..2358e446a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedCommandExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedCommandExceptionMapper.java @@ -32,8 +32,8 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link UnsupportedCommandException} thrown - * by platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link UnsupportedCommandException} thrown by platform into a HTTP API friendly + * format. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedParameterExceptionMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedParameterExceptionMapper.java index 21cb4fdbd..9f3b40f40 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedParameterExceptionMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedParameterExceptionMapper.java @@ -32,8 +32,8 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** - * An {@link ExceptionMapper} to map {@link UnsupportedParameterException} - * thrown by platform into a HTTP API friendly format. + * An {@link ExceptionMapper} to map {@link UnsupportedParameterException} thrown by platform into a HTTP API friendly + * format. */ @Provider @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/filters/ResponseCorsFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/filters/ResponseCorsFilter.java index 1ad64e6fb..a3fad864d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/filters/ResponseCorsFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/filters/ResponseCorsFilter.java @@ -25,8 +25,8 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.ResponseBuilder; /** - * Filter that returns a response with headers that allows for Cross-Origin - * Requests (CORs) to be performed against the platform API. + * Filter that returns a response with headers that allows for Cross-Origin Requests (CORs) to be performed against the + * platform API. */ public class ResponseCorsFilter implements ContainerResponseFilter { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromApiJsonDeserializer.java index 5b2db9fa5..643c4caef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromApiJsonDeserializer.java @@ -19,8 +19,7 @@ package org.apache.fineract.infrastructure.core.serialization; /** - * Abstract implementation of {@link FromApiJsonDeserializer} that can be - * extended for specific commands. + * Abstract implementation of {@link FromApiJsonDeserializer} that can be extended for specific commands. */ public abstract class AbstractFromApiJsonDeserializer implements FromApiJsonDeserializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromCommandJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromCommandJsonDeserializer.java index 63ff3c65b..c74abbf07 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromCommandJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromCommandJsonDeserializer.java @@ -19,8 +19,7 @@ package org.apache.fineract.infrastructure.core.serialization; /** - * Abstract implementation of {@link FromCommandJsonDeserializer} that can be - * extended for specific commands. + * Abstract implementation of {@link FromCommandJsonDeserializer} that can be extended for specific commands. */ public abstract class AbstractFromCommandJsonDeserializer implements FromCommandJsonDeserializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/ApiRequestJsonSerializationSettings.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/ApiRequestJsonSerializationSettings.java index 7f1b501e7..2104a63e3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/ApiRequestJsonSerializationSettings.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/ApiRequestJsonSerializationSettings.java @@ -21,8 +21,8 @@ package org.apache.fineract.infrastructure.core.serialization; import java.util.Set; /** - * A class to encapsulate settings we allow on API that affect how JSON is to be - * serialized for the response to api call. + * A class to encapsulate settings we allow on API that affect how JSON is to be serialized for the response to api + * call. */ public class ApiRequestJsonSerializationSettings { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializerDefaultToJson.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializerDefaultToJson.java index 301f9d824..8d9f5dbb9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializerDefaultToJson.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializerDefaultToJson.java @@ -22,8 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link CommandSerializer} that serializes the commands into - * JSON using google-gson. + * Implementation of {@link CommandSerializer} that serializes the commands into JSON using google-gson. */ @Component public class CommandSerializerDefaultToJson implements CommandSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/DefaultToApiJsonSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/DefaultToApiJsonSerializer.java index df21a88d0..12251ce43 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/DefaultToApiJsonSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/DefaultToApiJsonSerializer.java @@ -26,8 +26,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * An abstract helper implementation of {@link ToApiJsonSerializer} for - * resources to serialize their Java data objects into JSON. + * An abstract helper implementation of {@link ToApiJsonSerializer} for resources to serialize their Java data objects + * into JSON. */ @Component public final class DefaultToApiJsonSerializer implements ToApiJsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java index 26d66c219..b990439a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java @@ -118,10 +118,9 @@ public class FromJsonHelper { /** * @param parentPropertyName - * The full json path to this property,the value is appended to - * the parameter name while generating an error message
- * Ex: property "name" in Object "person" would be named as - * "person.name" + * The full json path to this property,the value is appended to the parameter name while generating an + * error message
+ * Ex: property "name" in Object "person" would be named as "person.name" * @param object * @param supportedParams */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java index 7286244c6..a1f827880 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java @@ -157,11 +157,10 @@ public class JsonParserHelper { } /** - * Method used to extract integers from unformatted strings. Ex: "1" , - * "100002" etc + * Method used to extract integers from unformatted strings. Ex: "1" , "100002" etc * - * Please note that this method does not support extracting Integers from - * locale specific formatted strings Ex "1,000" etc + * Please note that this method does not support extracting Integers from locale specific formatted strings Ex + * "1,000" etc * * @param parameterName * @param element diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java index cad8f5c7b..f7d297534 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java @@ -34,8 +34,8 @@ public class AbandonedConnectionCleanupShutdownListener implements ApplicationLi private static final Logger LOG = LoggerFactory.getLogger(AbandonedConnectionCleanupShutdownListener.class); /** - * @see JobRegisterServiceImpl#onApplicationEvent(ContextClosedEvent) doc - * re. why we use ContextClosedEvent instead of ContextStoppedEvent + * @see JobRegisterServiceImpl#onApplicationEvent(ContextClosedEvent) doc re. why we use ContextClosedEvent instead + * of ContextStoppedEvent */ @Override public void onApplicationEvent(@SuppressWarnings("unused") ContextClosedEvent event) { @@ -46,12 +46,9 @@ public class AbandonedConnectionCleanupShutdownListener implements ApplicationLi /* * try { * - * AbandonedConnectionCleanupThread.shutdown(); tomcat memoroy leak with - * mysql connector. With Drizzle not required - * LOG.info("Shut-down of AbandonedConnectionCleanupThread successful"); - * } catch (Throwable t) { LOG. - * error("Exception occurred while shut-down of AbandonedConnectionCleanupThread" - * , t); } + * AbandonedConnectionCleanupThread.shutdown(); tomcat memoroy leak with mysql connector. With Drizzle not + * required LOG.info("Shut-down of AbandonedConnectionCleanupThread successful"); } catch (Throwable t) { LOG. + * error("Exception occurred while shut-down of AbandonedConnectionCleanupThread" , t); } */ // This manually deregisters JDBC driver, which prevents Tomcat 7 from diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSource.java index fb2117cb9..0a63c7752 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSource.java @@ -27,14 +27,13 @@ import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; import org.springframework.stereotype.Service; /** - * Based on springs {@link AbstractRoutingDataSource} idea, this is a - * {@link DataSource} that routes or delegates to another data source depending - * on the tenant details passed in the request. + * Based on springs {@link AbstractRoutingDataSource} idea, this is a {@link DataSource} that routes or delegates to + * another data source depending on the tenant details passed in the request. * * The tenant details are process earlier and stored in a {@link ThreadLocal}. * - * The {@link RoutingDataSourceService} is responsible for returning the - * appropriate {@link DataSource} for the tenant of this request. + * The {@link RoutingDataSourceService} is responsible for returning the appropriate {@link DataSource} for the tenant + * of this request. */ @Service(value = "routingDataSource") public class RoutingDataSource extends AbstractDataSource { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSourceService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSourceService.java index dff9b53a7..343ef1c81 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSourceService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSourceService.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.core.service; import javax.sql.DataSource; /** - * A service for getting hold of the appropriate {@link DataSource} connection - * pool. + * A service for getting hold of the appropriate {@link DataSource} connection pool. */ public interface RoutingDataSourceService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSourceServiceFactory.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSourceServiceFactory.java old mode 100755 new mode 100644 index f16a5a4d4..112cd44e6 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSourceServiceFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/RoutingDataSourceServiceFactory.java @@ -23,8 +23,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; /** - * Factory class to get data source service based on the details stored in - * {@link ThreadLocal} variable for this request + * Factory class to get data source service based on the details stored in {@link ThreadLocal} variable for this request * * {@link ThreadLocalContextUtil} is used to retrieve the Context * diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java index 0d4250559..f51efd684 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java @@ -478,8 +478,7 @@ public final class SearchParameters { } /** - * creates an instance of the SearchParameters from a request for the report - * mailing job run history + * creates an instance of the SearchParameters from a request for the report mailing job run history * * @return SearchParameters object **/ @@ -492,8 +491,7 @@ public final class SearchParameters { } /** - * creates an instance of the {@link SearchParameters} from a request for - * the report mailing job + * creates an instance of the {@link SearchParameters} from a request for the report mailing job * * @return {@link SearchParameters} object */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TenantDatabaseUpgradeService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TenantDatabaseUpgradeService.java index b4ac1e5ae..c6a0aa63b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TenantDatabaseUpgradeService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TenantDatabaseUpgradeService.java @@ -38,8 +38,7 @@ import org.springframework.jdbc.support.rowset.SqlRowSet; import org.springframework.stereotype.Service; /** - * A service that picks up on tenants that are configured to auto-update their - * specific schema on application startup. + * A service that picks up on tenants that are configured to auto-update their specific schema on application startup. */ @Service public class TenantDatabaseUpgradeService { @@ -94,8 +93,7 @@ public class TenantDatabaseUpgradeService { } /** - * Initializes, and if required upgrades (using Flyway) the Tenant DB - * itself. + * Initializes, and if required upgrades (using Flyway) the Tenant DB itself. */ private void upgradeTenantDB() { String dbHostname = getEnvVar("FINERACT_DEFAULT_TENANTDB_HOSTNAME", "localhost"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java index c363ceb29..d9e941b07 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java @@ -31,12 +31,10 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; /** - * Implementation that returns a new or existing connection pool datasource - * based on the tenant details stored in a {@link ThreadLocal} variable for this - * request. + * Implementation that returns a new or existing connection pool datasource based on the tenant details stored in a + * {@link ThreadLocal} variable for this request. * - * {@link ThreadLocalContextUtil} is used to retrieve the - * {@link FineractPlatformTenant} for the request. + * {@link ThreadLocalContextUtil} is used to retrieve the {@link FineractPlatformTenant} for the request. */ @Service public class TomcatJdbcDataSourcePerTenantService implements RoutingDataSourceService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnValueData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnValueData.java index 7f561fc0f..9a9e8a100 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnValueData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnValueData.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.dataqueries.data; import java.io.Serializable; /** - * Immutable data object representing a possible value for a given resultset - * column. + * Immutable data object representing a possible value for a given resultset column. */ public class ResultsetColumnValueData implements Serializable { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsage.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsage.java index 6665154dc..2cdc460a9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsage.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsage.java @@ -51,19 +51,14 @@ public final class ReportParameterUsage extends AbstractPersistableCustom { } /* - * @Override public boolean equals(final Object obj) { if (obj == null) { - * return false; } if (obj == this) { return true; } if (obj.getClass() != - * getClass()) { return false; } final ReportParameterUsage rhs = - * (ReportParameterUsage) obj; return new - * EqualsBuilder().appendSuper(super.equals(obj)) // .append(getId(), - * rhs.getId()) // .append(this.report.getId(), rhs.report.getId()) // - * .append(this.parameter.getId(), rhs.parameter.getId()) // - * .append(this.reportParameterName, rhs.reportParameterName) // - * .isEquals(); } + * @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return + * true; } if (obj.getClass() != getClass()) { return false; } final ReportParameterUsage rhs = + * (ReportParameterUsage) obj; return new EqualsBuilder().appendSuper(super.equals(obj)) // .append(getId(), + * rhs.getId()) // .append(this.report.getId(), rhs.report.getId()) // .append(this.parameter.getId(), + * rhs.parameter.getId()) // .append(this.reportParameterName, rhs.reportParameterName) // .isEquals(); } * - * @Override public int hashCode() { return new HashCodeBuilder(3, 5) // - * .append(getId()) // .append(this.report.getId()) // - * .append(this.parameter.getId()) // .append(this.reportParameterName) // + * @Override public int hashCode() { return new HashCodeBuilder(3, 5) // .append(getId()) // + * .append(this.report.getId()) // .append(this.parameter.getId()) // .append(this.reportParameterName) // * .toHashCode(); } */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepositoryWrapper.java index 3772c0487..ef22cb23c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepositoryWrapper.java @@ -23,9 +23,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** - * A wrapper class for the ReportRepository that provides a method that returns - * a Report entity if it exists, else throws "ReportNotFoundException" exception - * if the Report does not exist + * A wrapper class for the ReportRepository that provides a method that returns a Report entity if it exists, else + * throws "ReportNotFoundException" exception if the Report does not exist **/ @Service public class ReportRepositoryWrapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableEntryRequiredException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableEntryRequiredException.java index 90a540e7e..5f78ead74 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableEntryRequiredException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableEntryRequiredException.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.dataqueries.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link AbstractPlatformDomainRuleException} thrown when datatable resources - * are not found. + * A {@link AbstractPlatformDomainRuleException} thrown when datatable resources are not found. */ public class DatatableEntryRequiredException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformServiceImpl.java index e28e5b5b4..6fdebe74a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformServiceImpl.java @@ -263,8 +263,7 @@ public class EntityDatatableChecksWritePlatformServiceImpl implements EntityData } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleReportDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dae) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java index 288ffacf7..824fe444b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java @@ -254,8 +254,7 @@ public class GenericDataServiceImpl implements GenericDataService { } /* - * Candidate for using caching there to get allowed 'column values' from - * code/codevalue tables + * Candidate for using caching there to get allowed 'column values' from code/codevalue tables */ private List retreiveColumnValues(final String codeName) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java index c39d2810b..b0e72b130 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java @@ -449,16 +449,12 @@ public class ReadReportingServiceImpl implements ReadReportingService { return sql; /* - * used to only return reports that the use can run as done in - * report UI but not necessary as there is a read_report permission - * which should give user access to look all reports + - * " where exists" + " (select 'f'" + " from m_appuser_role ur " + - * " join m_role r on r.id = ur.role_id" + + * used to only return reports that the use can run as done in report UI but not necessary as there is a + * read_report permission which should give user access to look all reports + " where exists" + + * " (select 'f'" + " from m_appuser_role ur " + " join m_role r on r.id = ur.role_id" + * " left join m_role_permission rp on rp.role_id = r.id" + - * " left join m_permission p on p.id = rp.permission_id" + - * " where ur.appuser_id = " + userId + - * " and (p.code in ('ALL_FUNCTIONS', 'ALL_FUNCTIONS_READ') or p.code = concat('READ_', r.report_name))) " - * ; + * " left join m_permission p on p.id = rp.permission_id" + " where ur.appuser_id = " + userId + + * " and (p.code in ('ALL_FUNCTIONS', 'ALL_FUNCTIONS_READ') or p.code = concat('READ_', r.report_name))) " ; */ } @@ -547,73 +543,56 @@ public class ReadReportingServiceImpl implements ReadReportingService { // This complete implementation should be moved to Pentaho Report // Service /* - * String outputType = "HTML"; if - * (StringUtils.isNotBlank(outputTypeParam)) { outputType = - * outputTypeParam; } + * String outputType = "HTML"; if (StringUtils.isNotBlank(outputTypeParam)) { outputType = outputTypeParam; } * - * if (!(outputType.equalsIgnoreCase("HTML") || - * outputType.equalsIgnoreCase("PDF") || - * outputType.equalsIgnoreCase("XLS") || outputType - * .equalsIgnoreCase("CSV"))) { throw new - * PlatformDataIntegrityException("error.msg.invalid.outputType", - * "No matching Output Type: " + outputType); } + * if (!(outputType.equalsIgnoreCase("HTML") || outputType.equalsIgnoreCase("PDF") || + * outputType.equalsIgnoreCase("XLS") || outputType .equalsIgnoreCase("CSV"))) { throw new + * PlatformDataIntegrityException("error.msg.invalid.outputType", "No matching Output Type: " + outputType); } * - * if (this.noPentaho) { throw new - * PlatformDataIntegrityException("error.msg.no.pentaho", + * if (this.noPentaho) { throw new PlatformDataIntegrityException("error.msg.no.pentaho", * "Pentaho is not enabled", "Pentaho is not enabled"); } * - * final String reportPath = - * FileSystemContentRepository.FINERACT_BASE_DIR + File.separator + - * "pentahoReports" + File.separator + reportName + ".prpt"; - * LOG.info("Report path: {}", reportPath); + * final String reportPath = FileSystemContentRepository.FINERACT_BASE_DIR + File.separator + "pentahoReports" + + * File.separator + reportName + ".prpt"; LOG.info("Report path: {}", reportPath); * - * // load report definition final ResourceManager manager = new - * ResourceManager(); manager.registerDefaults(); Resource res; + * // load report definition final ResourceManager manager = new ResourceManager(); manager.registerDefaults(); + * Resource res; * - * try { res = manager.createDirectly(reportPath, MasterReport.class); - * final MasterReport masterReport = (MasterReport) res.getResource(); - * final DefaultReportEnvironment reportEnvironment = + * try { res = manager.createDirectly(reportPath, MasterReport.class); final MasterReport masterReport = + * (MasterReport) res.getResource(); final DefaultReportEnvironment reportEnvironment = * (DefaultReportEnvironment) masterReport.getReportEnvironment(); * - * if (locale != null) { reportEnvironment.setLocale(locale); } - * addParametersToReport(masterReport, queryParams, runReportAsUser, - * errorLog); + * if (locale != null) { reportEnvironment.setLocale(locale); } addParametersToReport(masterReport, queryParams, + * runReportAsUser, errorLog); * * final ByteArrayOutputStream baos = new ByteArrayOutputStream(); * - * if ("PDF".equalsIgnoreCase(outputType)) { - * PdfReportUtil.createPDF(masterReport, baos); return baos; } + * if ("PDF".equalsIgnoreCase(outputType)) { PdfReportUtil.createPDF(masterReport, baos); return baos; } * - * if ("XLS".equalsIgnoreCase(outputType)) { - * ExcelReportUtil.createXLS(masterReport, baos); return baos; } + * if ("XLS".equalsIgnoreCase(outputType)) { ExcelReportUtil.createXLS(masterReport, baos); return baos; } * - * if ("CSV".equalsIgnoreCase(outputType)) { - * CSVReportUtil.createCSV(masterReport, baos, "UTF-8"); return baos; } + * if ("CSV".equalsIgnoreCase(outputType)) { CSVReportUtil.createCSV(masterReport, baos, "UTF-8"); return baos; + * } * - * if ("HTML".equalsIgnoreCase(outputType)) { - * HtmlReportUtil.createStreamHTML(masterReport, baos); return baos; } + * if ("HTML".equalsIgnoreCase(outputType)) { HtmlReportUtil.createStreamHTML(masterReport, baos); return baos; + * } * * } catch (final ResourceException e) { errorLog. * append("ReadReportingServiceImpl.generatePentahoReportAsOutputStream method threw a Pentaho ResourceException " * + "exception: " + e.getMessage() + " ---------- "); throw new - * PlatformDataIntegrityException("error.msg.reporting.error", - * e.getMessage()); } catch (final ReportProcessingException e) { - * errorLog. + * PlatformDataIntegrityException("error.msg.reporting.error", e.getMessage()); } catch (final + * ReportProcessingException e) { errorLog. * append("ReadReportingServiceImpl.generatePentahoReportAsOutputStream method threw a Pentaho ReportProcessingException " * + "exception: " + e.getMessage() + " ---------- "); throw new - * PlatformDataIntegrityException("error.msg.reporting.error", - * e.getMessage()); } catch (final IOException e) { errorLog. - * append("ReadReportingServiceImpl.generatePentahoReportAsOutputStream method threw an IOException " + * PlatformDataIntegrityException("error.msg.reporting.error", e.getMessage()); } catch (final IOException e) { + * errorLog. append("ReadReportingServiceImpl.generatePentahoReportAsOutputStream method threw an IOException " * + "exception: " + e.getMessage() + " ---------- "); throw new - * PlatformDataIntegrityException("error.msg.reporting.error", - * e.getMessage()); } + * PlatformDataIntegrityException("error.msg.reporting.error", e.getMessage()); } * * errorLog. * append("ReadReportingServiceImpl.generatePentahoReportAsOutputStream method threw a PlatformDataIntegrityException " - * + "exception: No matching Output Type: " + outputType + - * " ---------- "); throw new - * PlatformDataIntegrityException("error.msg.invalid.outputType", - * "No matching Output Type: " + outputType); + * + "exception: No matching Output Type: " + outputType + " ---------- "); throw new + * PlatformDataIntegrityException("error.msg.invalid.outputType", "No matching Output Type: " + outputType); * */ return null; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java index 4d52941c6..69a18f97c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java @@ -571,11 +571,10 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ Boolean multiRow = this.fromJsonHelper.extractBooleanNamed("multiRow", element); /*** - * In cases of tables storing hierarchical entities (like m_group), - * different entities would end up being stored in the same table. + * In cases of tables storing hierarchical entities (like m_group), different entities would end up being + * stored in the same table. * - * Ex: Centers are a specific type of group, add abstractions for - * the same + * Ex: Centers are a specific type of group, add abstractions for the same ***/ final String actualAppTableName = mapToActualAppTable(apptableName); @@ -850,8 +849,8 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ } /** - * Update data table, set column value to empty string where current value - * is NULL. Run update SQL only if the "mandatory" property is set to true + * Update data table, set column value to empty string where current value is NULL. Run update SQL only if the + * "mandatory" property is set to true * * @param datatableName * Name of data table @@ -1303,18 +1302,15 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ private String dataScopedSQL(final String appTable, final Long appTableId) { /* - * unfortunately have to, one way or another, be able to restrict data - * to the users office hierarchy. Here, a few key tables are done. But - * if additional fields are needed on other tables the same pattern - * applies + * unfortunately have to, one way or another, be able to restrict data to the users office hierarchy. Here, a + * few key tables are done. But if additional fields are needed on other tables the same pattern applies */ final AppUser currentUser = this.context.authenticatedUser(); String scopedSQL = null; /* - * m_loan and m_savings_account are connected to an m_office thru either - * an m_client or an m_group If both it means it relates to an m_client - * that is in a group (still an m_client account) + * m_loan and m_savings_account are connected to an m_office thru either an m_client or an m_group If both it + * means it relates to an m_client that is in a group (still an m_client account) */ if (appTable.equalsIgnoreCase("m_loan")) { scopedSQL = "select distinctrow x.* from (" @@ -1488,8 +1484,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ } /** - * This method is used special for ppi cases Where the score need to be - * computed + * This method is used special for ppi cases Where the score need to be computed * * @param columnHeaders * @param datatable diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformServiceImpl.java index 1e507a594..61f7e8d9e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformServiceImpl.java @@ -174,8 +174,7 @@ public class ReportWritePlatformServiceImpl implements ReportWritePlatformServic } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleReportDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java index d5b8a8b03..2aa88d349 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java @@ -132,13 +132,12 @@ public class DocumentManagementApiResource { @FormDataParam("description") @ApiParam(value = "description") final String description) { /** - * TODO: also need to have a backup and stop reading from stream after - * max size is reached to protect against malicious clients + * TODO: also need to have a backup and stop reading from stream after max size is reached to protect against + * malicious clients **/ /** - * TODO: need to extract the actual file type and determine if they are - * permissable + * TODO: need to extract the actual file type and determine if they are permissable **/ final DocumentCommand documentCommand = new DocumentCommand(null, null, entityType, entityId, name, fileDetails.getFileName(), fileSize, bodyPart.getMediaType().toString(), description, null); @@ -172,8 +171,7 @@ public class DocumentManagementApiResource { modifiedParams.add("description"); /*** - * Populate Document command based on whether a file has also been - * passed in as a part of the update + * Populate Document command based on whether a file has also been passed in as a part of the update ***/ DocumentCommand documentCommand = null; if (inputStream != null && fileDetails.getFileName() != null) { @@ -188,8 +186,7 @@ public class DocumentManagementApiResource { null); } /*** - * TODO: does not return list of changes, should be done for consistency - * with rest of API + * TODO: does not return list of changes, should be done for consistency with rest of API **/ final CommandProcessingResult identifier = this.documentWritePlatformService.updateDocument(documentCommand, inputStream); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java index f042b16a9..d587b7b95 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java @@ -173,8 +173,8 @@ public class ImagesApiResource { } /** - * This method is added only for consistency with other URL patterns and for - * maintaining consistency of usage of the HTTP "verb" at the client side + * This method is added only for consistency with other URL patterns and for maintaining consistency of usage of the + * HTTP "verb" at the client side */ @PUT @Consumes({ MediaType.MULTIPART_FORM_DATA }) @@ -186,8 +186,8 @@ public class ImagesApiResource { } /** - * This method is added only for consistency with other URL patterns and for - * maintaining consistency of usage of the HTTP "verb" at the client side + * This method is added only for consistency with other URL patterns and for maintaining consistency of usage of the + * HTTP "verb" at the client side * * Upload image as a Data URL (essentially a base64 encoded stream) */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentRepositoryUtils.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentRepositoryUtils.java index 449438ad3..62ff738c0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentRepositoryUtils.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentRepositoryUtils.java @@ -150,10 +150,9 @@ public class ContentRepositoryUtils { public static void validateFileSizeWithinPermissibleRange(final Long fileSize, final String name) { /** - * Using Content-Length gives me size of the entire request, which is - * good enough for now for a fast fail as the length of the rest of the - * content i.e name and description while compared to the uploaded file - * size is negligible + * Using Content-Length gives me size of the entire request, which is good enough for now for a fast fail as the + * length of the rest of the content i.e name and description while compared to the uploaded file size is + * negligible **/ if (fileSize != null && ((fileSize / (1024 * 1024)) > ContentRepository.MAX_FILE_UPLOAD_SIZE_IN_MB)) { throw new ContentManagementException(name, fileSize, ContentRepository.MAX_FILE_UPLOAD_SIZE_IN_MB); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/InvalidEntityTypeForDocumentManagementException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/InvalidEntityTypeForDocumentManagementException.java index ae9b4263c..655f77106 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/InvalidEntityTypeForDocumentManagementException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/InvalidEntityTypeForDocumentManagementException.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.documentmanagement.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when document management functionality is - * invoked for invalid Entity Types + * A {@link RuntimeException} thrown when document management functionality is invoked for invalid Entity Types */ public class InvalidEntityTypeForDocumentManagementException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepositoryWrapper.java index 540f685e7..f0010ef07 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepositoryWrapper.java @@ -24,8 +24,7 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link FineractEntityAccessRepository} that adds NULL checking - * and Error handling capabilities + * Wrapper for {@link FineractEntityAccessRepository} that adds NULL checking and Error handling capabilities *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelation.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelation.java index faa96d234..2f2d4e4da 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelation.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelation.java @@ -44,10 +44,8 @@ public class FineractEntityRelation extends AbstractPersistableCustom { private String codeName; /* - * private FineractEntityRelation(final String fromEntityType, final String - * toEntityType, final String codeName) { this.fromEntityType = - * fromEntityType; this.toEntityType = toEntityType; this.codeName = - * codeName; } + * private FineractEntityRelation(final String fromEntityType, final String toEntityType, final String codeName) { + * this.fromEntityType = fromEntityType; this.toEntityType = toEntityType; this.codeName = codeName; } */ public FineractEntityRelation() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityToEntityMapping.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityToEntityMapping.java index 40f869e6e..396fbf008 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityToEntityMapping.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityToEntityMapping.java @@ -125,14 +125,12 @@ public class FineractEntityToEntityMapping extends AbstractPersistableCustom { } /* - * public Date getStartDate() { Date startDate = null; if (this.startDate != - * null) { startDate = Date.fromDateFields(this.startDate); } return - * startDate; } + * public Date getStartDate() { Date startDate = null; if (this.startDate != null) { startDate = + * Date.fromDateFields(this.startDate); } return startDate; } */ /* - * public Date getStartDate() { return (Date) ObjectUtils.defaultIfNull(new - * Date(this.startDate), null); } + * public Date getStartDate() { return (Date) ObjectUtils.defaultIfNull(new Date(this.startDate), null); } */ } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/NotOfficeSpecificProductException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/NotOfficeSpecificProductException.java index d5a636d50..164eecfd8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/NotOfficeSpecificProductException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/NotOfficeSpecificProductException.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.entityaccess.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when valid api request end up violating - * some domain rule. + * A {@link RuntimeException} thrown when valid api request end up violating some domain rule. */ public class NotOfficeSpecificProductException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java index 15e62924c..72052ac92 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java @@ -59,16 +59,13 @@ public class FineractEntityAccessReadServiceImpl implements FineractEntityAccess * (non-Javadoc) * * @see org.apache.fineract.infrastructure.entityaccess.service. - * FineractEntityAccessReadService#getSQLQueryWithListOfIDsForEntityAccess - * (Long, org.apache.fineract.infrastructure.entityaccess.domain. - * FineractEntityType, - * org.apache.fineract.infrastructure.entityaccess.domain. - * FineractEntityAccessType, - * org.apache.fineract.infrastructure.entityaccess.domain. - * FineractEntityType, boolean) + * FineractEntityAccessReadService#getSQLQueryWithListOfIDsForEntityAccess (Long, + * org.apache.fineract.infrastructure.entityaccess.domain. FineractEntityType, + * org.apache.fineract.infrastructure.entityaccess.domain. FineractEntityAccessType, + * org.apache.fineract.infrastructure.entityaccess.domain. FineractEntityType, boolean) * - * This method returns the list of entity IDs as a comma separated list Or - * null if there is no entity restrictions or if there + * This method returns the list of entity IDs as a comma separated list Or null if there is no entity restrictions + * or if there */ @Override public String getSQLQueryInClause_WithListOfIDsForEntityAccess(FineractEntityType firstEntityType, final Long relId, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteService.java index 27cd7e5ad..fbd8f53f3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteService.java @@ -36,11 +36,9 @@ public interface FineractEntityAccessWriteService { final Long secondEntityId); /* - * CommandProcessingResult updateEntityAccess ( final Long entityAccessId, - * final JsonCommand command); + * CommandProcessingResult updateEntityAccess ( final Long entityAccessId, final JsonCommand command); * - * CommandProcessingResult removeEntityAccess ( final String entityType, - * final Long entityId, final Long accessType, final String - * secondEntityType, final Long secondEntityId); + * CommandProcessingResult removeEntityAccess ( final String entityType, final Long entityId, final Long accessType, + * final String secondEntityType, final Long secondEntityId); */ } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteServiceImpl.java index 8deabfb8f..849c4ce7d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteServiceImpl.java @@ -184,13 +184,11 @@ public class FineractEntityAccessWriteServiceImpl implements FineractEntityAcces } /* - * @Override public CommandProcessingResult updateEntityAccess(Long - * entityAccessId, JsonCommand command) { // TODO Auto-generated method stub - * return null; } + * @Override public CommandProcessingResult updateEntityAccess(Long entityAccessId, JsonCommand command) { // TODO + * Auto-generated method stub return null; } * - * @Override public CommandProcessingResult removeEntityAccess(String - * entityType, Long entityId, Long accessType, String secondEntityType, Long - * secondEntityId) { // TODO Auto-generated method stub return null; } + * @Override public CommandProcessingResult removeEntityAccess(String entityType, Long entityId, Long accessType, + * String secondEntityType, Long secondEntityId) { // TODO Auto-generated method stub return null; } */ } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/GcmConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/GcmConstants.java index c5c2470d4..3b37ea6fb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/GcmConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/GcmConstants.java @@ -59,15 +59,13 @@ public final class GcmConstants { public static final String PARAM_DELAY_WHILE_IDLE = "delay_while_idle"; /** - * HTTP parameter for telling gcm to validate the message without actually - * sending it. + * HTTP parameter for telling gcm to validate the message without actually sending it. */ public static final String PARAM_DRY_RUN = "dry_run"; /** - * HTTP parameter for package name that can be used to restrict message - * delivery by matching against the package name used to generate the - * registration id. + * HTTP parameter for package name that can be used to restrict message delivery by matching against the package + * name used to generate the registration id. */ public static final String PARAM_RESTRICTED_PACKAGE_NAME = "restricted_package_name"; @@ -97,22 +95,19 @@ public final class GcmConstants { public static final String MESSAGE_PRIORITY_HIGH = "high"; /** - * A particular message could not be sent because the GCM servers were not - * available. Used only on JSON requests, as in plain text requests - * unavailability is indicated by a 503 response. + * A particular message could not be sent because the GCM servers were not available. Used only on JSON requests, as + * in plain text requests unavailability is indicated by a 503 response. */ public static final String ERROR_UNAVAILABLE = "Unavailable"; /** - * A particular message could not be sent because the GCM servers - * encountered an error. Used only on JSON requests, as in plain text - * requests internal errors are indicated by a 500 response. + * A particular message could not be sent because the GCM servers encountered an error. Used only on JSON requests, + * as in plain text requests internal errors are indicated by a 500 response. */ public static final String ERROR_INTERNAL_SERVER_ERROR = "InternalServerError"; /** - * Token returned by GCM when the requested registration id has a canonical - * value. + * Token returned by GCM when the requested registration id has a canonical value. */ public static final String TOKEN_CANONICAL_REG_ID = "registration_id"; @@ -207,8 +202,7 @@ public final class GcmConstants { public static final String JSON_FAILURE = "failure"; /** - * JSON-only field representing the number of messages with a canonical - * registration id. + * JSON-only field representing the number of messages with a canonical registration id. */ public static final String JSON_CANONICAL_IDS = "canonical_ids"; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Message.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Message.java index 7da0771f6..fdfd53609 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Message.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Message.java @@ -28,8 +28,7 @@ import org.apache.fineract.infrastructure.gcm.GcmConstants; * GCM message. * *

- * Instances of this class are immutable and should be created using a - * {@link Builder}. Examples: + * Instances of this class are immutable and should be created using a {@link Builder}. Examples: * * Simplest message: * diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/MulticastResult.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/MulticastResult.java index 4980bd17b..67ee75122 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/MulticastResult.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/MulticastResult.java @@ -112,8 +112,7 @@ public final class MulticastResult implements Serializable { } /** - * Gets the number of successful messages that also returned a canonical - * registration id. + * Gets the number of successful messages that also returned a canonical registration id. */ public int getCanonicalIds() { return canonicalIds; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Notification.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Notification.java index 0183b24b3..cc6213c29 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Notification.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Notification.java @@ -26,8 +26,7 @@ import java.util.List; * GCM message notification part. * *

- * Instances of this class are immutable and should be created using a - * {@link Builder}. Examples: + * Instances of this class are immutable and should be created using a {@link Builder}. Examples: * * Simplest notification: * diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Result.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Result.java index 782502745..54b679c89 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Result.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Result.java @@ -25,16 +25,14 @@ import java.util.List; * Result of a GCM message request that returned HTTP status code 200. * *

- * If the message is successfully created, the {@link #getMessageId()} returns - * the message id and {@link #getErrorCodeName()} returns {@literal null}; - * otherwise, {@link #getMessageId()} returns {@literal null} and + * If the message is successfully created, the {@link #getMessageId()} returns the message id and + * {@link #getErrorCodeName()} returns {@literal null}; otherwise, {@link #getMessageId()} returns {@literal null} and * {@link #getErrorCodeName()} returns the code of the error. * *

- * There are cases when a request is accept and the message successfully - * created, but GCM has a canonical registration id for that device. In this - * case, the server should update the registration id to avoid rejected requests - * in the future. + * There are cases when a request is accept and the message successfully created, but GCM has a canonical registration + * id for that device. In this case, the server should update the registration id to avoid rejected requests in the + * future. * *

* In a nutshell, the workflow to handle a result is: diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java index 3beeff11a..312a59ef0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java @@ -116,8 +116,8 @@ public class Sender { } /** - * Set the underlying URLConnection's connect timeout (in milliseconds). A - * timeout value of 0 specifies an infinite timeout. + * Set the underlying URLConnection's connect timeout (in milliseconds). A timeout value of 0 specifies an infinite + * timeout. *

* Default is the system's default timeout. * @@ -131,8 +131,8 @@ public class Sender { } /** - * Set the underlying URLConnection's read timeout (in milliseconds). A - * timeout value of 0 specifies an infinite timeout. + * Set the underlying URLConnection's read timeout (in milliseconds). A timeout value of 0 specifies an infinite + * timeout. *

* Default is the system's default timeout. * @@ -149,15 +149,13 @@ public class Sender { * Sends a message to one device, retrying in case of unavailability. * *

- * Note: this method uses exponential back-off to retry in - * case of service unavailability and hence could block the calling thread - * for many seconds. + * Note: this method uses exponential back-off to retry in case of service unavailability and + * hence could block the calling thread for many seconds. * * @param message * message to be sent, including the device's registration id. * @param to - * registration token, notification key, or topic where the - * message will be sent. + * registration token, notification key, or topic where the message will be sent. * @param retries * number of retries in case of service unavailability errors. * @@ -197,12 +195,11 @@ public class Sender { } /** - * Sends a message without retrying in case of service unavailability. See - * {@link #send(Message, String, int)} for more info. + * Sends a message without retrying in case of service unavailability. See {@link #send(Message, String, int)} for + * more info. * - * @return result of the post, or {@literal null} if the GCM service was - * unavailable or any network exception caused the request to fail, - * or if the response contains more than one result. + * @return result of the post, or {@literal null} if the GCM service was unavailable or any network exception caused + * the request to fail, or if the response contains more than one result. * * @throws InvalidRequestException * if GCM didn't returned a 200 status. @@ -300,9 +297,8 @@ public class Sender { * Sends a message to many devices, retrying in case of unavailability. * *

- * Note: this method uses exponential back-off to retry in - * case of service unavailability and hence could block the calling thread - * for many seconds. + * Note: this method uses exponential back-off to retry in case of service unavailability and + * hence could block the calling thread for many seconds. * * @param message * message to be sent. @@ -391,8 +387,7 @@ public class Sender { } /** - * Updates the status of the messages sent to devices and the list of - * devices that should be retried. + * Updates the status of the messages sent to devices and the list of devices that should be retried. * * @param unsentRegIds * list of devices that are still pending an update. @@ -424,11 +419,11 @@ public class Sender { } /** - * Sends a message without retrying in case of service unavailability. See - * {@link #send(Message, List, int)} for more info. + * Sends a message without retrying in case of service unavailability. See {@link #send(Message, List, int)} for + * more info. * - * @return multicast results if the message was sent successfully, - * {@literal null} if it failed but could be retried. + * @return multicast results if the message was sent successfully, {@literal null} if it failed but could be + * retried. * * @throws IllegalArgumentException * if registrationIds is {@literal null} or empty. @@ -623,9 +618,8 @@ public class Sender { * Makes an HTTP POST request to a given endpoint. * *

- * Note: the returned connected should not be - * disconnected, otherwise it would kill persistent connections made using - * Keep-Alive. + * Note: the returned connected should not be disconnected, otherwise it would kill persistent + * connections made using Keep-Alive. * * @param url * endpoint to post the request. diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/annotation/CronMethodParser.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/annotation/CronMethodParser.java index 69e5900f9..cff50fbc1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/annotation/CronMethodParser.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/annotation/CronMethodParser.java @@ -65,8 +65,7 @@ public class CronMethodParser { } /** - * method adds all the method names to map with annotation attribute value - * as key + * method adds all the method names to map with annotation attribute value as key */ private static void findAnnotationMethods(final Class annotationClass, final String attributeName) throws IOException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java index 169532be4..bbbab50d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java @@ -59,9 +59,8 @@ import org.springframework.scheduling.quartz.SchedulerFactoryBean; import org.springframework.stereotype.Service; /** - * Service class to create and load batch jobs to Scheduler using - * {@link SchedulerFactoryBean} ,{@link MethodInvokingJobDetailFactoryBean} and - * {@link CronTriggerFactoryBean} + * Service class to create and load batch jobs to Scheduler using {@link SchedulerFactoryBean} + * ,{@link MethodInvokingJobDetailFactoryBean} and {@link CronTriggerFactoryBean} */ @Service public class JobRegisterServiceImpl implements JobRegisterService, ApplicationListener { @@ -255,10 +254,9 @@ public class JobRegisterServiceImpl implements JobRegisterService, ApplicationLi } /** - * Need to use ContextClosedEvent instead of ContextStoppedEvent because in - * case Spring Boot fails to start-up (e.g. because Tomcat port is already - * in use) then org.springframework.boot.SpringApplication.run(String...) - * does a context.close(); and not a context.stop(); + * Need to use ContextClosedEvent instead of ContextStoppedEvent because in case Spring Boot fails to start-up (e.g. + * because Tomcat port is already in use) then org.springframework.boot.SpringApplication.run(String...) does a + * context.close(); and not a context.stop(); */ @Override public void onApplicationEvent(@SuppressWarnings("unused") ContextClosedEvent event) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java index 1ef28dfb9..257cf02b9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java @@ -37,9 +37,8 @@ import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; /** - * Global job Listener class to set Tenant details to - * {@link ThreadLocalContextUtil} for batch Job and stores the batch job status - * to database after the execution + * Global job Listener class to set Tenant details to {@link ThreadLocalContextUtil} for batch Job and stores the batch + * job status to database after the execution * */ @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerStopListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerStopListener.java old mode 100755 new mode 100644 index 8103eaf6d..eb8c9612e --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerStopListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerStopListener.java @@ -25,8 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Global job Listener class to Stop the temporary scheduler once job execution - * completes + * Global job Listener class to Stop the temporary scheduler once job execution completes */ @Component public class SchedulerStopListener implements JobListener { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/openjpa/OpenJpaDialect.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/openjpa/OpenJpaDialect.java index db5a4328d..744b37430 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/openjpa/OpenJpaDialect.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/openjpa/OpenJpaDialect.java @@ -37,8 +37,8 @@ import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionException; /** - * {@link org.springframework.orm.jpa.JpaDialect} implementation for Apache - * OpenJPA. Developed and tested against OpenJPA 2.2. + * {@link org.springframework.orm.jpa.JpaDialect} implementation for Apache OpenJPA. Developed and tested against + * OpenJPA 2.2. * * @author Costin Leau * @author Juergen Hoeller @@ -94,8 +94,8 @@ public class OpenJpaDialect extends DefaultJpaDialect { } /** - * Transaction data Object exposed from {@code beginTransaction}, - * implementing the {@link SavepointManager} interface. + * Transaction data Object exposed from {@code beginTransaction}, implementing the {@link SavepointManager} + * interface. */ private static class OpenJpaTransactionData implements SavepointManager { @@ -131,11 +131,9 @@ public class OpenJpaDialect extends DefaultJpaDialect { } /** - * {@link ConnectionHandle} implementation that fetches a new - * OpenJPA-provided Connection for every {@code getConnection} call and - * closes the Connection on {@code releaseConnection}. This is necessary - * because OpenJPA requires the fetched Connection to be closed before - * continuing EntityManager work. + * {@link ConnectionHandle} implementation that fetches a new OpenJPA-provided Connection for every + * {@code getConnection} call and closes the Connection on {@code releaseConnection}. This is necessary because + * OpenJPA requires the fetched Connection to be closed before continuing EntityManager work. * * @see org.apache.openjpa.persistence.OpenJPAEntityManager#getConnection() */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/openjpa/OpenJpaVendorAdapter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/openjpa/OpenJpaVendorAdapter.java index 02d4f9b7d..37b5c29c1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/openjpa/OpenJpaVendorAdapter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/openjpa/OpenJpaVendorAdapter.java @@ -30,13 +30,12 @@ import org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter; import org.springframework.orm.jpa.vendor.Database; /** - * {@link org.springframework.orm.jpa.JpaVendorAdapter} implementation for - * Apache OpenJPA. Developed and tested against OpenJPA 2.2. + * {@link org.springframework.orm.jpa.JpaVendorAdapter} implementation for Apache OpenJPA. Developed and tested against + * OpenJPA 2.2. * *

- * Exposes OpenJPA's persistence provider and EntityManager extension interface, - * and supports {@link AbstractJpaVendorAdapter}'s common configuration - * settings. + * Exposes OpenJPA's persistence provider and EntityManager extension interface, and supports + * {@link AbstractJpaVendorAdapter}'s common configuration settings. * * @author Costin Leau * @author Juergen Hoeller @@ -90,8 +89,7 @@ public class OpenJpaVendorAdapter extends AbstractJpaVendorAdapter { * * @param database * the specified database - * @return the OpenJPA database dictionary name, or {@code null} if none - * found + * @return the OpenJPA database dictionary name, or {@code null} if none found */ protected String determineDatabaseDictionary(Database database) { switch (database) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailAttachmentFileFormat.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailAttachmentFileFormat.java index 2360b8748..50a27e14c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailAttachmentFileFormat.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailAttachmentFileFormat.java @@ -147,8 +147,7 @@ public enum ReportMailingJobEmailAttachmentFileFormat { } /** - * get a {@link EnumOptionData} representation of the - * {@link ReportMailingJobEmailAttachmentFileFormat} object + * get a {@link EnumOptionData} representation of the {@link ReportMailingJobEmailAttachmentFileFormat} object * * @return {@link EnumOptionData} object */ @@ -160,8 +159,8 @@ public enum ReportMailingJobEmailAttachmentFileFormat { } /** - * get the {@link EnumOptionData} representation of all valid - * {@link ReportMailingJobEmailAttachmentFileFormat} objects + * get the {@link EnumOptionData} representation of all valid {@link ReportMailingJobEmailAttachmentFileFormat} + * objects * * @return List of {@link EnumOptionData} objects */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobStretchyReportParamDateOption.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobStretchyReportParamDateOption.java index 6cf84a8de..1894e1763 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobStretchyReportParamDateOption.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobStretchyReportParamDateOption.java @@ -46,8 +46,7 @@ public enum ReportMailingJobStretchyReportParamDateOption { } /** - * Creates a new {@link ReportMailingJobStretchyReportParamDateOption} - * object + * Creates a new {@link ReportMailingJobStretchyReportParamDateOption} object * * @param value * value of the enum constant @@ -68,8 +67,7 @@ public enum ReportMailingJobStretchyReportParamDateOption { } /** - * Creates a new {@link ReportMailingJobStretchyReportParamDateOption} - * object + * Creates a new {@link ReportMailingJobStretchyReportParamDateOption} object * * @param id * id of the enum constant @@ -125,8 +123,7 @@ public enum ReportMailingJobStretchyReportParamDateOption { } /** - * @return list of valid ReportMailingJobStretchyReportParamDateOption - * values + * @return list of valid ReportMailingJobStretchyReportParamDateOption values **/ public static Object[] validValues() { List validValues = new ArrayList<>(); @@ -141,8 +138,7 @@ public enum ReportMailingJobStretchyReportParamDateOption { } /** - * get a {@link EnumOptionData} representation of the - * {@link ReportMailingJobStretchyReportParamDateOption} object + * get a {@link EnumOptionData} representation of the {@link ReportMailingJobStretchyReportParamDateOption} object * * @return {@link EnumOptionData} object */ @@ -154,8 +150,8 @@ public enum ReportMailingJobStretchyReportParamDateOption { } /** - * get the {@link EnumOptionData} representation of all valid - * {@link ReportMailingJobStretchyReportParamDateOption} objects + * get the {@link EnumOptionData} representation of all valid {@link ReportMailingJobStretchyReportParamDateOption} + * objects * * @return List of {@link EnumOptionData} objects */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobTimelineData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobTimelineData.java index e2ca6473e..4abc53ab4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobTimelineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobTimelineData.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.data; import org.joda.time.LocalDate; /** - * Immutable data object represent the timeline events of a report mailing job - * (creation) + * Immutable data object represent the timeline events of a report mailing job (creation) **/ @SuppressWarnings("unused") public class ReportMailingJobTimelineData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJob.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJob.java index 70f535d98..ad5501c46 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJob.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJob.java @@ -345,8 +345,7 @@ public class ReportMailingJob extends AbstractAuditableCustom { } /** - * delete the report mailing job, set the isDeleted property to 1 and alter - * the name + * delete the report mailing job, set the isDeleted property to 1 and alter the name * * **/ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepository.java index 39f1de8b2..42aabb8d1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepository.java @@ -25,8 +25,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor; public interface ReportMailingJobRepository extends JpaRepository, JpaSpecificationExecutor { /** - * Returns all instances of {@link ReportMailingJob} where isActive is true - * and isDeleted is false + * Returns all instances of {@link ReportMailingJob} where isActive is true and isDeleted is false * * @return instances of {@link ReportMailingJob} */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepositoryWrapper.java index 068223fe9..2a4077a25 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepositoryWrapper.java @@ -33,8 +33,7 @@ public class ReportMailingJobRepositoryWrapper { } /** - * find report mailing job by ID, throw a "entity not found" exception if - * the job does not exist + * find report mailing job by ID, throw a "entity not found" exception if the job does not exist * * @param id * -- the identifier of the report mailing job to be found diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobConfigurationNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobConfigurationNotFoundException.java index a0588f004..a1e27e1f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobConfigurationNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobConfigurationNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when report mailing job configuration - * resources are not found. + * A {@link RuntimeException} thrown when report mailing job configuration resources are not found. **/ @SuppressWarnings("serial") public class ReportMailingJobConfigurationNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobNotFoundException.java index 0fe74ddb0..bdd86bc24 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when report mailing job resources are not - * found. + * A {@link RuntimeException} thrown when report mailing job resources are not found. **/ @SuppressWarnings("serial") public class ReportMailingJobNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobRunHistoryNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobRunHistoryNotFoundException.java index 9f7d57514..b413e1096 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobRunHistoryNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobRunHistoryNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when report mailing job run history - * resources are not found. + * A {@link RuntimeException} thrown when report mailing job run history resources are not found. **/ @SuppressWarnings("serial") public class ReportMailingJobRunHistoryNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/helper/IPv4Helper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/helper/IPv4Helper.java index 65f5543ff..89ee6b82e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/helper/IPv4Helper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/helper/IPv4Helper.java @@ -26,8 +26,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * This utility provides methods to either convert an IPv4 address to its long - * format or a 32bit dotted format. + * This utility provides methods to either convert an IPv4 address to its long format or a 32bit dotted format. * * @see http://hawkee.com/snippet/9731/ */ @@ -151,8 +150,7 @@ public class IPv4Helper { /** * check if the java application is not running on a local machine * - * @return true if the application is not running on a local machine else - * false + * @return true if the application is not running on a local machine else false **/ public static boolean applicationIsNotRunningOnLocalMachine() { return !applicationIsRunningOnLocalMachine(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailServiceImpl.java index 0c976db45..97c3b8611 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailServiceImpl.java @@ -101,8 +101,7 @@ public class ReportMailingJobEmailServiceImpl implements ReportMailingJobEmailSe } /** - * get a report mailing job configuration object by name from collection of - * objects + * get a report mailing job configuration object by name from collection of objects * * @param name * -- the value of the name property diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformService.java index 1553fa59d..3285ece2a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformService.java @@ -26,8 +26,7 @@ import org.apache.fineract.infrastructure.reportmailingjob.data.ReportMailingJob public interface ReportMailingJobReadPlatformService { /** - * Retrieve all report mailing jobs that have the isDeleted property set to - * 0 + * Retrieve all report mailing jobs that have the isDeleted property set to 0 **/ Page retrieveAllReportMailingJobs(SearchParameters searchParameters); @@ -42,8 +41,7 @@ public interface ReportMailingJobReadPlatformService { ReportMailingJobData retrieveReportMailingJobEnumOptions(); /** - * Retrieve all active report mailing jobs that have their isDeleted - * property set to 0 + * Retrieve all active report mailing jobs that have their isDeleted property set to 0 **/ Collection retrieveAllActiveReportMailingJobs(); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformService.java index d4bcd83e9..081da7871 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformService.java @@ -25,8 +25,7 @@ import org.apache.fineract.infrastructure.reportmailingjob.data.ReportMailingJob public interface ReportMailingJobRunHistoryReadPlatformService { /** - * Retrieve all report mailing run history with similar job id to the one - * passed + * Retrieve all report mailing run history with similar job id to the one passed * * @param reportMailingJobId * ReportMailingJob identifier diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java index 415b8d26b..7a343edc4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java @@ -351,8 +351,7 @@ public class ReportMailingJobWritePlatformServiceImpl implements ReportMailingJo } /** - * create the next recurring DateTime from recurrence pattern, start - * DateTime and current DateTime + * create the next recurring DateTime from recurrence pattern, start DateTime and current DateTime * * @param recurrencePattern * @param startDateTime diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/util/ReportMailingJobDateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/util/ReportMailingJobDateUtil.java index 18e6c539a..7357234e2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/util/ReportMailingJobDateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/util/ReportMailingJobDateUtil.java @@ -88,8 +88,7 @@ public class ReportMailingJobDateUtil { } /** - * get date as string based on the value of the - * {@link ReportMailingJobStretchyReportParamDateOption} object + * get date as string based on the value of the {@link ReportMailingJobStretchyReportParamDateOption} object * * @param reportMailingJobStretchyReportParamDateOption * {@link ReportMailingJobStretchyReportParamDateOption} Enum diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/validation/ReportMailingJobValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/validation/ReportMailingJobValidator.java index 9a7900a91..c65be8906 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/validation/ReportMailingJobValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/validation/ReportMailingJobValidator.java @@ -318,8 +318,7 @@ public class ReportMailingJobValidator { } /** - * throw a PlatformApiDataValidationException exception if there are - * validation errors + * throw a PlatformApiDataValidationException exception if there are validation errors * * @param dataValidationErrors * -- list of ApiParameterError objects diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/data/PlatformRequestLog.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/data/PlatformRequestLog.java index 923f03475..1ea75068a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/data/PlatformRequestLog.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/data/PlatformRequestLog.java @@ -25,8 +25,7 @@ import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.time.StopWatch; /** - * Immutable data object representing platform API request used for - * logging/debugging. + * Immutable data object representing platform API request used for logging/debugging. */ public final class PlatformRequestLog { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidTenantIdentiferException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidTenantIdentiferException.java index c5fbcba2f..5cc1901ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidTenantIdentiferException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidTenantIdentiferException.java @@ -19,8 +19,7 @@ package org.apache.fineract.infrastructure.security.exception; /** - * {@link RuntimeException} thrown when an invalid tenant identifier is used in - * request to platform. + * {@link RuntimeException} thrown when an invalid tenant identifier is used in request to platform. * * */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/NoAuthorizationException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/NoAuthorizationException.java index 29b759c0a..53b3d2126 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/NoAuthorizationException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/NoAuthorizationException.java @@ -19,8 +19,8 @@ package org.apache.fineract.infrastructure.security.exception; /** - * A {@link RuntimeException} that is thrown in the case where a user does not - * have sufficient authorization to execute operation on platform. + * A {@link RuntimeException} that is thrown in the case where a user does not have sufficient authorization to execute + * operation on platform. */ public class NoAuthorizationException extends RuntimeException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/ResetPasswordException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/ResetPasswordException.java index db2a26aa9..ae95341f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/ResetPasswordException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/ResetPasswordException.java @@ -24,8 +24,8 @@ import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; /** - * A {@link RuntimeException} that is thrown in the case where a user does not - * have sufficient authorization to execute operation on platform. + * A {@link RuntimeException} that is thrown in the case where a user does not have sufficient authorization to execute + * operation on platform. */ public class ResetPasswordException extends PlatformApiDataValidationException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/InsecureTwoFactorAuthenticationFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/InsecureTwoFactorAuthenticationFilter.java index d54927dc6..8ca71541b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/InsecureTwoFactorAuthenticationFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/InsecureTwoFactorAuthenticationFilter.java @@ -36,11 +36,9 @@ import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; /** - * A dummy {@link TwoFactorAuthenticationFilter} filter used when 'twofactor' - * environment profile is not active. + * A dummy {@link TwoFactorAuthenticationFilter} filter used when 'twofactor' environment profile is not active. * - * This filter adds 'TWOFACTOR_AUTHENTICATED' authority to every authenticated - * platform user. + * This filter adds 'TWOFACTOR_AUTHENTICATED' authority to every authenticated platform user. */ @Service(value = "twoFactorAuthFilter") @Profile("!twofactor") diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareBasicAuthenticationFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareBasicAuthenticationFilter.java index 83f55a988..d7b2c3303 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareBasicAuthenticationFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareBasicAuthenticationFilter.java @@ -50,17 +50,14 @@ import org.springframework.stereotype.Service; /** * A customised version of spring security's {@link BasicAuthenticationFilter}. * - * This filter is responsible for extracting multi-tenant and basic auth - * credentials from the request and checking that the details provided are - * valid. + * This filter is responsible for extracting multi-tenant and basic auth credentials from the request and checking that + * the details provided are valid. * - * If multi-tenant and basic auth credentials are valid, the details of the - * tenant are stored in {@link FineractPlatformTenant} and stored in a - * {@link ThreadLocal} variable for this request using + * If multi-tenant and basic auth credentials are valid, the details of the tenant are stored in + * {@link FineractPlatformTenant} and stored in a {@link ThreadLocal} variable for this request using * {@link ThreadLocalContextUtil}. * - * If multi-tenant and basic auth credentials are invalid, a http error response - * is returned. + * If multi-tenant and basic auth credentials are invalid, a http error response is returned. */ @Service(value = "basicAuthenticationProcessingFilter") @Profile("basicauth") diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareTenantIdentifierFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareTenantIdentifierFilter.java index 4680b655b..42a26fc1e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareTenantIdentifierFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareTenantIdentifierFilter.java @@ -45,17 +45,14 @@ import org.springframework.web.filter.GenericFilterBean; /** * - * This filter is responsible for extracting multi-tenant from the request and - * setting Cross-Origin details to response. + * This filter is responsible for extracting multi-tenant from the request and setting Cross-Origin details to response. * - * If multi-tenant are valid, the details of the tenant are stored in - * {@link FineractPlatformTenant} and stored in a {@link ThreadLocal} variable - * for this request using {@link ThreadLocalContextUtil}. + * If multi-tenant are valid, the details of the tenant are stored in {@link FineractPlatformTenant} and stored in a + * {@link ThreadLocal} variable for this request using {@link ThreadLocalContextUtil}. * * If multi-tenant are invalid, a http error response is returned. * - * Used to support Oauth2 authentication and the service is loaded only when - * "oauth" profile is active. + * Used to support Oauth2 authentication and the service is loaded only when "oauth" profile is active. */ @Service(value = "tenantIdentifierProcessingFilter") @Profile("oauth") diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TwoFactorAuthenticationFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TwoFactorAuthenticationFilter.java index bedf16302..6758c552b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TwoFactorAuthenticationFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TwoFactorAuthenticationFilter.java @@ -44,19 +44,15 @@ import org.springframework.stereotype.Service; import org.springframework.web.filter.GenericFilterBean; /** - * This filter is responsible for handling two-factor authentication. The filter - * is enabled when 'twofactor' environment profile is active, otherwise - * {@link InsecureTwoFactorAuthenticationFilter} is used. + * This filter is responsible for handling two-factor authentication. The filter is enabled when 'twofactor' environment + * profile is active, otherwise {@link InsecureTwoFactorAuthenticationFilter} is used. * - * This filter validates an access-token provided as a header - * 'Fineract-Platform-TFA-Token'. If a valid token is provided, a - * 'TWOFACTOR_AUTHENTICATED' authority is added to the current authentication. - * If an invalid(non-existent or invalid) token is provided, 403 response is - * returned. + * This filter validates an access-token provided as a header 'Fineract-Platform-TFA-Token'. If a valid token is + * provided, a 'TWOFACTOR_AUTHENTICATED' authority is added to the current authentication. If an invalid(non-existent or + * invalid) token is provided, 403 response is returned. * - * An authenticated platform user with permission 'BYPASS_TWOFACTOR' will always - * be granted 'TWOFACTOR_AUTHENTICATED' authority regardless of the value of the - * 'Fineract-Platform-TFA-Token' header. + * An authenticated platform user with permission 'BYPASS_TWOFACTOR' will always be granted 'TWOFACTOR_AUTHENTICATED' + * authority regardless of the value of the 'Fineract-Platform-TFA-Token' header. */ @Service(value = "twoFactorAuthFilter") @Profile("twofactor") diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/BasicAuthTenantDetailsServiceJdbc.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/BasicAuthTenantDetailsServiceJdbc.java index 0baa31849..2269c5b6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/BasicAuthTenantDetailsServiceJdbc.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/BasicAuthTenantDetailsServiceJdbc.java @@ -33,8 +33,8 @@ import org.springframework.jdbc.core.RowMapper; import org.springframework.stereotype.Service; /** - * A JDBC implementation of {@link BasicAuthTenantDetailsService} for loading a - * tenants details by a tenantIdentifier. + * A JDBC implementation of {@link BasicAuthTenantDetailsService} for loading a tenants details by a + * tenantIdentifier. */ @Service public class BasicAuthTenantDetailsServiceJdbc implements BasicAuthTenantDetailsService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/CustomAuthenticationFailureHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/CustomAuthenticationFailureHandler.java index 0edc6bd35..2dda645d0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/CustomAuthenticationFailureHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/CustomAuthenticationFailureHandler.java @@ -45,11 +45,10 @@ public class CustomAuthenticationFailureHandler implements AuthenticationFailure public CustomAuthenticationFailureHandler() {} /** - * Performs the redirect or forward to the {@code defaultFailureUrl} if set, - * otherwise returns a 401 error code. + * Performs the redirect or forward to the {@code defaultFailureUrl} if set, otherwise returns a 401 error code. *

- * If redirecting or forwarding, {@code saveException} will be called to - * cache the exception for use in the target view. + * If redirecting or forwarding, {@code saveException} will be called to cache the exception for use in the target + * view. */ @Override public void onAuthenticationFailure(final HttpServletRequest request, final HttpServletResponse response, @@ -80,10 +79,9 @@ public class CustomAuthenticationFailureHandler implements AuthenticationFailure /** * Caches the {@code AuthenticationException} for use in view rendering. *

- * If {@code forwardToDestination} is set to true, request scope will be - * used, otherwise it will attempt to store the exception in the session. If - * there is no session and {@code allowSessionCreation} is {@code true} a - * session will be created. Otherwise the exception will not be stored. + * If {@code forwardToDestination} is set to true, request scope will be used, otherwise it will attempt to store + * the exception in the session. If there is no session and {@code allowSessionCreation} is {@code true} a session + * will be created. Otherwise the exception will not be stored. */ protected final void saveException(final HttpServletRequest request, final AuthenticationException exception) { if (this.forwardToDestination) { @@ -113,8 +111,8 @@ public class CustomAuthenticationFailureHandler implements AuthenticationFailure } /** - * If set to true, performs a forward to the failure destination - * URL instead of a redirect. Defaults to false. + * If set to true, performs a forward to the failure destination URL instead of a redirect. Defaults to + * false. */ public void setUseForward(final boolean forwardToDestination) { this.forwardToDestination = forwardToDestination; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/JdbcTenantDetailsService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/JdbcTenantDetailsService.java index 81c0a02af..701abdc0d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/JdbcTenantDetailsService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/JdbcTenantDetailsService.java @@ -34,8 +34,8 @@ import org.springframework.jdbc.core.RowMapper; import org.springframework.stereotype.Service; /** - * A JDBC implementation of {@link TenantDetailsService} for loading a tenants - * details by a tenantIdentifier. + * A JDBC implementation of {@link TenantDetailsService} for loading a tenants details by a + * tenantIdentifier. */ @Service public class JdbcTenantDetailsService implements TenantDetailsService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformSecurityContext.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformSecurityContext.java index 33f64b0fa..55831ce21 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformSecurityContext.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformSecurityContext.java @@ -26,11 +26,10 @@ public interface PlatformSecurityContext { AppUser authenticatedUser(); /** - * Convenience method returns null (does not throw an exception) if an - * authenticated user is not present + * Convenience method returns null (does not throw an exception) if an authenticated user is not present * - * To be used only in service layer methods that can be triggered via both - * the API and batch Jobs (which do not have an authenticated user) + * To be used only in service layer methods that can be triggered via both the API and batch Jobs (which do not have + * an authenticated user) * * @return */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/SpringSecurityPlatformSecurityContext.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/SpringSecurityPlatformSecurityContext.java index 7bf411a1e..c48490fd8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/SpringSecurityPlatformSecurityContext.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/SpringSecurityPlatformSecurityContext.java @@ -37,8 +37,7 @@ import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; /** - * Wrapper around spring security's {@link SecurityContext} for extracted the - * current authenticated {@link AppUser}. + * Wrapper around spring security's {@link SecurityContext} for extracted the current authenticated {@link AppUser}. */ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TenantAwareJpaPlatformUserDetailsService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TenantAwareJpaPlatformUserDetailsService.java index 7bdeac92c..07bf8fd8c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TenantAwareJpaPlatformUserDetailsService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TenantAwareJpaPlatformUserDetailsService.java @@ -29,8 +29,7 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; /** - * Used in securityContext.xml as implementation of spring security's - * {@link UserDetailsService}. + * Used in securityContext.xml as implementation of spring security's {@link UserDetailsService}. */ @Service(value = "userDetailsService") public class TenantAwareJpaPlatformUserDetailsService implements PlatformUserDetailsService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLBuilder.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLBuilder.java index 9bdf08de3..bc4a1382b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLBuilder.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLBuilder.java @@ -25,13 +25,11 @@ import java.util.Locale; import java.util.regex.Pattern; /** - * Utility to assemble the WHERE clause of an SQL query without the risk of SQL - * injection. + * Utility to assemble the WHERE clause of an SQL query without the risk of SQL injection. * *

- * When using this utility instead of manually assembling SQL queries, then - * {@link SQLInjectionValidator} should not be required anymore. (Correctly - * using this means only ever passing completely fixed String literals to .) + * When using this utility instead of manually assembling SQL queries, then {@link SQLInjectionValidator} should not be + * required anymore. (Correctly using this means only ever passing completely fixed String literals to .) * * @author Michael Vorburger */ @@ -51,15 +49,14 @@ public class SQLBuilder { private final ArrayList crts = new ArrayList(); /** - * Adds a criteria for a SQL WHERE clause. All criteria are appended by AND - * (support for OR, or nesting, can be added when needed). + * Adds a criteria for a SQL WHERE clause. All criteria are appended by AND (support for OR, or nesting, can be + * added when needed). * * @param criteria - * The name of the column to be filtered, and an operator; e.g. - * "name =" or "age >" (but without '?' placeholder) + * The name of the column to be filtered, and an operator; e.g. "name =" or "age >" (but without '?' + * placeholder) * @param argument - * The argument to be filtered on (e.g. "Michael" or 123). The - * null value is explicitly permitted. + * The argument to be filtered on (e.g. "Michael" or 123). The null value is explicitly permitted. */ public void addCriteria(String criteria, Object argument) { if (criteria == null || criteria.trim().isEmpty()) { @@ -104,8 +101,7 @@ public class SQLBuilder { } /** - * Delegates to {@link #addCriteria(String, Object)} if argument is not - * null, otherwise does nothing. + * Delegates to {@link #addCriteria(String, Object)} if argument is not null, otherwise does nothing. */ public void addNonNullCriteria(String criteria, Object argument) { if (argument != null) { @@ -114,11 +110,9 @@ public class SQLBuilder { } /** - * Returns a SQL WHERE clause, created from the - * {@link #addCriteria(String, Object)}, with '?' placeholders. + * Returns a SQL WHERE clause, created from the {@link #addCriteria(String, Object)}, with '?' placeholders. * - * @return SQL WHERE clause, almost always starting with " WHERE ..." - * (unless no criteria, then empty) + * @return SQL WHERE clause, almost always starting with " WHERE ..." (unless no criteria, then empty) */ public String getSQLTemplate() { if (sb.length() > 0) { @@ -130,17 +124,16 @@ public class SQLBuilder { /** * Returns the arguments for the WHERE clause. * - * @return Object array suitable for use with Spring Framework JdbcTemplate - * (or plain JDBC {@link PreparedStatement}) + * @return Object array suitable for use with Spring Framework JdbcTemplate (or plain JDBC + * {@link PreparedStatement}) */ public Object[] getArguments() { return args.toArray(); } /* - * Returns a String representation suitable for debugging and log output. - * This is ONLY intended for debugging in logs, and NEVER for passing to a - * JDBC database. + * Returns a String representation suitable for debugging and log output. This is ONLY intended for debugging in + * logs, and NEVER for passing to a JDBC database. */ @Override public String toString() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiQueueResourceData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiQueueResourceData.java index 36ff198d3..0ed957b15 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiQueueResourceData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiQueueResourceData.java @@ -22,8 +22,7 @@ import com.google.gson.Gson; import java.util.Collection; /** - * Immutable data object representing the API request body sent in the POST - * request to the "/queue" resource + * Immutable data object representing the API request body sent in the POST request to the "/queue" resource **/ public class SmsMessageApiQueueResourceData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiReportResourceData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiReportResourceData.java index 9f1fd322d..f2b24f631 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiReportResourceData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiReportResourceData.java @@ -22,8 +22,7 @@ import com.google.gson.Gson; import java.util.List; /** - * Immutable data object representing the API request body sent in the POST - * request to the "/report" resource + * Immutable data object representing the API request body sent in the POST request to the "/report" resource **/ public class SmsMessageApiReportResourceData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageDeliveryReportData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageDeliveryReportData.java index 3e0f51bbb..d59320230 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageDeliveryReportData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageDeliveryReportData.java @@ -19,8 +19,7 @@ package org.apache.fineract.infrastructure.sms.data; /** - * Immutable data object representing an outbound SMS message delivery report - * data + * Immutable data object representing an outbound SMS message delivery report data **/ public class SmsMessageDeliveryReportData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobService.java index e12ca82d2..fb3564957 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobService.java @@ -41,8 +41,7 @@ public interface SmsMessageScheduledJobService { public void sendTriggeredMessages(Map> smsDataMap); /** - * Sends a triggered batch of SMS messages to SMS gateway using specified - * provider. + * Sends a triggered batch of SMS messages to SMS gateway using specified provider. * * @param smsMessage * the SMS messages to queue for sending. diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java index 42d6e430d..b15f3f02b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java @@ -60,8 +60,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.client.RestTemplate; /** - * Scheduled job services that send SMS messages and get delivery reports for - * the sent SMS messages + * Scheduled job services that send SMS messages and get delivery reports for the sent SMS messages **/ @Service public class SmsMessageScheduledJobServiceImpl implements SmsMessageScheduledJobService { @@ -248,8 +247,7 @@ public class SmsMessageScheduledJobServiceImpl implements SmsMessageScheduledJob } /** - * get SMS message delivery reports from the SMS gateway (or intermediate - * gateway) + * get SMS message delivery reports from the SMS gateway (or intermediate gateway) **/ @Override @Transactional diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformServiceJpaRepositoryImpl.java index e3c27344b..28feed30c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformServiceJpaRepositoryImpl.java @@ -117,8 +117,7 @@ public class SmsWritePlatformServiceJpaRepositoryImpl implements SmsWritePlatfor } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(@SuppressWarnings("unused") final JsonCommand command, final DataIntegrityViolationException dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodServiceImpl.java index 1b21573b8..92bf879fe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodServiceImpl.java @@ -89,8 +89,7 @@ public class WriteLikelihoodServiceImpl implements WriteLikelihoodService { } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final DataIntegrityViolationException dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/util/MathUtil.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/util/MathUtil.java index 2f9dac8ab..5cf94b6c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/util/MathUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/util/MathUtil.java @@ -308,8 +308,7 @@ public class MathUtil { } /** - * @return BigDecimal with scale set to the 'digitsAfterDecimal' of the - * parameter currency + * @return BigDecimal with scale set to the 'digitsAfterDecimal' of the parameter currency */ public static BigDecimal normalizeAmount(BigDecimal amount, @NotNull MonetaryCurrency currency) { return amount == null ? null : amount.setScale(currency.getDigitsAfterDecimal(), MoneyHelper.getRoundingMode()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepositoryWrapper.java index 479336ca5..47fe79b0f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepositoryWrapper.java @@ -28,8 +28,7 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link HolidayRepository} that adds NULL checking and Error - * handling capabilities + * Wrapper for {@link HolidayRepository} that adds NULL checking and Error handling capabilities *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java index c355a0342..43c4a2768 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java @@ -24,15 +24,13 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link ApplicationCurrencyRepository} that is responsible for - * checking if {@link ApplicationCurrency} is returned when using - * findOne repository method and throwing an appropriate not found - * exception. + * Wrapper for {@link ApplicationCurrencyRepository} that is responsible for checking if {@link ApplicationCurrency} is + * returned when using findOne repository method and throwing an appropriate not found exception. *

* *

- * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link ApplicationCurrencyRepository} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where + * {@link ApplicationCurrencyRepository} is required. *

*/ @Service @@ -59,8 +57,7 @@ public class ApplicationCurrencyRepositoryWrapper { } /** - * Used when its not needed for {@link ApplicationCurrency} to inherit - * decimal place settings of existing currency. + * Used when its not needed for {@link ApplicationCurrency} to inherit decimal place settings of existing currency. */ public ApplicationCurrency findOneWithNotFoundDetection(final String currencyCode) { final ApplicationCurrency applicationCurrency = this.repository.findOneByCode(currencyCode); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyInUseException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyInUseException.java index 30ac3ca13..580fdc2ae 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyInUseException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyInUseException.java @@ -21,8 +21,7 @@ package org.apache.fineract.organisation.monetary.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when trying to delete a currency that is - * still in use. + * A {@link RuntimeException} thrown when trying to delete a currency that is still in use. */ public class CurrencyInUseException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/exception/OrganizationalCurrencyNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/exception/OrganizationalCurrencyNotFoundException.java index dfaf2b885..923fe396a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/exception/OrganizationalCurrencyNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/exception/OrganizationalCurrencyNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.organisation.monetary.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when urrency is not supported by an - * Organization. + * A {@link RuntimeException} thrown when urrency is not supported by an Organization. */ public class OrganizationalCurrencyNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java index d3a8f9baf..12c412fc4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java @@ -74,8 +74,7 @@ import org.springframework.stereotype.Component; public class OfficesApiResource { /** - * The set of parameters that are supported in response for - * {@link OfficeData}. + * The set of parameters that are supported in response for {@link OfficeData}. */ private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "nameDecorated", "externalId", "openingDate", "hierarchy", "parentId", "parentName", "allowedParents")); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepositoryWrapper.java index 376cdf603..325cc5cd2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepositoryWrapper.java @@ -25,8 +25,7 @@ import org.springframework.transaction.annotation.Transactional; /** *

- * Wrapper for {@link OfficeRepository} that adds NULL checking and Error - * handling capabilities + * Wrapper for {@link OfficeRepository} that adds NULL checking and Error handling capabilities *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OrganisationCurrencyRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OrganisationCurrencyRepositoryWrapper.java index 10c1f0ff6..5e964fcfc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OrganisationCurrencyRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OrganisationCurrencyRepositoryWrapper.java @@ -24,14 +24,13 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link OrganisationCurrency} that is responsible for checking if - * {@link OrganisationCurrency} is returned when using findOne - * repository method and throwing an appropriate not found exception. + * Wrapper for {@link OrganisationCurrency} that is responsible for checking if {@link OrganisationCurrency} is returned + * when using findOne repository method and throwing an appropriate not found exception. *

* *

- * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link OrganisationCurrency} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where {@link OrganisationCurrency} is + * required. *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/InvalidOfficeException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/InvalidOfficeException.java index 21298bd60..4a4c989d0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/InvalidOfficeException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/InvalidOfficeException.java @@ -21,8 +21,7 @@ package org.apache.fineract.organisation.office.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when office mismatch - * occurs + * {@link AbstractPlatformDomainRuleException} thrown when office mismatch occurs */ public class InvalidOfficeException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/OfficeTransactionNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/OfficeTransactionNotFoundException.java index ad6cdd265..85d4941f5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/OfficeTransactionNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/OfficeTransactionNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.organisation.office.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when office transaction resources are not - * found. + * A {@link RuntimeException} thrown when office transaction resources are not found. */ public class OfficeTransactionNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformServiceJpaRepositoryImpl.java index b2663b637..c0642a6dc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformServiceJpaRepositoryImpl.java @@ -224,8 +224,7 @@ public class OfficeWritePlatformServiceJpaRepositoryImpl implements OfficeWriteP } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleOfficeDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { @@ -245,8 +244,8 @@ public class OfficeWritePlatformServiceJpaRepositoryImpl implements OfficeWriteP } /* - * used to restrict modifying operations to office that are either the users - * office or lower (child) in the office hierarchy + * used to restrict modifying operations to office that are either the users office or lower (child) in the office + * hierarchy */ private Office validateUserPriviledgeOnOfficeAndRetrieve(final AppUser currentUser, final Long officeId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformServiceJpaRepositoryImpl.java index f4ecdd4a3..3f5b791b7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformServiceJpaRepositoryImpl.java @@ -116,8 +116,7 @@ public class ProvisioningCategoryWritePlatformServiceJpaRepositoryImpl implement } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformServiceJpaRepositoryImpl.java index c91ace105..64e7db189 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformServiceJpaRepositoryImpl.java @@ -160,8 +160,7 @@ public class ProvisioningCriteriaWritePlatformServiceJpaRepositoryImpl implement } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { if (realCause.getMessage().contains("criteria_name")) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java index c0390f5f5..59e19cd9a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java @@ -75,8 +75,7 @@ import org.springframework.stereotype.Component; public class StaffApiResource { /** - * The set of parameters that are supported in response for - * {@link StaffData}. + * The set of parameters that are supported in response for {@link StaffData}. */ private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "firstname", "lastname", "displayName", "officeId", "officeName", "isLoanOfficer", "externalId", "mobileNo", "allowedOffices", "isActive", "joiningDate")); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepositoryWrapper.java index ae4a6598e..6eee59afb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepositoryWrapper.java @@ -24,8 +24,7 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link StaffRepository} that adds NULL checking and Error - * handling capabilities + * Wrapper for {@link StaffRepository} that adds NULL checking and Error handling capabilities *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadPlatformService.java index 29008405b..d6af2bf07 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadPlatformService.java @@ -30,8 +30,7 @@ public interface StaffReadPlatformService { Collection retrieveAllLoanOfficersInOfficeById(final Long officeId); /** - * returns all staff in offices that are above the provided - * officeId. + * returns all staff in offices that are above the provided officeId. */ Collection retrieveAllStaffInOfficeAndItsParentOfficeHierarchy(Long officeId, boolean loanOfficersOnly); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWritePlatformServiceJpaRepositoryImpl.java index 97c7f3e21..9c973b9bd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWritePlatformServiceJpaRepositoryImpl.java @@ -117,8 +117,7 @@ public class StaffWritePlatformServiceJpaRepositoryImpl implements StaffWritePla } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleStaffDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/CashierData.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/CashierData.java index 7bd815cff..c9913d44f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/CashierData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/CashierData.java @@ -24,8 +24,7 @@ import java.util.Date; import org.apache.fineract.organisation.staff.data.StaffData; /** - * Represents a cashier, providing access to the cashier's office, staff - * information, teller, and more. + * Represents a cashier, providing access to the cashier's office, staff information, teller, and more. * * @author Markus Geiss * @@ -80,13 +79,11 @@ public final class CashierData implements Serializable { * Creates a new cashier. * *

- * The valid from/to dates may be used to define a time period in which the - * cashier is assignable to a teller. + * The valid from/to dates may be used to define a time period in which the cashier is assignable to a teller. *

* *

- * The start/end times may be used to define a time period in which the - * cashier works part time. + * The start/end times may be used to define a time period in which the cashier works part time. *

* * @param id @@ -180,8 +177,7 @@ public final class CashierData implements Serializable { * Returns the valid from date of this cashier. * *

- * The valid from/to dates may be used to define a time period in which the - * cashier is assignable to a teller. + * The valid from/to dates may be used to define a time period in which the cashier is assignable to a teller. *

* * @return the valid from date of this cashier @@ -194,8 +190,7 @@ public final class CashierData implements Serializable { * Returns the valid to date of this cashier. * *

- * The valid from/to dates may be used to define a time period in which the - * cashier is assignable to a teller. + * The valid from/to dates may be used to define a time period in which the cashier is assignable to a teller. *

* * @return the valid to date of this cashier @@ -207,8 +202,7 @@ public final class CashierData implements Serializable { /** * Returns whether this cashier works part time or not. * - * @return {@code true} if this cashier works part time; {@code false} - * otherwise + * @return {@code true} if this cashier works part time; {@code false} otherwise */ public Boolean isFullDay() { return isFullDay; @@ -218,8 +212,7 @@ public final class CashierData implements Serializable { * Returns the start time of this cashier. * *

- * The start/end times may be used to define a time period in which the - * cashier works part time. + * The start/end times may be used to define a time period in which the cashier works part time. *

* * @return the start time of this cashier @@ -232,8 +225,7 @@ public final class CashierData implements Serializable { * Returns the end time of this cashier. * *

- * The start/end times may be used to define a time period in which the - * cashier works part time. + * The start/end times may be used to define a time period in which the cashier works part time. *

* * @return the start time of this cashier diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/TellerData.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/TellerData.java index 414bb53c6..15c3b92e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/TellerData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/TellerData.java @@ -98,11 +98,9 @@ public final class TellerData implements Serializable { * @param status * - current state of the teller, eg. active, inactive, pending * @param hasTransactions - * - indicates that this teller already is used to perform - * postings + * - indicates that this teller already is used to perform postings * @param hasMappedCashiers - * - indicates that the teller already has @code Cashier}s - * assigned to it + * - indicates that the teller already has @code Cashier}s assigned to it * @return the new created {@code TellerData} */ public static TellerData instance(final Long id, final Long officeId, final Long debitAccountId, final Long creditAccountId, diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/TellerTransactionData.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/TellerTransactionData.java index 201cf70c0..834b288e8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/TellerTransactionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/data/TellerTransactionData.java @@ -23,8 +23,7 @@ import java.util.Date; import org.apache.fineract.infrastructure.core.data.EnumOptionData; /** - * {@code TellerTransactionData} represents an immutable data object for a - * transction. + * {@code TellerTransactionData} represents an immutable data object for a transction. * * @version 1.0.0 * @@ -72,8 +71,7 @@ public final class TellerTransactionData implements Serializable { * @param clientId * - id of the client * @param type - * - type of transaction (eg receipt, payment, open, close, - * settle) + * - type of transaction (eg receipt, payment, open, close, settle) * @param amount * - amount of the transaction * @param postingDate diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/Cashier.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/Cashier.java index 44636cbe4..a78acc595 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/Cashier.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/Cashier.java @@ -40,9 +40,8 @@ import org.apache.fineract.organisation.staff.domain.Staff; import org.joda.time.LocalDate; /** - * Provides the base model for a cashier. Represents a row in the - * "m_cashiers" database table, with each column mapped to a property - * of this class. + * Provides the base model for a cashier. Represents a row in the "m_cashiers" database table, with each + * column mapped to a property of this class. * * @author Markus Geiss * @since 2.0.0 @@ -101,9 +100,8 @@ public class Cashier extends AbstractPersistableCustom { final LocalDate endDate = command.localDateValueOfParameterNamed("endDate"); final Boolean isFullDay = command.booleanObjectValueOfParameterNamed("isFullDay"); /* - * final String startTime = - * command.stringValueOfParameterNamed("startTime"); final String - * endTime = command.stringValueOfParameterNamed("endTime"); + * final String startTime = command.stringValueOfParameterNamed("startTime"); final String endTime = + * command.stringValueOfParameterNamed("endTime"); */ return new Cashier(cashierOffice, teller, staff, description, startDate, endDate, isFullDay, startTime, endTime); @@ -336,8 +334,7 @@ public class Cashier extends AbstractPersistableCustom { * Returns the valid from date of this cashier. * *

- * The valid from/to dates may be used to define a time period in which the - * cashier is assignable to a teller. + * The valid from/to dates may be used to define a time period in which the cashier is assignable to a teller. *

* * @return the valid from date of this cashier @@ -358,8 +355,7 @@ public class Cashier extends AbstractPersistableCustom { * Sets the valid from date of this cashier. * *

- * The valid from/to dates may be used to define a time period in which the - * cashier is assignable to a teller. + * The valid from/to dates may be used to define a time period in which the cashier is assignable to a teller. *

* * @param startDate @@ -373,8 +369,7 @@ public class Cashier extends AbstractPersistableCustom { * Returns the valid to date of this cashier. * *

- * The valid from/to dates may be used to define a time period in which the - * cashier is assignable to a teller. + * The valid from/to dates may be used to define a time period in which the cashier is assignable to a teller. *

* * @return the valid to date of this cashier @@ -395,8 +390,7 @@ public class Cashier extends AbstractPersistableCustom { * Sets the valid to date of this cashier. * *

- * The valid from/to dates may be used to define a time period in which the - * cashier is assignable to a teller. + * The valid from/to dates may be used to define a time period in which the cashier is assignable to a teller. *

* * @param endDate @@ -409,8 +403,7 @@ public class Cashier extends AbstractPersistableCustom { /** * Returns whether this cashier works part time or not. * - * @return {@code true} if this cashier works part time; {@code false} - * otherwise + * @return {@code true} if this cashier works part time; {@code false} otherwise */ public Boolean isFullDay() { return isFullDay; @@ -430,8 +423,7 @@ public class Cashier extends AbstractPersistableCustom { * Returns the start time of this cashier. * *

- * The start/end times may be used to define a time period in which the - * cashier works part time. + * The start/end times may be used to define a time period in which the cashier works part time. *

* * @return the start time of this cashier @@ -444,8 +436,7 @@ public class Cashier extends AbstractPersistableCustom { * Set the start time of this cashier. * *

- * The start/end times may be used to define a time period in which the - * cashier works part time. + * The start/end times may be used to define a time period in which the cashier works part time. *

* * @param startTime @@ -459,8 +450,7 @@ public class Cashier extends AbstractPersistableCustom { * Returns the end time of this cashier. * *

- * The start/end times may be used to define a time period in which the - * cashier works part time. + * The start/end times may be used to define a time period in which the cashier works part time. *

* * @return the end time of this cashier @@ -473,8 +463,7 @@ public class Cashier extends AbstractPersistableCustom { * Sets the end time of this cashier. * *

- * The start/end times may be used to define a time period in which the - * cashier works part time. + * The start/end times may be used to define a time period in which the cashier works part time. *

* * @param endTime diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepository.java index 1cd2fd31e..dce7f1fb2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepository.java @@ -22,8 +22,7 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; /** - * Provides the domain repository for accessing, adding, modifying or deleting - * cashiers. + * Provides the domain repository for accessing, adding, modifying or deleting cashiers. * * @author Markus Geiss * @see org.apache.fineract.organisation.teller.domain.Cashier diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransaction.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransaction.java index 43b56bbde..56defe32e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransaction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransaction.java @@ -206,8 +206,7 @@ public class CashierTransaction extends AbstractPersistableCustom { /** * Returns the transaction type of this cashier transaction. . * - * @return the transaction type of this cashier transaction or {@code null} - * if not present. + * @return the transaction type of this cashier transaction or {@code null} if not present. */ public Integer getTxnType() { return txnType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/Teller.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/Teller.java index 137ea9bde..c5f48a25a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/Teller.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/Teller.java @@ -96,11 +96,10 @@ public class Teller extends AbstractPersistableCustom { this.office = staffOffice; /* - * if (StringUtils.isNotBlank(name)) { this.name = name.trim(); } else { - * this.name = null; } + * if (StringUtils.isNotBlank(name)) { this.name = name.trim(); } else { this.name = null; } * - * if (StringUtils.isNotBlank(description)) { this.description = - * description.trim(); } else { this.description = null; } + * if (StringUtils.isNotBlank(description)) { this.description = description.trim(); } else { this.description = + * null; } */ } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepository.java index 9dd7caad6..2fdea2a68 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepository.java @@ -23,8 +23,7 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; /** - * Provides the domain repository for accessing, adding, modifying or deleting - * tellers. + * Provides the domain repository for accessing, adding, modifying or deleting tellers. * * @see org.apache.fineract.organisation.teller.domain.Teller * @since 2.0.0 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransactionRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransactionRepository.java index ca95fad2f..1fa4e9167 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransactionRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransactionRepository.java @@ -22,8 +22,7 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; /** - * Provides the domain repository for accessing, adding, modifying or deleting - * teller transactions. + * Provides the domain repository for accessing, adding, modifying or deleting teller transactions. * * @see org.apache.fineract.organisation.teller.domain.TellerTransaction * @since 2.0.0 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashToCashierCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashToCashierCommandHandler.java index 865da7b9d..6a36ebd19 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashToCashierCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashToCashierCommandHandler.java @@ -36,8 +36,7 @@ public class AllocateCashToCashierCommandHandler implements NewCommandSourceHand * Creates a new instance. * * @param writePlatformService - * the {@code CashierWritePlatformService} used to access the - * backend + * the {@code CashierWritePlatformService} used to access the backend */ @Autowired public AllocateCashToCashierCommandHandler(final TellerWritePlatformService writePlatformService) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashierToTellerCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashierToTellerCommandHandler.java index 77f2515b7..1386731f0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashierToTellerCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashierToTellerCommandHandler.java @@ -36,8 +36,7 @@ public class AllocateCashierToTellerCommandHandler implements NewCommandSourceHa * Creates a new instance. * * @param writePlatformService - * the {@code CashierWritePlatformService} used to access the - * backend + * the {@code CashierWritePlatformService} used to access the backend */ @Autowired public AllocateCashierToTellerCommandHandler(final TellerWritePlatformService writePlatformService) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerCommandHandler.java index 4731ace57..40dfb63bf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerCommandHandler.java @@ -43,8 +43,7 @@ public class CreateTellerCommandHandler implements NewCommandSourceHandler { * Creates a new instance * * @param writePlatformService - * the {@code TellerWritePlatformService} used to access the - * backend + * the {@code TellerWritePlatformService} used to access the backend */ @Autowired public CreateTellerCommandHandler(final TellerWritePlatformService writePlatformService) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteCashierAllocationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteCashierAllocationCommandHandler.java index 4772cab06..b77bc0ac3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteCashierAllocationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteCashierAllocationCommandHandler.java @@ -43,8 +43,7 @@ public class DeleteCashierAllocationCommandHandler implements NewCommandSourceHa * Creates a new instance. * * @param writePlatformService - * the {@code CashierWritePlatformService} used to access the - * backend + * the {@code CashierWritePlatformService} used to access the backend */ @Autowired public DeleteCashierAllocationCommandHandler(final TellerWritePlatformService writePlatformService) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteTellerCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteTellerCommandHandler.java index eb03283f5..5aae7bc54 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteTellerCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteTellerCommandHandler.java @@ -43,8 +43,7 @@ public class DeleteTellerCommandHandler implements NewCommandSourceHandler { * Creates a new instance * * @param writePlatformService - * the {@code TellerWritePlatformService} used to access the - * backend + * the {@code TellerWritePlatformService} used to access the backend */ @Autowired public DeleteTellerCommandHandler(final TellerWritePlatformService writePlatformService) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/ModifyCashierCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/ModifyCashierCommandHandler.java index 902918461..c4c9eaf26 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/ModifyCashierCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/ModifyCashierCommandHandler.java @@ -39,8 +39,7 @@ public class ModifyCashierCommandHandler implements NewCommandSourceHandler { * Creates a new instance. * * @param writePlatformService - * the {@code CashierWritePlatformService} used to access the - * backend + * the {@code CashierWritePlatformService} used to access the backend */ @Autowired public ModifyCashierCommandHandler(final CashierWritePlatformService writePlatformService) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/SettleCashFromCashierCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/SettleCashFromCashierCommandHandler.java index d721bc2af..04ac7fb7f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/SettleCashFromCashierCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/SettleCashFromCashierCommandHandler.java @@ -36,8 +36,7 @@ public class SettleCashFromCashierCommandHandler implements NewCommandSourceHand * Creates a new instance. * * @param writePlatformService - * the {@code CashierWritePlatformService} used to access the - * backend + * the {@code CashierWritePlatformService} used to access the backend */ @Autowired public SettleCashFromCashierCommandHandler(final TellerWritePlatformService writePlatformService) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateCashierAllocationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateCashierAllocationCommandHandler.java index b92fefafb..bc8c778a8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateCashierAllocationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateCashierAllocationCommandHandler.java @@ -43,8 +43,7 @@ public class UpdateCashierAllocationCommandHandler implements NewCommandSourceHa * Creates a new instance * * @param writePlatformService - * the {@code TellerWritePlatformService} used to access the - * backend + * the {@code TellerWritePlatformService} used to access the backend */ @Autowired public UpdateCashierAllocationCommandHandler(final TellerWritePlatformService writePlatformService) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateTellerCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateTellerCommandHandler.java index fbf8e6bbe..ce91f5d0b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateTellerCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateTellerCommandHandler.java @@ -43,8 +43,7 @@ public class UpdateTellerCommandHandler implements NewCommandSourceHandler { * Creates a new instance * * @param writePlatformService - * the {@code TellerWritePlatformService} used to access the - * backend + * the {@code TellerWritePlatformService} used to access the backend */ @Autowired public UpdateTellerCommandHandler(final TellerWritePlatformService writePlatformService) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformService.java index 2bf52cf8d..943b4c511 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformService.java @@ -67,8 +67,8 @@ public interface TellerWritePlatformService { public CommandProcessingResult deleteTeller(Long tellerId); /** - * Allocates a cashier to an existing teller. The allocation can be for a - * duration from a date to a date from a certain start time to an end time. + * Allocates a cashier to an existing teller. The allocation can be for a duration from a date to a date from a + * certain start time to an end time. * * @param command * the command to allocate a cashier for a specific teller diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformServiceJpaImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformServiceJpaImpl.java index 59a44d0bf..2f0a08236 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformServiceJpaImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformServiceJpaImpl.java @@ -165,8 +165,8 @@ public class TellerWritePlatformServiceJpaImpl implements TellerWritePlatformSer } /* - * used to restrict modifying operations to office that are either the users - * office or lower (child) in the office hierarchy + * used to restrict modifying operations to office that are either the users office or lower (child) in the office + * hierarchy */ private Teller validateUserPriviledgeOnTellerAndRetrieve(final AppUser currentUser, final Long tellerId) { @@ -202,8 +202,7 @@ public class TellerWritePlatformServiceJpaImpl implements TellerWritePlatformSer } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleTellerDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { @@ -345,9 +344,8 @@ public class TellerWritePlatformServiceJpaImpl implements TellerWritePlatformSer } /* - * @Override public CommandProcessingResult inwardCashToCashier (final Long - * cashierId, final CashierTransaction cashierTxn) { CashierTxnType txnType - * = CashierTxnType.INWARD_CASH_TXN; // pre save to generate id for use in + * @Override public CommandProcessingResult inwardCashToCashier (final Long cashierId, final CashierTransaction + * cashierTxn) { CashierTxnType txnType = CashierTxnType.INWARD_CASH_TXN; // pre save to generate id for use in * office hierarchy this.cashierTxnRepository.save(cashierTxn); } */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/AdjustedDateDetailsDTO.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/AdjustedDateDetailsDTO.java index 19ce000bc..f1230fd7e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/AdjustedDateDetailsDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/AdjustedDateDetailsDTO.java @@ -27,8 +27,8 @@ public class AdjustedDateDetailsDTO { */ LocalDate changedScheduleDate; /** - * Variable tracks If the meeting has been changed , i.e future schedule - * also changes along with the current repayments date. + * Variable tracks If the meeting has been changed , i.e future schedule also changes along with the current + * repayments date. */ LocalDate changedActualRepaymentDate; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepositoryWrapper.java index bf32f9d25..b9af97f82 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepositoryWrapper.java @@ -27,8 +27,7 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link WorkingDaysRepository} that adds NULL checking and Error - * handling capabilities + * Wrapper for {@link WorkingDaysRepository} that adds NULL checking and Error handling capabilities *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiConstants.java index e3134c816..0a874b101 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiConstants.java @@ -35,9 +35,8 @@ public class AccountTransfersApiConstants { public static final String currencyParamName = "currency"; /** - * 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. + * 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 RESPONSE_DATA_PARAMETERS = new HashSet<>( Arrays.asList(AccountDetailConstants.idParamName, transferDescriptionParamName, currencyParamName)); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferStandingInstruction.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferStandingInstruction.java index fe40ab29f..66d4b0717 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferStandingInstruction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferStandingInstruction.java @@ -296,8 +296,7 @@ public class AccountTransferStandingInstruction extends AbstractPersistableCusto } /** - * delete the standing instruction by setting the status to 3 and appending - * "_deleted_" and the id to the name + * delete the standing instruction by setting the status to 3 and appending "_deleted_" and the id to the name **/ public void delete() { this.status = StandingInstructionStatus.DELETED.getValue(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountAssociationsReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountAssociationsReadPlatformServiceImpl.java index ab9306d80..69ff14b83 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountAssociationsReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountAssociationsReadPlatformServiceImpl.java @@ -171,9 +171,8 @@ public class AccountAssociationsReadPlatformServiceImpl implements AccountAssoci final String loanAccountNo = rs.getString("loanAccountNo"); final PortfolioAccountData account = PortfolioAccountData.lookup(loanAccountId, loanAccountNo); /* - * if (savingsAccountId != null) { account = - * PortfolioAccountData.lookup(savingsAccountId, savingsAccountNo); - * } else if (loanAccountId != null) { account = + * if (savingsAccountId != null) { account = PortfolioAccountData.lookup(savingsAccountId, + * savingsAccountNo); } else if (loanAccountId != null) { account = * PortfolioAccountData.lookup(loanAccountId, loanAccountNo); } */ final Long linkSavingsAccountId = JdbcSupport.getLong(rs, "linkSavingsAccountId"); @@ -184,11 +183,9 @@ public class AccountAssociationsReadPlatformServiceImpl implements AccountAssoci // rs.getString("linkLoanAccountNo"); final PortfolioAccountData linkedAccount = PortfolioAccountData.lookup(linkSavingsAccountId, linkSavingsAccountNo); /* - * if (linkSavingsAccountId != null) { linkedAccount = - * PortfolioAccountData.lookup(linkSavingsAccountId, - * linkSavingsAccountNo); } else if (linkLoanAccountId != null) { - * linkedAccount = PortfolioAccountData.lookup(linkLoanAccountId, - * linkLoanAccountNo); } + * if (linkSavingsAccountId != null) { linkedAccount = PortfolioAccountData.lookup(linkSavingsAccountId, + * linkSavingsAccountNo); } else if (linkLoanAccountId != null) { linkedAccount = + * PortfolioAccountData.lookup(linkLoanAccountId, linkLoanAccountNo); } */ return new AccountAssociationsData(id, account, linkedAccount); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformServiceImpl.java index 2d1cfb389..5e41306b2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformServiceImpl.java @@ -382,8 +382,8 @@ public class PortfolioAccountReadPlatformServiceImpl implements PortfolioAccount sql = "select " + this.accountRefundByTransferMapper.schema() + " where la.id = ?"; /* - * if (currencyCode != null) { sql += " and la.currency_code = ?"; - * sqlParams = new Object[] {accountId , accountId,currencyCode }; } + * if (currencyCode != null) { sql += " and la.currency_code = ?"; sqlParams = new Object[] {accountId , + * accountId,currencyCode }; } */ accountData = this.jdbcTemplate.queryForObject(sql, this.accountRefundByTransferMapper, sqlParams); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformServiceImpl.java index 42110322d..1fec51f66 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformServiceImpl.java @@ -216,9 +216,7 @@ public class StandingInstructionReadPlatformServiceImpl implements StandingInstr final Collection transferTypeOptions = Arrays.asList(transferType(AccountTransferType.ACCOUNT_TRANSFER), transferType( AccountTransferType.LOAN_REPAYMENT)/* - * , transferType( - * AccountTransferType - * . CHARGE_PAYMENT ) + * , transferType( AccountTransferType . CHARGE_PAYMENT ) */); final Collection statusOptions = Arrays.asList(standingInstructionStatus(StandingInstructionStatus.ACTIVE), standingInstructionStatus(StandingInstructionStatus.DISABLED)); @@ -445,16 +443,12 @@ public class StandingInstructionReadPlatformServiceImpl implements StandingInstr EnumOptionData transferTypeEnum = AccountTransferEnumerations.transferType(transferType); /* - * final String currencyCode = rs.getString("currencyCode"); final - * String currencyName = rs.getString("currencyName"); final String - * currencyNameCode = rs.getString("currencyNameCode"); final String - * currencyDisplaySymbol = rs.getString("currencyDisplaySymbol"); - * final Integer currencyDigits = JdbcSupport.getInteger(rs, - * "currencyDigits"); final Integer inMultiplesOf = - * JdbcSupport.getInteger(rs, "inMultiplesOf"); final CurrencyData - * currency = new CurrencyData(currencyCode, currencyName, - * currencyDigits, inMultiplesOf, currencyDisplaySymbol, - * currencyNameCode); + * final String currencyCode = rs.getString("currencyCode"); final String currencyName = + * rs.getString("currencyName"); final String currencyNameCode = rs.getString("currencyNameCode"); final + * String currencyDisplaySymbol = rs.getString("currencyDisplaySymbol"); final Integer currencyDigits = + * JdbcSupport.getInteger(rs, "currencyDigits"); final Integer inMultiplesOf = JdbcSupport.getInteger(rs, + * "inMultiplesOf"); final CurrencyData currency = new CurrencyData(currencyCode, currencyName, + * currencyDigits, inMultiplesOf, currencyDisplaySymbol, currencyNameCode); */ final Long fromOfficeId = JdbcSupport.getLong(rs, "fromOfficeId"); final String fromOfficeName = rs.getString("fromOfficeName"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/AccountSummaryCollectionData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/AccountSummaryCollectionData.java index f7fd9f899..430de30fa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/AccountSummaryCollectionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/AccountSummaryCollectionData.java @@ -37,8 +37,7 @@ public class AccountSummaryCollectionData { private final Collection memberGuarantorAccounts; /* - * METHOD SIGNATURE CHANGE NOTICE: Method's signature was changed for GLIM & - * GSIM implementation + * METHOD SIGNATURE CHANGE NOTICE: Method's signature was changed for GLIM & GSIM implementation */ public AccountSummaryCollectionData(final Collection loanAccounts, final Collection groupLoanIndividualMonitoringAccounts, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java index 651da01a4..e2e27aee4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java @@ -43,8 +43,8 @@ import org.joda.time.format.DateTimeFormatter; public class Address extends AbstractPersistableCustom { /* - * @OneToMany(mappedBy = "address", cascade = CascadeType.ALL) private - * List clientaddress = new ArrayList<>(); + * @OneToMany(mappedBy = "address", cascade = CascadeType.ALL) private List clientaddress = new + * ArrayList<>(); */ @OneToMany(mappedBy = "address", cascade = CascadeType.ALL) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java index c3721053c..55be219ff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java @@ -218,10 +218,9 @@ public class Calendar extends AbstractAuditableCustom { this.startDate = newMeetingStartDate.toDate(); /* - * If meeting start date is changed then there is possibilities of - * recurring day may change, so derive the recurring day and update - * it if it is changed. For weekly type is weekday and for monthly - * type it is day of the month + * If meeting start date is changed then there is possibilities of recurring day may change, so derive the + * recurring day and update it if it is changed. For weekly type is weekday and for monthly type it is day + * of the month */ CalendarFrequencyType calendarFrequencyType = CalendarUtils.getFrequency(this.recurrence); @@ -326,10 +325,8 @@ public class Calendar extends AbstractAuditableCustom { throw new CalendarParameterUpdateNotSupportedException("meeting.type", defaultUserMessage, newMeetingType, oldMeeingType); /* - * final Integer newValue = - * command.integerValueSansLocaleOfParameterNamed(typeParamName); - * actualChanges.put(typeParamName, newValue); this.typeId = - * newValue; + * final Integer newValue = command.integerValueSansLocaleOfParameterNamed(typeParamName); + * actualChanges.put(typeParamName, newValue); this.typeId = newValue; */ } @@ -360,8 +357,8 @@ public class Calendar extends AbstractAuditableCustom { final String newRecurrence = Calendar.constructRecurrence(command, this); if (!StringUtils.isBlank(this.recurrence) && !newRecurrence.equalsIgnoreCase(this.recurrence)) { /* - * If active entities like JLG loan or RD accounts are synced to the - * calendar then do not allow to change meeting frequency + * If active entities like JLG loan or RD accounts are synced to the calendar then do not allow to change + * meeting frequency */ if (areActiveEntitiesSynced && !CalendarUtils.isFrequencySame(this.recurrence, newRecurrence)) { @@ -370,8 +367,8 @@ public class Calendar extends AbstractAuditableCustom { } /* - * If active entities like JLG loan or RD accounts are synced to the - * calendar then do not allow to change meeting interval + * If active entities like JLG loan or RD accounts are synced to the calendar then do not allow to change + * meeting interval */ if (areActiveEntitiesSynced && !CalendarUtils.isIntervalSame(this.recurrence, newRecurrence)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarFrequencyType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarFrequencyType.java index 10b7f919d..05e3eedc8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarFrequencyType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarFrequencyType.java @@ -105,8 +105,7 @@ public enum CalendarFrequencyType { } /** - * To convert from period frequency type tp calendar frequency type. This - * method requires code refactoring. + * To convert from period frequency type tp calendar frequency type. This method requires code refactoring. * * @param periodFrequencyType * periodFrequencyType @@ -128,8 +127,7 @@ public enum CalendarFrequencyType { } /** - * To convert from period frequency type tp calendar frequency type. This - * method requires code refactoring. + * To convert from period frequency type tp calendar frequency type. This method requires code refactoring. * * @param frequencyType * @return diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java index 4ecb09bf5..037b70243 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java @@ -37,8 +37,7 @@ public interface CalendarInstanceRepository extends JpaRepository - * Wrapper for {@link CalendarInstanceRepository} that is responsible for - * checking if {@link CalendarInstance} is returned when using - * findOne repository method and throwing an appropriate not found - * exception. + * Wrapper for {@link CalendarInstanceRepository} that is responsible for checking if {@link CalendarInstance} is + * returned when using findOne repository method and throwing an appropriate not found exception. *

* *

- * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link CalendarInstanceRepository} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where + * {@link CalendarInstanceRepository} is required. *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepositoryWrapper.java index f86e4bc9c..d49d8dd5c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepositoryWrapper.java @@ -24,14 +24,13 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link CalendarRepository} that is responsible for checking if - * {@link Calendar} is returned when using findOne repository - * method and throwing an appropriate not found exception. + * Wrapper for {@link CalendarRepository} that is responsible for checking if {@link Calendar} is returned when using + * findOne repository method and throwing an appropriate not found exception. *

* *

- * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link CalendarRepository} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where {@link CalendarRepository} is + * required. *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarInstanceNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarInstanceNotFoundException.java index 072e99b0c..dc380d917 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarInstanceNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarInstanceNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.calendar.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when CalendarInstance resources are not - * found. + * A {@link RuntimeException} thrown when CalendarInstance resources are not found. */ public class CalendarInstanceNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java index 5b43571e2..004896428 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java @@ -324,16 +324,13 @@ public class CalendarReadPlatformServiceImpl implements CalendarReadPlatformServ CalendarData applicableCalendarData = calendarData; LocalDate nextEligibleMeetingDate = null; /** - * The next available meeting date for collection should be taken from - * application calendar for that time period. e.g. If the previous - * calendar details has weekly meeting starting from 1st of Oct 2013 on - * every Tuesday, then meeting dates for collection are 1,8,15,22,29.. + * The next available meeting date for collection should be taken from application calendar for that time + * period. e.g. If the previous calendar details has weekly meeting starting from 1st of Oct 2013 on every + * Tuesday, then meeting dates for collection are 1,8,15,22,29.. * - * If meeting schedule has changed from Tuesday to Friday with effective - * from 15th of Oct (calendar update has made on 2nd of Oct) , then - * application should allow to generate collection sheet on 8th of Oct - * which is still on Tuesday and next collection sheet date should be on - * 18th of Oct as per current calendar + * If meeting schedule has changed from Tuesday to Friday with effective from 15th of Oct (calendar update has + * made on 2nd of Oct) , then application should allow to generate collection sheet on 8th of Oct which is still + * on Tuesday and next collection sheet date should be on 18th of Oct as per current calendar */ Integer numberOfDays = 0; @@ -350,8 +347,8 @@ public class CalendarReadPlatformServiceImpl implements CalendarReadPlatformServ } /** - * If nextEligibleMeetingDate is on or after current calendar startdate - * then regenerate the nextEligible meeting date based on + * If nextEligibleMeetingDate is on or after current calendar startdate then regenerate the nextEligible meeting + * date based on */ if (nextEligibleMeetingDate == null) { final LocalDate seedDate = (lastMeetingDate != null) ? lastMeetingDate : calendarData.getStartDate(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarUtils.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarUtils.java index 94fb7e029..98df42287 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarUtils.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarUtils.java @@ -588,9 +588,8 @@ public class CalendarUtils { /* * Recurring dates should follow loanRepaymentInterval. * - * e.g. The weekly meeting will have interval of 1, if the loan product - * with fortnightly frequency will have interval of 2, to generate right - * set of meeting dates reset interval same as loan repayment interval. + * e.g. The weekly meeting will have interval of 1, if the loan product with fortnightly frequency will have + * interval of 2, to generate right set of meeting dates reset interval same as loan repayment interval. */ Recur.Builder recurBuilder = getRecurBuilder(recur); @@ -598,10 +597,9 @@ public class CalendarUtils { recurBuilder = recurBuilder.interval(loanRepaymentInterval); /* - * Recurring dates should follow loanRepayment frequency. //e.g. daily - * meeting frequency should support all loan products with any type of - * frequency. to generate right set of meeting dates reset frequency - * same as loan repayment frequency. + * Recurring dates should follow loanRepayment frequency. //e.g. daily meeting frequency should support all loan + * products with any type of frequency. to generate right set of meeting dates reset frequency same as loan + * repayment frequency. */ if (recur.getFrequency().equals(Recur.Frequency.DAILY)) { @@ -676,8 +674,7 @@ public class CalendarUtils { } /** - * function returns a comma separated list of calendar_type_enum values ex. - * 1,2,3,4 + * function returns a comma separated list of calendar_type_enum values ex. 1,2,3,4 * * @param calendarTypeOptions * @return @@ -725,8 +722,7 @@ public class CalendarUtils { LocalDate date = startDate; final LocalDate seedDate = calendar.getStartDateLocalDate(); /** - * if (isValidRedurringDate(calendar.getRecurrence(), seedDate, date)) { - * date = date.plusDays(1); } + * if (isValidRedurringDate(calendar.getRecurrence(), seedDate, date)) { date = date.plusDays(1); } **/ final LocalDate scheduleDate = getNextRecurringDate(recur, seedDate, date); @@ -801,9 +797,8 @@ public class CalendarUtils { /* * Recurring dates should follow loanRepaymentInterval. * - * e.g. The weekly meeting will have interval of 1, if the loan product - * with fortnightly frequency will have interval of 2, to generate right - * set of meeting dates reset interval same as loan repayment interval. + * e.g. The weekly meeting will have interval of 1, if the loan product with fortnightly frequency will have + * interval of 2, to generate right set of meeting dates reset interval same as loan repayment interval. */ int meetingInterval = recur.getInterval(); if (meetingInterval < 1) { @@ -812,10 +807,9 @@ public class CalendarUtils { int rep = repaymentInterval < meetingInterval ? 1 : repaymentInterval / meetingInterval; /* - * Recurring dates should follow loanRepayment frequency. //e.g. daily - * meeting frequency should support all loan products with any type of - * frequency. to generate right set of meeting dates reset frequency - * same as loan repayment frequency. + * Recurring dates should follow loanRepayment frequency. //e.g. daily meeting frequency should support all loan + * products with any type of frequency. to generate right set of meeting dates reset frequency same as loan + * repayment frequency. */ Recur.Builder recurBuilder = getRecurBuilder(recur); @@ -873,9 +867,8 @@ public class CalendarUtils { final Integer interval = 4; Integer repaymentInterval = loanRepaymentInterval; /* - * check loanRepaymentInterval equal to 1, if repayments frequency is - * monthly and meeting frequency is weekly, then generate repayments - * schedule as every 4 weeks + * check loanRepaymentInterval equal to 1, if repayments frequency is monthly and meeting frequency is weekly, + * then generate repayments schedule as every 4 weeks */ if (frequency.equals(Recur.Frequency.MONTHLY.name()) && recur.getFrequency().equals(Recur.Frequency.WEEKLY)) { repaymentInterval = loanRepaymentInterval * interval; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformServiceJpaRepositoryImpl.java index d806e5adf..072d965c1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformServiceJpaRepositoryImpl.java @@ -186,8 +186,7 @@ public class CalendarWritePlatformServiceJpaRepositoryImpl implements CalendarWr .findByEntityIdAndEntityTypeIdAndCalendarTypeId(parent.getId(), centerEntityTypeId, CalendarType.COLLECTION.getValue()); /* - * If calendar is created by parent group, then it cannot be - * edited by the child group + * If calendar is created by parent group, then it cannot be edited by the child group */ if (collectionCalendarInstance != null) { final String errorMessage = "meeting.created.at.center.cannot.be.edited.at.group.level"; @@ -223,8 +222,7 @@ public class CalendarWritePlatformServiceJpaRepositoryImpl implements CalendarWr loanStatuses); /* - * areActiveEntitiesSynced is set to true, if there are any active loans - * synced to this calendar. + * areActiveEntitiesSynced is set to true, if there are any active loans synced to this calendar. */ if (numberOfActiveLoansSyncedWithThisCalendar > 0) { @@ -246,19 +244,15 @@ public class CalendarWritePlatformServiceJpaRepositoryImpl implements CalendarWr /* * System allows to change the meeting date by two means, * - * Option 1: reschedulebasedOnMeetingDates = false or - * reschedulebasedOnMeetingDates is not passed By directly editing the - * recurring day with effective from date and system decides the next - * meeting date based on some sensible logic (i.e., number of minimum - * days between two repayments) + * Option 1: reschedulebasedOnMeetingDates = false or reschedulebasedOnMeetingDates is not passed By directly + * editing the recurring day with effective from date and system decides the next meeting date based on some + * sensible logic (i.e., number of minimum days between two repayments) * * - * Option 2: reschedulebasedOnMeetingDates = true By providing - * alternative meeting date for one of future meeting date and derive - * the day of recurrence from the new meeting date. Ex: User proposes - * new meeting date say "14/Nov/2014" for present meeting date - * "12/Nov/2014", based on this input other values re derived and loans - * are rescheduled + * Option 2: reschedulebasedOnMeetingDates = true By providing alternative meeting date for one of future + * meeting date and derive the day of recurrence from the new meeting date. Ex: User proposes new meeting date + * say "14/Nov/2014" for present meeting date "12/Nov/2014", based on this input other values re derived and + * loans are rescheduled * */ @@ -271,8 +265,7 @@ public class CalendarWritePlatformServiceJpaRepositoryImpl implements CalendarWr presentMeetingDate = command.localDateValueOfParameterNamed(CalendarSupportedParameters.PRESENT_MEETING_DATE.getValue()); /* - * New meeting date proposed will become the new start date for the - * updated calendar + * New meeting date proposed will become the new start date for the updated calendar */ changes = calendarForUpdate.updateStartDateAndDerivedFeilds(newMeetingDate); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java index 0045ce487..1dea54dd1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java @@ -357,11 +357,9 @@ public class Charge extends AbstractPersistableCustom { final String chargeAppliesToParamName = "chargeAppliesTo"; if (command.isChangeInIntegerParameterNamed(chargeAppliesToParamName, this.chargeAppliesTo)) { /* - * final Integer newValue = - * command.integerValueOfParameterNamed(chargeAppliesToParamName); - * actualChanges.put(chargeAppliesToParamName, newValue); - * actualChanges.put("locale", localeAsInput); this.chargeAppliesTo - * = ChargeAppliesTo.fromInt(newValue).getValue(); + * final Integer newValue = command.integerValueOfParameterNamed(chargeAppliesToParamName); + * actualChanges.put(chargeAppliesToParamName, newValue); actualChanges.put("locale", localeAsInput); + * this.chargeAppliesTo = ChargeAppliesTo.fromInt(newValue).getValue(); */ // AA: Do not allow to change chargeAppliesTo. @@ -506,8 +504,7 @@ public class Charge extends AbstractPersistableCustom { } /** - * Delete is a soft delete. Updates flag on charge so it wont appear - * in query/report results. + * Delete is a soft delete. Updates flag on charge so it wont appear in query/report results. * * Any fields with unique constraints and prepended with id of record. */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepositoryWrapper.java index 0fa68dd0b..68cb44c44 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepositoryWrapper.java @@ -25,14 +25,13 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link ChargeRepository} that is responsible for checking if - * {@link Charge} is returned when using findOne repository method - * and throwing an appropriate not found exception. + * Wrapper for {@link ChargeRepository} that is responsible for checking if {@link Charge} is returned when using + * findOne repository method and throwing an appropriate not found exception. *

* *

- * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link ChargeRepository} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where {@link ChargeRepository} is + * required. *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeDueAtDisbursementCannotBePenaltyException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeDueAtDisbursementCannotBePenaltyException.java index eeeb19675..2a66f3124 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeDueAtDisbursementCannotBePenaltyException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeDueAtDisbursementCannotBePenaltyException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.charge.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when attempting to crate - * charge of type penalty due at disbursement . + * {@link AbstractPlatformDomainRuleException} thrown when attempting to crate charge of type penalty due at + * disbursement . */ public class ChargeDueAtDisbursementCannotBePenaltyException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeMustBePenaltyException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeMustBePenaltyException.java index efaebd58c..972093dd0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeMustBePenaltyException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeMustBePenaltyException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.charge.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when attempting to crate - * charge of type penalty due at disbursement . + * {@link AbstractPlatformDomainRuleException} thrown when attempting to crate charge of type penalty due at + * disbursement . */ public class ChargeMustBePenaltyException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeAddedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeAddedException.java index 842dfd5be..4bbcce8fd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeAddedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeAddedException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.charge.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when loan charge is not - * allowed to be added to the loan. + * {@link AbstractPlatformDomainRuleException} thrown when loan charge is not allowed to be added to the loan. */ public class LoanChargeCannotBeAddedException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeNotFoundException.java index 9971d87cf..2db934591 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeNotFoundException.java @@ -22,8 +22,7 @@ import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainR import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * {@link AbstractPlatformDomainRuleException} thrown when loan charge does not - * exist. + * {@link AbstractPlatformDomainRuleException} thrown when loan charge does not exist. */ public class LoanChargeNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWithoutMandatoryFieldException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWithoutMandatoryFieldException.java index 6833b2b6f..02ea39498 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWithoutMandatoryFieldException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWithoutMandatoryFieldException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.charge.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when currency mismatch - * occurs + * {@link AbstractPlatformDomainRuleException} thrown when currency mismatch occurs */ public class LoanChargeWithoutMandatoryFieldException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/SavingsAccountChargeNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/SavingsAccountChargeNotFoundException.java index 4484bd554..4f28d7c54 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/SavingsAccountChargeNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/SavingsAccountChargeNotFoundException.java @@ -22,8 +22,7 @@ import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainR import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * {@link AbstractPlatformDomainRuleException} thrown when savings account - * charge does not exist. + * {@link AbstractPlatformDomainRuleException} thrown when savings account charge does not exist. */ public class SavingsAccountChargeNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/SavingsAccountChargeWithoutMandatoryFieldException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/SavingsAccountChargeWithoutMandatoryFieldException.java index 1fdd39544..38dbeb783 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/SavingsAccountChargeWithoutMandatoryFieldException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/SavingsAccountChargeWithoutMandatoryFieldException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.charge.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when currency mismatch - * occurs + * {@link AbstractPlatformDomainRuleException} thrown when currency mismatch occurs */ public class SavingsAccountChargeWithoutMandatoryFieldException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ShareAccountChargeWithoutMandatoryFieldException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ShareAccountChargeWithoutMandatoryFieldException.java index 1c08ae603..adf56eb71 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ShareAccountChargeWithoutMandatoryFieldException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/exception/ShareAccountChargeWithoutMandatoryFieldException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.charge.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when currency mismatch - * occurs + * {@link AbstractPlatformDomainRuleException} thrown when currency mismatch occurs */ public class ShareAccountChargeWithoutMandatoryFieldException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformService.java index 0e818789c..0f8818c40 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformService.java @@ -56,8 +56,7 @@ public interface ChargeReadPlatformService { Collection retrieveLoanAccountApplicableCharges(final Long loanId, ChargeTimeType[] excludeChargeTimes); /** - * Returns all charges applicable for a given loan product (filter based on - * Currency of Selected Loan Product) + * Returns all charges applicable for a given loan product (filter based on Currency of Selected Loan Product) * * @param excludeChargeTimes * Excludes Given List of Charge Types from the response diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java index 17bb9d882..1f950c593 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java @@ -227,8 +227,7 @@ public class ChargeWritePlatformServiceJpaRepositoryImpl implements ChargeWriteP } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java index 5e031753a..bbafa490f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java @@ -185,9 +185,8 @@ public class ClientApiConstants { public static final String clientEntityName = "clients"; /** - * These parameters will match the class level parameters of - * {@link ClientData}. Where possible, we try to get response parameters to - * match those of request parameters. + * These parameters will match the class level parameters of {@link ClientData}. Where possible, we try to get + * response parameters to match those of request parameters. */ protected static final Set CLIENT_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, accountNoParamName, externalIdParamName, statusParamName, activeParamName, activationDateParamName, firstnameParamName, middlenameParamName, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientApiCollectionConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientApiCollectionConstants.java index d66f97d1a..2c7638101 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientApiCollectionConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientApiCollectionConstants.java @@ -49,9 +49,8 @@ public class ClientApiCollectionConstants extends ClientApiConstants { constitutionIdParamName, mainBusinessLineIdParamName)); /** - * These parameters will match the class level parameters of - * {@link ClientData}. Where possible, we try to get response parameters to - * match those of request parameters. + * These parameters will match the class level parameters of {@link ClientData}. Where possible, we try to get + * response parameters to match those of request parameters. */ protected static final Set ACTIVATION_REQUEST_DATA_PARAMETERS = new HashSet<>( diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java index 870d9a721..63c581c9f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java @@ -104,14 +104,11 @@ public final class ClientDataValidator { baseDataValidator.reset().parameter(ClientApiConstants.savingsProductIdParamName).value(savingsProductId).ignoreIfNull() .longGreaterThanZero(); /* - * if (savingsProductId != null && - * this.fromApiJsonHelper.parameterExists(ClientApiConstants. - * datatables, element)) { final JsonArray datatables = - * this.fromApiJsonHelper.extractJsonArrayNamed(ClientApiConstants. + * if (savingsProductId != null && this.fromApiJsonHelper.parameterExists(ClientApiConstants. datatables, + * element)) { final JsonArray datatables = this.fromApiJsonHelper.extractJsonArrayNamed(ClientApiConstants. * datatables, element); if (datatables.size() > 0) { * baseDataValidator.reset().parameter(ClientApiConstants. - * savingsProductIdParamName).value(savingsProductId) - * .failWithCodeNoParameterAddedToErrorCode( + * savingsProductIdParamName).value(savingsProductId) .failWithCodeNoParameterAddedToErrorCode( * "should.not.be.used.with.datatables.parameter"); } } */ } @@ -175,12 +172,9 @@ public final class ClientDataValidator { element); baseDataValidator.reset().parameter(ClientApiConstants.activationDateParamName).value(joinedDate).notNull(); /* - * if(this.fromApiJsonHelper.parameterExists(ClientApiConstants. - * datatables,element)){ - * baseDataValidator.reset().parameter(ClientApiConstants. - * activeParamName).value(active) - * .failWithCodeNoParameterAddedToErrorCode( - * "should.not.be.used.with.datatables.parameter"); } + * if(this.fromApiJsonHelper.parameterExists(ClientApiConstants. datatables,element)){ + * baseDataValidator.reset().parameter(ClientApiConstants. activeParamName).value(active) + * .failWithCodeNoParameterAddedToErrorCode( "should.not.be.used.with.datatables.parameter"); } */ } } else { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientTimelineData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientTimelineData.java index 685188550..52f6f982f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientTimelineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientTimelineData.java @@ -22,8 +22,7 @@ import java.io.Serializable; import org.joda.time.LocalDate; /** - * Immutable data object represent the important time-line events of a loan - * application and loan. + * Immutable data object represent the important time-line events of a loan application and loan. */ @SuppressWarnings("unused") public class ClientTimelineData implements Serializable { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/AccountNumberGenerator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/AccountNumberGenerator.java index 1c4dec636..0372bcd66 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/AccountNumberGenerator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/AccountNumberGenerator.java @@ -31,9 +31,8 @@ import org.apache.fineract.portfolio.shareaccounts.domain.ShareAccount; import org.springframework.stereotype.Component; /** - * Example {@link AccountNumberGenerator} for clients that takes an entities - * auto generated database id and zero fills it ensuring the identifier is - * always of a given maxLength. + * Example {@link AccountNumberGenerator} for clients that takes an entities auto generated database id and zero fills + * it ensuring the identifier is always of a given maxLength. */ @Component public class AccountNumberGenerator { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepositoryWrapper.java index e2dd277f0..ec360de8e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepositoryWrapper.java @@ -26,8 +26,7 @@ import org.springframework.stereotype.Service; /** *

- * Wrapper for {@link ClientNonPersonRepository} that adds NULL checking and - * Error handling capabilities + * Wrapper for {@link ClientNonPersonRepository} that adds NULL checking and Error handling capabilities *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java index 8a8fe914b..92e0b5431 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java @@ -29,8 +29,7 @@ import org.springframework.transaction.annotation.Transactional; /** *

- * Wrapper for {@link ClientRepository} that adds NULL checking and Error - * handling capabilities + * Wrapper for {@link ClientRepository} that adds NULL checking and Error handling capabilities *

*/ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java index e052ba7c9..6268df727 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java @@ -139,8 +139,7 @@ public class ClientTransaction extends AbstractPersistableCustom { } /** - * Converts the content of this Client Transaction to a map which can be - * passed to the accounting module + * Converts the content of this Client Transaction to a map which can be passed to the accounting module * * * diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientIdentifierNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientIdentifierNotFoundException.java index ddc64f10a..061fdbe93 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientIdentifierNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientIdentifierNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.client.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when client Identifier resources are not - * found. + * A {@link RuntimeException} thrown when client Identifier resources are not found. */ public class ClientIdentifierNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundByClientIdException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundByClientIdException.java index cf2be2425..872989425 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundByClientIdException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundByClientIdException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.client.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when clientNonPerson resources are not - * found. + * A {@link RuntimeException} thrown when clientNonPerson resources are not found. */ public class ClientNonPersonNotFoundByClientIdException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundException.java index 9ae84d7b5..99320ad1e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.client.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when clientNonPerson resources are not - * found. + * A {@link RuntimeException} thrown when clientNonPerson resources are not found. */ public class ClientNonPersonNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/DuplicateClientIdentifierException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/DuplicateClientIdentifierException.java index 69999e1b4..41f3ba3b3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/DuplicateClientIdentifierException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/DuplicateClientIdentifierException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.client.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * A {@link RuntimeException} thrown when a client identifier of the particular - * type is already present + * A {@link RuntimeException} thrown when a client identifier of the particular type is already present */ public class DuplicateClientIdentifierException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientSavingProductException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientSavingProductException.java old mode 100755 new mode 100644 index e1d468d90..d0921161a --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientSavingProductException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientSavingProductException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.client.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown an action to transition a - * loan from one state to another violates a domain rule. + * {@link AbstractPlatformDomainRuleException} thrown an action to transition a loan from one state to another violates + * a domain rule. */ public class InvalidClientSavingProductException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientStateTransitionException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientStateTransitionException.java index 1a1df935b..bfbe4610b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientStateTransitionException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientStateTransitionException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.client.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown an action to transition a - * loan from one state to another violates a domain rule. + * {@link AbstractPlatformDomainRuleException} thrown an action to transition a loan from one state to another violates + * a domain rule. */ public class InvalidClientStateTransitionException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientAddressCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientAddressCommandHandler.java index 8bc7005fb..3523bfecf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientAddressCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientAddressCommandHandler.java @@ -40,9 +40,8 @@ public class UpdateClientAddressCommandHandler implements NewCommandSourceHandle @Override public CommandProcessingResult processCommand(final JsonCommand command) { /* - * return - * this.writePlatformService.updateClientAddress(command.getClientId(), - * command.entityId(), command.getStatus(), command); + * return this.writePlatformService.updateClientAddress(command.getClientId(), command.entityId(), + * command.getStatus(), command); */ return this.writePlatformService.updateClientAddress(command.getClientId(), command); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientIdentifierCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientIdentifierCommandFromApiJsonDeserializer.java index 3b7f28fc8..13956afe0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientIdentifierCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientIdentifierCommandFromApiJsonDeserializer.java @@ -35,8 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link ClientIdentifierCommandFromApiJsonDeserializer} 's. + * Implementation of {@link FromApiJsonDeserializer} for {@link ClientIdentifierCommandFromApiJsonDeserializer} 's. */ @Component public final class ClientIdentifierCommandFromApiJsonDeserializer extends AbstractFromApiJsonDeserializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeWritePlatformServiceJpaRepositoryImpl.java index fc3de2639..065d688ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeWritePlatformServiceJpaRepositoryImpl.java @@ -258,8 +258,7 @@ public class ClientChargeWritePlatformServiceJpaRepositoryImpl implements Client /** * Validates transaction to ensure that
* charge is active
- * transaction date is valid (between client activation and todays date) - *
+ * transaction date is valid (between client activation and todays date)
* charge is not already paid or waived
* amount is not more than total due * @@ -269,8 +268,7 @@ public class ClientChargeWritePlatformServiceJpaRepositoryImpl implements Client * @param transactionDate * @param amountPaid * @param requiresTransactionDateValidation - * if set to false, transaction date specific validation is - * skipped + * if set to false, transaction date specific validation is skipped * @param requiresTransactionAmountValidation * if set to false transaction amount validation is skipped * @return @@ -387,8 +385,7 @@ public class ClientChargeWritePlatformServiceJpaRepositoryImpl implements Client } /** - * Ensures that the charge transaction date (for payments) is not on a - * holiday or a non working day + * Ensures that the charge transaction date (for payments) is not on a holiday or a non working day * * @param savingsAccountCharge * @param fmt diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformServiceImpl.java index 1b8ec03dd..760cef1ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformServiceImpl.java @@ -249,8 +249,7 @@ public class ClientFamilyMembersWritePlatformServiceImpl implements ClientFamily } /* - * this.fromApiJsonHelper.extractDateFormatParameter(member.get( - * "dateOfBirth").getAsJsonObject()); + * this.fromApiJsonHelper.extractDateFormatParameter(member.get( "dateOfBirth").getAsJsonObject()); */ } @@ -292,8 +291,7 @@ public class ClientFamilyMembersWritePlatformServiceImpl implements ClientFamily apiJsonDeserializer.validateForUpdate(familyMemberId, command.json()); /* - * if (command.stringValueOfParameterNamed("clientFamilyMemberId") != - * null) { clientFamilyMemberId = + * if (command.stringValueOfParameterNamed("clientFamilyMemberId") != null) { clientFamilyMemberId = * command.longValueOfParameterNamed("clientFamilyMemberId"); } */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java index e7f552e4e..603d67d06 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java @@ -196,8 +196,7 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { @@ -365,8 +364,7 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP } /** - * This method extracts ClientNonPerson details from Client command and - * creates a new ClientNonPerson record + * This method extracts ClientNonPerson details from Client command and creates a new ClientNonPerson record * * @param client * @param command @@ -680,9 +678,8 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP if (staffId != null) { staff = this.staffRepository.findByOfficeHierarchyWithNotFoundDetection(staffId, clientForUpdate.getOffice().getHierarchy()); /** - * TODO Vishwas: We maintain history of chage of loan officer w.r.t - * loan in a history table, should we do the same for a client? - * Especially useful when the change happens due to a transfer etc + * TODO Vishwas: We maintain history of chage of loan officer w.r.t loan in a history table, should we do + * the same for a client? Especially useful when the change happens due to a transfer etc **/ clientForUpdate.assignStaff(staff); } @@ -804,8 +801,7 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP } /* - * To become a part of a group, group may have set of criteria to be m et - * before client can become member of it. + * To become a part of a group, group may have set of criteria to be m et before client can become member of it. */ private void validateParentGroupRulesBeforeClientActivation(Client client) { Integer minNumberOfClients = configurationDomainService.retrieveMinAllowedClientsInGroup(); @@ -813,8 +809,7 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP if (client.getGroups() != null && maxNumberOfClients != null) { for (Group group : client.getGroups()) { /** - * Since this Client has not yet been associated with the group, - * reduce maxNumberOfClients by 1 + * Since this Client has not yet been associated with the group, reduce maxNumberOfClients by 1 **/ final boolean validationsuccess = group.isGroupsClientCountWithinMaxRange(maxNumberOfClients - 1); if (!validationsuccess) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateral.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateral.java index 3fed35c79..a2498e7b4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateral.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateral.java @@ -121,16 +121,13 @@ public class LoanCollateral extends AbstractPersistableCustom { } /* - * @Override public boolean equals(final Object obj) { if (obj == null) { - * return false; } if (obj == this) { return true; } if (obj.getClass() != - * getClass()) { return false; } final LoanCollateral rhs = (LoanCollateral) - * obj; return new EqualsBuilder().appendSuper(super.equals(obj)) // - * .append(getId(), rhs.getId()) // .append(this.type.getId(), - * rhs.type.getId()) // .append(this.description, rhs.description) // - * .append(this.value, this.value)// .isEquals(); } + * @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return + * true; } if (obj.getClass() != getClass()) { return false; } final LoanCollateral rhs = (LoanCollateral) obj; + * return new EqualsBuilder().appendSuper(super.equals(obj)) // .append(getId(), rhs.getId()) // + * .append(this.type.getId(), rhs.type.getId()) // .append(this.description, rhs.description) // .append(this.value, + * this.value)// .isEquals(); } * - * @Override public int hashCode() { return new HashCodeBuilder(3, 5) // - * .append(getId()) // .append(this.type.getId()) // - * .append(this.description) // .append(this.value)// .toHashCode(); } + * @Override public int hashCode() { return new HashCodeBuilder(3, 5) // .append(getId()) // + * .append(this.type.getId()) // .append(this.description) // .append(this.value)// .toHashCode(); } */ } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/serialization/CollateralCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/serialization/CollateralCommandFromApiJsonDeserializer.java index b76f4da05..160a9aa39 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/serialization/CollateralCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/serialization/CollateralCommandFromApiJsonDeserializer.java @@ -37,8 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link CollateralCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link CollateralCommand}'s. */ @Component public final class CollateralCommandFromApiJsonDeserializer extends AbstractFromApiJsonDeserializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformServiceJpaRepositoryImpl.java index 477f3a5b4..6db49c30b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformServiceJpaRepositoryImpl.java @@ -86,8 +86,7 @@ public class CollateralWritePlatformServiceJpaRepositoryImpl implements Collater final LoanCollateral collateral = LoanCollateral.fromJson(loan, collateralType, command); /** - * Collaterals may be added only when the loan associated with them - * are yet to be approved + * Collaterals may be added only when the loan associated with them are yet to be approved **/ if (!loan.status().isSubmittedAndPendingApproval()) { throw new CollateralCannotBeCreatedException( @@ -133,8 +132,7 @@ public class CollateralWritePlatformServiceJpaRepositoryImpl implements Collater } /** - * Collaterals may be updated only when the loan associated with - * them are yet to be approved + * Collaterals may be updated only when the loan associated with them are yet to be approved **/ if (!loan.status().isSubmittedAndPendingApproval()) { throw new CollateralCannotBeUpdatedException( @@ -167,8 +165,7 @@ public class CollateralWritePlatformServiceJpaRepositoryImpl implements Collater } /** - * Collaterals may be deleted only when the loan associated with them - * are yet to be approved + * Collaterals may be deleted only when the loan associated with them are yet to be approved **/ if (!loan.status().isSubmittedAndPendingApproval()) { throw new CollateralCannotBeDeletedException( diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualClientData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualClientData.java index 59803c8bc..1585d84c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualClientData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualClientData.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.collectionsheet.data; import java.util.Collection; /** - * Immutable data object for clients with loans due for disbursement or - * collection. + * Immutable data object for clients with loans due for disbursement or collection. */ public final class IndividualClientData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetLoanFlatData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetLoanFlatData.java index fe989027d..b4731e49a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetLoanFlatData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetLoanFlatData.java @@ -22,8 +22,7 @@ import java.math.BigDecimal; import org.apache.fineract.organisation.monetary.data.CurrencyData; /** - * Immutable data object for extracting flat data for joint liability group's - * collection sheet. + * Immutable data object for extracting flat data for joint liability group's collection sheet. */ public class IndividualCollectionSheetLoanFlatData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGClientData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGClientData.java index ad40290b2..fc7e3096d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGClientData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGClientData.java @@ -22,8 +22,7 @@ import java.util.Collection; import org.apache.fineract.infrastructure.core.data.EnumOptionData; /** - * Immutable data object for clients with loans due for disbursement or - * collection. + * Immutable data object for clients with loans due for disbursement or collection. */ public final class JLGClientData { @@ -48,10 +47,9 @@ public final class JLGClientData { } /* - * public JLGClientData(final Long clientId, final String clientName, final - * Collection loans, final EnumOptionData attendanceType) { - * this.clientId = clientId; this.clientName = clientName; this.loans = - * loans; this.attendanceType = attendanceType; } + * public JLGClientData(final Long clientId, final String clientName, final Collection loans, final + * EnumOptionData attendanceType) { this.clientId = clientId; this.clientName = clientName; this.loans = loans; + * this.attendanceType = attendanceType; } */ public static JLGClientData withAttendance(final Long clientId, final String clientName, final EnumOptionData attendanceType) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetFlatData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetFlatData.java index c4409faee..da9b86568 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetFlatData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetFlatData.java @@ -23,8 +23,7 @@ import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.organisation.monetary.data.CurrencyData; /** - * Immutable data object for extracting flat data for joint liability group's - * collection sheet. + * Immutable data object for extracting flat data for joint liability group's collection sheet. */ public class JLGCollectionSheetFlatData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGGroupData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGGroupData.java index 05d4a3e35..e1e977970 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGGroupData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGGroupData.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.collectionsheet.data; import java.util.Collection; /** - * Immutable data object for groups with clients due for disbursement or - * collection. + * Immutable data object for groups with clients due for disbursement or collection. */ public final class JLGGroupData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/LoanDueData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/LoanDueData.java index f7974d246..da09280ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/LoanDueData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/LoanDueData.java @@ -22,8 +22,7 @@ import java.math.BigDecimal; import org.apache.fineract.organisation.monetary.data.CurrencyData; /** - * Immutable data object for representing loan with dues (example: loan is due - * for disbursement, repayments). + * Immutable data object for representing loan with dues (example: loan is due for disbursement, repayments). */ public class LoanDueData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingsDueData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingsDueData.java index b15684a20..bcd2196bb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingsDueData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingsDueData.java @@ -22,8 +22,7 @@ import java.math.BigDecimal; import org.apache.fineract.organisation.monetary.data.CurrencyData; /** - * Immutable data object for representing loan with dues (example: loan is due - * for disbursement, repayments). + * Immutable data object for representing loan with dues (example: loan is due for disbursement, repayments). */ public final class SavingsDueData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkDisbursalCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkDisbursalCommandFromApiJsonDeserializer.java index 9a18e1afb..72e146797 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkDisbursalCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkDisbursalCommandFromApiJsonDeserializer.java @@ -35,8 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link CollectionSheetBulkDisbursalCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link CollectionSheetBulkDisbursalCommand}'s. */ @Component public final class CollectionSheetBulkDisbursalCommandFromApiJsonDeserializer diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer.java index 1fa9b6573..1bf8e2f55 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer.java @@ -37,8 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link CollectionSheetBulkRepaymentCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link CollectionSheetBulkRepaymentCommand}'s. */ @Component public final class CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformServiceImpl.java index f78961981..9bae3caef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformServiceImpl.java @@ -120,9 +120,8 @@ public class CollectionSheetReadPlatformServiceImpl implements CollectionSheetRe } /* - * Reads all the loans which are due for disbursement or collection and - * builds hierarchical data structure for collections sheet with hierarchy - * Groups >> Clients >> Loans. + * Reads all the loans which are due for disbursement or collection and builds hierarchical data structure for + * collections sheet with hierarchy Groups >> Clients >> Loans. */ @SuppressWarnings("null") private JLGCollectionSheetData buildJLGCollectionSheet(final LocalDate dueDate, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInMonthType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInMonthType.java index f2e0474eb..52590194f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInMonthType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInMonthType.java @@ -23,8 +23,7 @@ import java.util.List; /** * - * People typically use either of the following settings when calculating there - * interest using the daily method: + * People typically use either of the following settings when calculating there interest using the daily method: *
    *
  • Actual or
  • *
  • 30
  • diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearType.java index f80bf73d3..956c54ac8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearType.java @@ -23,8 +23,7 @@ import java.util.List; /** * - * People typically use either of the following settings when calculating there - * interest using the daily method: + * People typically use either of the following settings when calculating there interest using the daily method: *
      *
    • Actual or
    • *
    • 360 or
    • diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventListner.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventListner.java old mode 100755 new mode 100644 index 67eb063ec..d1fecb3a2 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventListner.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventListner.java @@ -22,9 +22,8 @@ import java.util.Map; import org.apache.fineract.portfolio.common.BusinessEventNotificationConstants.BusinessEntity; /** - * The interface to be implemented by classes that want to be informed when a - * Business Event executes. example: on completion of loan approval event need - * to block guarantor funds + * The interface to be implemented by classes that want to be informed when a Business Event executes. example: on + * completion of loan approval event need to block guarantor funds * */ public interface BusinessEventListner { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventNotifierService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventNotifierService.java old mode 100755 new mode 100644 index 800f57e52..1d267a326 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventNotifierService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventNotifierService.java @@ -23,33 +23,28 @@ import org.apache.fineract.portfolio.common.BusinessEventNotificationConstants.B import org.apache.fineract.portfolio.common.BusinessEventNotificationConstants.BusinessEvents; /** - * Implemented class is responsible for notifying the business event to - * registered listeners. + * Implemented class is responsible for notifying the business event to registered listeners. * */ public interface BusinessEventNotifierService { /** - * Method should be called to notify listeners before Business event - * execution for any pre-processing of event + * Method should be called to notify listeners before Business event execution for any pre-processing of event */ public void notifyBusinessEventToBeExecuted(BusinessEvents businessEvent, Map businessEventEntity); /** - * Method should be called to notify listeners after Business event - * execution for any post-processing of event + * Method should be called to notify listeners after Business event execution for any post-processing of event */ public void notifyBusinessEventWasExecuted(BusinessEvents businessEvent, Map businessEventEntity); /** - * Method is to register a class as listener for pre-processing of any - * Business event + * Method is to register a class as listener for pre-processing of any Business event */ public void addBusinessEventPreListners(BusinessEvents businessEvent, BusinessEventListner businessEventListner); /** - * Method is to register a class as listener for post-processing of any - * Business event + * Method is to register a class as listener for post-processing of any Business event */ public void addBusinessEventPostListners(BusinessEvents businessEvent, BusinessEventListner businessEventListner); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventNotifierServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventNotifierServiceImpl.java index 7d2d318a5..18dff7570 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventNotifierServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/BusinessEventNotifierServiceImpl.java @@ -35,11 +35,9 @@ public class BusinessEventNotifierServiceImpl implements BusinessEventNotifierSe /* * (non-Javadoc) * - * @see - * org.apache.fineract.portfolio.common.service.BusinessEventNotifierService - * #notifyBusinessEventToBeExecuted - * (org.apache.fineract.portfolio.common.BusinessEventNotificationConstants - * .BusinessEvents, org.springframework.data.jpa.domain.AbstractPersistable) + * @see org.apache.fineract.portfolio.common.service.BusinessEventNotifierService #notifyBusinessEventToBeExecuted + * (org.apache.fineract.portfolio.common.BusinessEventNotificationConstants .BusinessEvents, + * org.springframework.data.jpa.domain.AbstractPersistable) */ @Override public void notifyBusinessEventToBeExecuted(BusinessEvents businessEvent, Map businessEventEntity) { @@ -54,11 +52,9 @@ public class BusinessEventNotifierServiceImpl implements BusinessEventNotifierSe /* * (non-Javadoc) * - * @see - * org.apache.fineract.portfolio.common.service.BusinessEventNotifierService - * #notifyBusinessEventWasExecuted - * (org.apache.fineract.portfolio.common.BusinessEventNotificationConstants - * .BusinessEvents, org.springframework.data.jpa.domain.AbstractPersistable) + * @see org.apache.fineract.portfolio.common.service.BusinessEventNotifierService #notifyBusinessEventWasExecuted + * (org.apache.fineract.portfolio.common.BusinessEventNotificationConstants .BusinessEvents, + * org.springframework.data.jpa.domain.AbstractPersistable) */ @Override public void notifyBusinessEventWasExecuted(BusinessEvents businessEvent, Map businessEventEntity) { @@ -73,11 +69,8 @@ public class BusinessEventNotifierServiceImpl implements BusinessEventNotifierSe /* * (non-Javadoc) * - * @see - * org.apache.fineract.portfolio.common.service.BusinessEventNotifierService - * #addBusinessEventPreListners - * (org.apache.fineract.portfolio.common.BusinessEventNotificationConstants - * .BusinessEvents, + * @see org.apache.fineract.portfolio.common.service.BusinessEventNotifierService #addBusinessEventPreListners + * (org.apache.fineract.portfolio.common.BusinessEventNotificationConstants .BusinessEvents, * org.apache.fineract.portfolio.common.service.BusinessEventListner) */ @Override @@ -88,11 +81,8 @@ public class BusinessEventNotifierServiceImpl implements BusinessEventNotifierSe /* * (non-Javadoc) * - * @see - * org.apache.fineract.portfolio.common.service.BusinessEventNotifierService - * #addBusinessEventPostListners - * (org.apache.fineract.portfolio.common.BusinessEventNotificationConstants - * .BusinessEvents, + * @see org.apache.fineract.portfolio.common.service.BusinessEventNotifierService #addBusinessEventPostListners + * (org.apache.fineract.portfolio.common.BusinessEventNotificationConstants .BusinessEvents, * org.apache.fineract.portfolio.common.service.BusinessEventListner) */ @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformServiceJpaRepositoryImpl.java index d0495552e..f4786c794 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformServiceJpaRepositoryImpl.java @@ -109,8 +109,7 @@ public class FundWritePlatformServiceJpaRepositoryImpl implements FundWritePlatf } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleFundDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { if (realCause.getMessage().contains("fund_externalid_org")) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java index 9b7dcc190..34e55c227 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java @@ -89,9 +89,8 @@ public class GroupingTypesApiConstants { public static final String datatables = "datatables"; /** - * 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. + * 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 CENTER_RESPONSE_DATA_PARAMETERS = new HashSet<>( Arrays.asList(idParamName, nameParamName, externalIdParamName, officeIdParamName, officeNameParamName, staffIdParamName, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupGeneralData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupGeneralData.java index 310677caf..e9503acb8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupGeneralData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupGeneralData.java @@ -32,8 +32,7 @@ import org.apache.fineract.portfolio.client.data.ClientData; import org.joda.time.LocalDate; /** - * Immutable data object representing a general group (so may or may not have a - * parent). + * Immutable data object representing a general group (so may or may not have a parent). */ public class GroupGeneralData implements Serializable { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupTimelineData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupTimelineData.java index 8aeb3b8ba..3db962b63 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupTimelineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupTimelineData.java @@ -23,8 +23,7 @@ import java.util.Objects; import org.joda.time.LocalDate; /** - * Immutable data object represent the important time-line events of a - * group/center. + * Immutable data object represent the important time-line events of a group/center. * */ @SuppressWarnings("unused") diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/Group.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/Group.java index 3ea03578f..746b311a0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/Group.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/Group.java @@ -215,8 +215,7 @@ public final class Group extends AbstractPersistableCustom { associateClients(clientMembers); /* - * Always keep status change at the bottom, as status change rule - * depends on the attribute's value + * Always keep status change at the bottom, as status change rule depends on the attribute's value */ setStatus(activationDate, currentUser, status, dataValidationErrors); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepositoryWrapper.java index 4d02ee70d..a06fa308e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepositoryWrapper.java @@ -27,8 +27,7 @@ import org.springframework.stereotype.Service; /** *

      - * Wrapper for {@link GroupRepository} that adds NULL checking and Error - * handling capabilities + * Wrapper for {@link GroupRepository} that adds NULL checking and Error handling capabilities *

      */ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupLevelException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupLevelException.java index 150d3393c..27f4667ba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupLevelException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupLevelException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.group.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when parentGroup'd level - * is not equal to parent level of the levelid param,. + * {@link AbstractPlatformDomainRuleException} thrown when parentGroup'd level is not equal to parent level of the + * levelid param,. */ public class InvalidGroupLevelException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java index 37cf4bed2..3d221d24c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java @@ -221,8 +221,7 @@ public class GroupingTypesWritePlatformServiceJpaRepositoryImpl implements Group this.groupRepository.save(newGroup); /* - * Generate hierarchy for a new center/group and all the child - * groups if they exist + * Generate hierarchy for a new center/group and all the child groups if they exist */ newGroup.generateHierarchy(); @@ -419,9 +418,8 @@ public class GroupingTypesWritePlatformServiceJpaRepositoryImpl implements Group final GroupLevel groupLevel = this.groupLevelRepository.findById(groupForUpdate.getGroupLevel().getId()).orElse(null); /* - * Ignoring parentId param, if group for update is super parent. - * TODO Need to check: Ignoring is correct or need throw unsupported - * param + * Ignoring parentId param, if group for update is super parent. TODO Need to check: Ignoring is correct or + * need throw unsupported param */ if (!groupLevel.isSuperParent()) { @@ -445,10 +443,8 @@ public class GroupingTypesWritePlatformServiceJpaRepositoryImpl implements Group throw new InvalidOfficeException("group", "attach.to.parent.group", errorMessage); } /* - * If Group is not super parent then validate group - * level's parent level is same as group parent's level - * this check makes sure new group is added at immediate - * next level in hierarchy + * If Group is not super parent then validate group level's parent level is same as group + * parent's level this check makes sure new group is added at immediate next level in hierarchy */ if (!groupForUpdate.getGroupLevel().isIdentifiedByParentId(newParentGroup.getGroupLevel().getId())) { @@ -467,12 +463,9 @@ public class GroupingTypesWritePlatformServiceJpaRepositoryImpl implements Group } /* - * final Set clientMembers = assembleSetOfClients(officeId, - * command); List changes = - * groupForUpdate.updateClientMembersIfDifferent(clientMembers); if - * (!changes.isEmpty()) { - * actualChanges.put(GroupingTypesApiConstants - * .clientMembersParamName, changes); } + * final Set clientMembers = assembleSetOfClients(officeId, command); List changes = + * groupForUpdate.updateClientMembersIfDifferent(clientMembers); if (!changes.isEmpty()) { + * actualChanges.put(GroupingTypesApiConstants .clientMembersParamName, changes); } */ this.groupRepository.saveAndFlush(groupForUpdate); @@ -550,8 +543,7 @@ public class GroupingTypesWritePlatformServiceJpaRepositoryImpl implements Group if (inheritStaffForClientAccounts) { LocalDate loanOfficerReassignmentDate = LocalDate.now(); /* - * update loan officer for client and update loan officer for - * clients loans and savings + * update loan officer for client and update loan officer for clients loans and savings */ Set clients = groupForUpdate.getClientMembers(); if (clients != null) { @@ -767,8 +759,7 @@ public class GroupingTypesWritePlatformServiceJpaRepositoryImpl implements Group } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleGroupDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve, final GroupTypes groupLevel) { @@ -982,8 +973,7 @@ public class GroupingTypesWritePlatformServiceJpaRepositoryImpl implements Group } /** - * Group shouldn't have a meeting when no meeting attached for - * center + * Group shouldn't have a meeting when no meeting attached for center */ if (ceneterCalendar == null && groupCalendar != null) { throw new GeneralPlatformDomainRuleException( @@ -991,8 +981,7 @@ public class GroupingTypesWritePlatformServiceJpaRepositoryImpl implements Group "Group with id " + group.getId() + " is already associated with meeting", group.getId()); } /** - * Group meeting recurrence should match with center meeting - * recurrence + * Group meeting recurrence should match with center meeting recurrence */ else if (ceneterCalendar != null && groupCalendar != null) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartRepositoryWrapper.java index e2bca6efd..e1dfbcad5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartRepositoryWrapper.java @@ -25,15 +25,13 @@ import org.springframework.stereotype.Service; /** *

      - * Wrapper for {@link InterestRateChartRepository} that is responsible for - * checking if {@link InterestRateChart} is returned when using - * findOne repository method and throwing an appropriate not found - * exception. + * Wrapper for {@link InterestRateChartRepository} that is responsible for checking if {@link InterestRateChart} is + * returned when using findOne repository method and throwing an appropriate not found exception. *

      * *

      - * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link InterestRateChartRepository} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where + * {@link InterestRateChartRepository} is required. *

      */ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabRepositoryWrapper.java index 7cbea3024..64f811b46 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabRepositoryWrapper.java @@ -25,15 +25,13 @@ import org.springframework.stereotype.Service; /** *

      - * Wrapper for {@link InterestRateChartSlabRepository} that is responsible for - * checking if {@link InterestRateChartSlab} is returned when using - * findOne repository method and throwing an appropriate not found - * exception. + * Wrapper for {@link InterestRateChartSlabRepository} that is responsible for checking if {@link InterestRateChartSlab} + * is returned when using findOne repository method and throwing an appropriate not found exception. *

      * *

      - * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link InterestRateChartSlabRepository} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where + * {@link InterestRateChartSlabRepository} is required. *

      */ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestIncentives.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestIncentives.java old mode 100755 new mode 100644 index 937095f2a..4414bfbee --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestIncentives.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestIncentives.java @@ -45,10 +45,8 @@ public class InterestIncentives extends AbstractPersistableCustom { } /* - * public InterestIncentives(final InterestRateChartSlab - * interestRateChartSlab, final InterestIncentivesFields - * interestIncentivesFields) { this.interestRateChartSlab = - * interestRateChartSlab; this.interestIncentivesFields = + * public InterestIncentives(final InterestRateChartSlab interestRateChartSlab, final InterestIncentivesFields + * interestIncentivesFields) { this.interestRateChartSlab = interestRateChartSlab; this.interestIncentivesFields = * interestIncentivesFields; } */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestRateChart.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestRateChart.java index a965e0819..3166d66d9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestRateChart.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestRateChart.java @@ -264,8 +264,7 @@ public class InterestRateChart extends AbstractPersistableCustom { } else { /** - * TODO: AA: Move this code to - * InterestRateChartSlabAssembler + * TODO: AA: Move this code to InterestRateChartSlabAssembler */ final String description = chartSlabsCommand.stringValueOfParameterNamed(descriptionParamName); final Integer periodTypeId = chartSlabsCommand.integerValueOfParameterNamed(periodTypeParamName, locale); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartAssembler.java index b7836b2ab..39d3d2ede 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartAssembler.java @@ -60,8 +60,7 @@ public class InterestRateChartAssembler { } /** - * Assembles a new {@link InterestRateChart} from JSON Slabs passed in - * request + * Assembles a new {@link InterestRateChart} from JSON Slabs passed in request */ public InterestRateChart assembleFrom(final JsonCommand command) { final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabAssembler.java index 153bd6453..35fc2673a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabAssembler.java @@ -69,8 +69,7 @@ public class InterestRateChartSlabAssembler { } /** - * Assembles a new {@link InterestRateChartSlab} from JSON Slabs passed in - * request + * Assembles a new {@link InterestRateChartSlab} from JSON Slabs passed in request */ public InterestRateChartSlab assembleFrom(final JsonCommand command) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java index 8da259908..fe46eebfc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java @@ -324,10 +324,9 @@ public class LoansApiResource { } /* - * This template API is used for loan approval, ideally this should be - * invoked on loan that are pending for approval. But system does not - * validate the status of the loan, it returns the template irrespective of - * loan status + * This template API is used for loan approval, ideally this should be invoked on loan that are pending for + * approval. But system does not validate the status of the loan, it returns the template irrespective of loan + * status */ @GET diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UpdateLoanOfficerCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UpdateLoanOfficerCommand.java index bbbb87115..816ffc04d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UpdateLoanOfficerCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UpdateLoanOfficerCommand.java @@ -26,8 +26,7 @@ import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidati import org.joda.time.LocalDate; /** - * Immutable data object for updating relationship between loan officer and a - * loan. + * Immutable data object for updating relationship between loan officer and a loan. */ public class UpdateLoanOfficerCommand { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java index c8714505c..900e12d11 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java @@ -463,8 +463,7 @@ public final class LoanAccountData { } /** - * Used to produce a {@link LoanAccountData} with only collateral options - * for now. + * Used to produce a {@link LoanAccountData} with only collateral options for now. */ public static LoanAccountData collateralTemplate(final Collection loanCollateralOptions) { final Long id = null; @@ -607,8 +606,7 @@ public final class LoanAccountData { } /** - * Used to produce a {@link LoanAccountData} with only client information - * defaulted. + * Used to produce a {@link LoanAccountData} with only client information defaulted. */ public static LoanAccountData clientDefaults(final Long clientId, final String clientAccountNo, final String clientName, final Long clientOfficeId, final LocalDate expectedDisbursementDate) { @@ -780,8 +778,7 @@ public final class LoanAccountData { } /** - * Used to produce a {@link LoanAccountData} with only group information - * defaulted. + * Used to produce a {@link LoanAccountData} with only group information defaulted. */ public static LoanAccountData groupDefaults(final GroupGeneralData group, final LocalDate expectedDisbursementDate) { @@ -1174,8 +1171,7 @@ public final class LoanAccountData { } /* - * Used to send back loan account data with the basic details coming from - * query. + * Used to send back loan account data with the basic details coming from query. */ public static LoanAccountData basicLoanDetails(final Long id, final String accountNo, final LoanStatusEnumData status, final String externalId, final Long clientId, final String clientAccountNo, final String clientName, final Long clientOfficeId, @@ -1265,8 +1261,7 @@ public final class LoanAccountData { } /* - * Used to combine the associations and template data on top of exist loan - * account data + * Used to combine the associations and template data on top of exist loan account data */ public static LoanAccountData associationsAndTemplate(final LoanAccountData acc, final LoanScheduleData repaymentSchedule, final Collection transactions, final Collection charges, @@ -1872,8 +1867,7 @@ public final class LoanAccountData { } /** - * Used to produce a {@link LoanAccountData} with only collateral options - * for now. + * Used to produce a {@link LoanAccountData} with only collateral options for now. * * @return {@link LoanAccountData} object */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApplicationTimelineData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApplicationTimelineData.java index e587605a8..18d8df487 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApplicationTimelineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApplicationTimelineData.java @@ -23,8 +23,7 @@ import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.joda.time.LocalDate; /** - * Immutable data object represent the important time-line events of a loan - * application and loan. + * Immutable data object represent the important time-line events of a loan application and loan. */ @SuppressWarnings("unused") public class LoanApplicationTimelineData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargeData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargeData.java index dfaba085f..9e1b00c94 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargeData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargeData.java @@ -87,8 +87,7 @@ public class LoanChargeData { } /** - * used when populating with details from charge definition (for crud on - * charges) + * used when populating with details from charge definition (for crud on charges) */ public static LoanChargeData newLoanChargeDetails(final Long chargeId, final String name, final CurrencyData currency, final BigDecimal amount, final BigDecimal percentage, final EnumOptionData chargeTimeType, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionEnumData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionEnumData.java index 7aee9b1f1..f970eb518 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionEnumData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionEnumData.java @@ -80,8 +80,8 @@ public class LoanTransactionEnumData { } /** - * Returns true if the transaction involves either a payment (disbursement) - * or a receipt (repayments, repayments during disbursement etc) + * Returns true if the transaction involves either a payment (disbursement) or a receipt (repayments, repayments + * during disbursement etc) * * @return */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ChangedTransactionDetail.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ChangedTransactionDetail.java old mode 100755 new mode 100644 index 2e7c89181..e76f603b8 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ChangedTransactionDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ChangedTransactionDetail.java @@ -22,8 +22,7 @@ import java.util.HashMap; import java.util.Map; /** - * Stores details of {@link LoanTransaction}'s that were reversed or newly - * created + * Stores details of {@link LoanTransaction}'s that were reversed or newly created * * */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java index e6ad2a67e..369397e98 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java @@ -506,10 +506,8 @@ public class Loan extends AbstractPersistableCustom { this.createStandingInstructionAtDisbursement = createStandingInstructionAtDisbursement; /* - * During loan origination stage and before loan is approved - * principal_amount, approved_principal and principal_amount_demanded - * will same amount and that amount is same as applicant loan demanded - * amount. + * During loan origination stage and before loan is approved principal_amount, approved_principal and + * principal_amount_demanded will same amount and that amount is same as applicant loan demanded amount. */ this.proposedPrincipal = this.loanRepaymentScheduleDetail.getPrincipal().getAmount(); @@ -642,13 +640,11 @@ public class Loan extends AbstractPersistableCustom { } /** - * Creates a loanTransaction for "Apply Charge Event" with transaction date - * set to "suppliedTransactionDate". The newly created transaction is also - * added to the Loan on which this method is called. + * Creates a loanTransaction for "Apply Charge Event" with transaction date set to "suppliedTransactionDate". The + * newly created transaction is also added to the Loan on which this method is called. * - * If "suppliedTransactionDate" is not passed Id, the transaction date is - * set to the loans due date if the due date is lesser than todays date. If - * not, the transaction date is set to todays date + * If "suppliedTransactionDate" is not passed Id, the transaction date is set to the loans due date if the due date + * is lesser than todays date. If not, the transaction date is set to todays date * * @param loanCharge * @param suppliedTransactionDate @@ -787,12 +783,11 @@ public class Loan extends AbstractPersistableCustom { .determineProcessor(this.transactionProcessingStrategy); if (!loanCharge.isDueAtDisbursement() && loanCharge.isPaidOrPartiallyPaid(loanCurrency())) { /**** - * TODO Vishwas Currently we do not allow removing a loan charge - * after a loan is approved (hence there is no need to adjust any - * loan transactions). + * TODO Vishwas Currently we do not allow removing a loan charge after a loan is approved (hence there is no + * need to adjust any loan transactions). * - * Consider removing this block of code or logically completing it - * for the future by getting the list of affected Transactions + * Consider removing this block of code or logically completing it for the future by getting the list of + * affected Transactions ***/ final List allNonContraTransactionsPostDisbursement = retreiveListOfTransactionsPostDisbursement(); loanRepaymentScheduleTransactionProcessor.handleTransaction(getDisbursementDate(), allNonContraTransactionsPostDisbursement, @@ -856,12 +851,11 @@ public class Loan extends AbstractPersistableCustom { .determineProcessor(this.transactionProcessingStrategy); if (!loanCharge.isDueAtDisbursement()) { /**** - * TODO Vishwas Currently we do not allow waiving updating loan - * charge after a loan is approved (hence there is no need to adjust - * any loan transactions). + * TODO Vishwas Currently we do not allow waiving updating loan charge after a loan is approved (hence there + * is no need to adjust any loan transactions). * - * Consider removing this block of code or logically completing it - * for the future by getting the list of affected Transactions + * Consider removing this block of code or logically completing it for the future by getting the list of + * affected Transactions ***/ final List allNonContraTransactionsPostDisbursement = retreiveListOfTransactionsPostDisbursement(); loanRepaymentScheduleTransactionProcessor.handleTransaction(getDisbursementDate(), allNonContraTransactionsPostDisbursement, @@ -1045,12 +1039,11 @@ public class Loan extends AbstractPersistableCustom { .determineProcessor(this.transactionProcessingStrategy); if (!loanCharge.isDueAtDisbursement() && loanCharge.isPaidOrPartiallyPaid(loanCurrency())) { /**** - * TODO Vishwas Currently we do not allow waiving fully paid loan - * charge and waiving partially paid loan charges only waives the - * remaining amount. + * TODO Vishwas Currently we do not allow waiving fully paid loan charge and waiving partially paid loan + * charges only waives the remaining amount. * - * Consider removing this block of code or logically completing it - * for the future by getting the list of affected Transactions + * Consider removing this block of code or logically completing it for the future by getting the list of + * affected Transactions ***/ final List allNonContraTransactionsPostDisbursement = retreiveListOfTransactionsPostDisbursement(); loanRepaymentScheduleTransactionProcessor.handleTransaction(getDisbursementDate(), allNonContraTransactionsPostDisbursement, @@ -1227,8 +1220,7 @@ public class Loan extends AbstractPersistableCustom { } /** - * method updates accrual derived fields on installments and reverse the - * unprocessed transactions + * method updates accrual derived fields on installments and reverse the unprocessed transactions */ private void applyAccurals(AppUser currentUser) { Collection accruals = retreiveListOfAccrualTransactions(); @@ -2024,8 +2016,7 @@ public class Loan extends AbstractPersistableCustom { validateDisbursementDateIsOnHoliday(allowTransactionsOnHoliday, holidays); /** - * Copy interest recalculation settings if interest recalculation is - * enabled + * Copy interest recalculation settings if interest recalculation is enabled */ if (this.loanRepaymentScheduleDetail.isInterestRecalculationEnabled()) { @@ -2156,20 +2147,16 @@ public class Loan extends AbstractPersistableCustom { final Map actualChanges = new LinkedHashMap<>(); /* - * statusEnum is holding the possible new status derived from - * loanLifecycleStateMachine.transition. + * statusEnum is holding the possible new status derived from loanLifecycleStateMachine.transition. */ final LoanStatus newStatusEnum = loanLifecycleStateMachine.transition(LoanEvent.LOAN_APPROVED, LoanStatus.fromInt(this.loanStatus)); /* - * FIXME: There is no need to check below condition, if - * loanLifecycleStateMachine.transition is doing it's responsibility - * properly. Better implementation approach is, if code passes invalid - * combination of states (fromState and toState), state machine should - * return invalidate state and below if condition should check for not - * equal to invalidateState, instead of check new value is same as - * present value. + * FIXME: There is no need to check below condition, if loanLifecycleStateMachine.transition is doing it's + * responsibility properly. Better implementation approach is, if code passes invalid combination of states + * (fromState and toState), state machine should return invalidate state and below if condition should check for + * not equal to invalidateState, instead of check new value is same as present value. */ if (!newStatusEnum.hasStateOf(LoanStatus.fromInt(this.loanStatus))) { @@ -2198,9 +2185,8 @@ public class Loan extends AbstractPersistableCustom { this.approvedPrincipal = approvedLoanAmount; /* - * All the calculations are done based on the principal - * amount, so it is necessary to set principal amount to - * approved amount + * All the calculations are done based on the principal amount, so it is necessary to set principal + * amount to approved amount */ this.loanRepaymentScheduleDetail.setPrincipal(approvedLoanAmount); @@ -2368,9 +2354,8 @@ public class Loan extends AbstractPersistableCustom { final Money interestApplied = Money.of(getCurrency(), this.summary.getTotalInterestCharged()); /** - * Add an interest applied transaction of the interest is accrued - * upfront (Up front accrual), no accounting or cash based accounting is - * selected + * Add an interest applied transaction of the interest is accrued upfront (Up front accrual), no accounting or + * cash based accounting is selected **/ if ((isNoneOrCashOrUpfrontAccrualAccountingEnabledOnLoanProduct() && isMultiDisburmentLoan() @@ -2635,8 +2620,7 @@ public class Loan extends AbstractPersistableCustom { } /* - * Ability to regenerate the repayment schedule based on the loans current - * details/state. + * Ability to regenerate the repayment schedule based on the loans current details/state. */ public void regenerateRepaymentSchedule(final ScheduleGeneratorDTO scheduleGeneratorDTO, final AppUser currentUser) { final LoanScheduleModel loanSchedule = regenerateScheduleModel(scheduleGeneratorDTO); @@ -2711,15 +2695,13 @@ public class Loan extends AbstractPersistableCustom { // for (charges due at time of disbursement) /*** - * TODO Vishwas: do we need to be able to pass in payment type details - * for repayments at disbursements too? + * TODO Vishwas: do we need to be able to pass in payment type details for repayments at disbursements too? ***/ final Money totalFeeChargesDueAtDisbursement = this.summary.getTotalFeeChargesDueAtDisbursement(loanCurrency()); /** - * all Charges repaid at disbursal is marked as repaid and "APPLY - * Charge" transactions are created for all other fees ( which are - * created during disbursal but not repaid) + * all Charges repaid at disbursal is marked as repaid and "APPLY Charge" transactions are created for all other + * fees ( which are created during disbursal but not repaid) **/ Money disbursentMoney = Money.zero(getCurrency()); @@ -2744,8 +2726,7 @@ public class Loan extends AbstractPersistableCustom { } } else if (disbursedOn.equals(new LocalDate(this.actualDisbursementDate))) { /** - * create a Charge applied transaction if Up front Accrual, None - * or Cash based accounting is enabled + * create a Charge applied transaction if Up front Accrual, None or Cash based accounting is enabled **/ if (isNoneOrCashOrUpfrontAccrualAccountingEnabledOnLoanProduct()) { handleChargeAppliedTransaction(charge, disbursedOn, currentUser); @@ -3132,9 +3113,8 @@ public class Loan extends AbstractPersistableCustom { mapEntry.getValue().updateLoan(this); } /*** - * Commented since throwing exception if external id present for one - * of the transactions. for this need to save the reversed - * transactions first and then new transactions. + * Commented since throwing exception if external id present for one of the transactions. for this need to + * save the reversed transactions first and then new transactions. */ this.loanTransactions.addAll(changedTransactionDetail.getNewTransactionMappings().values()); } @@ -3142,8 +3122,7 @@ public class Loan extends AbstractPersistableCustom { updateLoanSummaryDerivedFields(); /** - * FIXME: Vishwas, skipping post loan transaction checks for Loan - * recoveries + * FIXME: Vishwas, skipping post loan transaction checks for Loan recoveries **/ if (loanTransaction.isNotRecoveryRepayment()) { doPostLoanTransactionChecks(loanTransaction.getTransactionDate(), loanLifecycleStateMachine); @@ -3786,8 +3765,8 @@ public class Loan extends AbstractPersistableCustom { } /** - * Behaviour added to comply with capability of previous mifos product to - * support easier transition to fineract platform. + * Behaviour added to comply with capability of previous mifos product to support easier transition to fineract + * platform. */ public void closeAsMarkedForReschedule(final JsonCommand command, final LoanLifecycleStateMachine loanLifecycleStateMachine, final Map changes) { @@ -4339,11 +4318,10 @@ public class Loan extends AbstractPersistableCustom { receivableInterest = receivableInterest.zero(); } /* - * if (transaction.getTransactionDate().isAfter(tillDate) && - * transaction.isAccrual()) { final String errorMessage = - * "The date on which a loan is interest waived cannot be in after accrual transactions." - * ; throw new InvalidLoanStateTransitionException("waive", - * "cannot.be.after.accrual.date", errorMessage, tillDate); } + * if (transaction.getTransactionDate().isAfter(tillDate) && transaction.isAccrual()) { final String + * errorMessage = "The date on which a loan is interest waived cannot be in after accrual transactions." ; + * throw new InvalidLoanStateTransitionException("waive", "cannot.be.after.accrual.date", errorMessage, + * tillDate); } */ } return receivableInterest; @@ -4371,8 +4349,7 @@ public class Loan extends AbstractPersistableCustom { // first repayment's from date is same as disbursement date. /* - * meetingStartDate is used as seedDate Capture the seedDate from user - * and use the seedDate as meetingStart date + * meetingStartDate is used as seedDate Capture the seedDate from user and use the seedDate as meetingStart date */ LocalDate tmpFromDate = getDisbursementDate(); @@ -5129,14 +5106,11 @@ public class Loan extends AbstractPersistableCustom { existingTransactionIds.addAll(findExistingTransactionIds()); existingReversedTransactionIds.addAll(findExistingReversedTransactionIds()); /* - * LocalDate recalculateFrom = null; List - * loanTransactions = - * this.retreiveListOfTransactionsPostDisbursementExcludeAccruals(); for - * (LoanTransaction loanTransaction : loanTransactions) { if - * (recalculateFrom == null || - * loanTransaction.getTransactionDate().isAfter(recalculateFrom)) { - * recalculateFrom = loanTransaction.getTransactionDate(); } } - * generatorDTO.setRecalculateFrom(recalculateFrom); + * LocalDate recalculateFrom = null; List loanTransactions = + * this.retreiveListOfTransactionsPostDisbursementExcludeAccruals(); for (LoanTransaction loanTransaction : + * loanTransactions) { if (recalculateFrom == null || + * loanTransaction.getTransactionDate().isAfter(recalculateFrom)) { recalculateFrom = + * loanTransaction.getTransactionDate(); } } generatorDTO.setRecalculateFrom(recalculateFrom); */ if (this.repaymentScheduleDetail().isInterestRecalculationEnabled()) { regenerateRepaymentScheduleWithInterestRecalculation(generatorDTO, currentUser); @@ -5165,9 +5139,8 @@ public class Loan extends AbstractPersistableCustom { mapEntry.getValue().updateLoan(this); } /*** - * Commented since throwing exception if external id present for one of - * the transactions. for this need to save the reversed transactions - * first and then new transactions. + * Commented since throwing exception if external id present for one of the transactions. for this need to save + * the reversed transactions first and then new transactions. */ this.loanTransactions.addAll(changedTransactionDetail.getNewTransactionMappings().values()); updateLoanSummaryDerivedFields(); @@ -6059,8 +6032,7 @@ public class Loan extends AbstractPersistableCustom { } /** - * Reverse only disbursement, accruals, and repayments at disbursal - * transactions + * Reverse only disbursement, accruals, and repayments at disbursal transactions * * @param actualDisbursementDate * @return diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainService.java index fc1e3d5ce..bf02097eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainService.java @@ -50,9 +50,8 @@ public interface LoanAccountDomainService { BigDecimal transactionAmount, PaymentDetail paymentDetail, String noteText, String txnExternalId); /** - * This method is to recalculate and accrue the income till the last accrued - * date. this method is used when the schedule changes due to interest - * recalculation + * This method is to recalculate and accrue the income till the last accrued date. this method is used when the + * schedule changes due to interest recalculation * * @param loan */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java index 1a9734f2a..41d244fdc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java @@ -157,14 +157,10 @@ public class LoanAccountDomainServiceJpa implements LoanAccountDomainService { // TODO: Is it required to validate transaction date with meeting dates // if repayments is synced with meeting? /* - * if(loan.isSyncDisbursementWithMeeting()){ // validate actual - * disbursement date against meeting date CalendarInstance - * calendarInstance = - * this.calendarInstanceRepository.findCalendarInstaneByLoanId - * (loan.getId(), CalendarEntityType.LOANS.getValue()); - * this.loanEventApiJsonValidator - * .validateRepaymentDateWithMeetingDate(transactionDate, - * calendarInstance); } + * if(loan.isSyncDisbursementWithMeeting()){ // validate actual disbursement date against meeting date + * CalendarInstance calendarInstance = this.calendarInstanceRepository.findCalendarInstaneByLoanId + * (loan.getId(), CalendarEntityType.LOANS.getValue()); this.loanEventApiJsonValidator + * .validateRepaymentDateWithMeetingDate(transactionDate, calendarInstance); } */ final List existingTransactionIds = new ArrayList<>(); @@ -195,11 +191,9 @@ public class LoanAccountDomainServiceJpa implements LoanAccountDomainService { saveLoanTransactionWithDataIntegrityViolationChecks(newRepaymentTransaction); /*** - * TODO Vishwas Batch save is giving me a - * HibernateOptimisticLockingFailureException, looping and saving for - * the time being, not a major issue for now as this loop is entered - * only in edge cases (when a payment is made before the latest payment - * recorded against the loan) + * TODO Vishwas Batch save is giving me a HibernateOptimisticLockingFailureException, looping and saving for the + * time being, not a major issue for now as this loop is entered only in edge cases (when a payment is made + * before the latest payment recorded against the loan) ***/ saveAndFlushLoanWithDataIntegrityViolationChecks(loan); @@ -471,10 +465,8 @@ public class LoanAccountDomainServiceJpa implements LoanAccountDomainService { /* * (non-Javadoc) * - * @see - * org.apache.fineract.portfolio.loanaccount.domain.LoanAccountDomainService - * #recalculateAccruals(org.apache.fineract.portfolio.loanaccount.domain. - * Loan) + * @see org.apache.fineract.portfolio.loanaccount.domain.LoanAccountDomainService + * #recalculateAccruals(org.apache.fineract.portfolio.loanaccount.domain. Loan) */ @Override public void recalculateAccruals(Loan loan) { @@ -696,11 +688,9 @@ public class LoanAccountDomainServiceJpa implements LoanAccountDomainService { defaultLoanLifecycleStateMachine(), scheduleGeneratorDTO, appUser); /*** - * TODO Vishwas Batch save is giving me a - * HibernateOptimisticLockingFailureException, looping and saving for - * the time being, not a major issue for now as this loop is entered - * only in edge cases (when a payment is made before the latest payment - * recorded against the loan) + * TODO Vishwas Batch save is giving me a HibernateOptimisticLockingFailureException, looping and saving for the + * time being, not a major issue for now as this loop is entered only in edge cases (when a payment is made + * before the latest payment recorded against the loan) ***/ for (LoanTransaction newTransaction : newTransactions) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java index ac6c9d30b..b9e306558 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java @@ -636,9 +636,8 @@ public class LoanCharge extends AbstractPersistableCustom { /** * @param percentageOf - * @returns a minimum cap or maximum cap set on charges if the criteria fits - * else it returns the percentageOf if the amount is within min and - * max cap + * @returns a minimum cap or maximum cap set on charges if the criteria fits else it returns the percentageOf if the + * amount is within min and max cap */ private BigDecimal minimumAndMaximumCap(final BigDecimal percentageOf) { BigDecimal minMaxCap = BigDecimal.ZERO; @@ -808,18 +807,15 @@ public class LoanCharge extends AbstractPersistableCustom { } /* - * @Override public boolean equals(final Object obj) { if (obj == null) { - * return false; } if (obj == this) { return true; } if (obj.getClass() != - * getClass()) { return false; } final LoanCharge rhs = (LoanCharge) obj; - * return new EqualsBuilder().appendSuper(super.equals(obj)) // - * .append(getId(), rhs.getId()) // .append(this.charge.getId(), - * rhs.charge.getId()) // .append(this.amount, rhs.amount) // - * .append(getDueLocalDate(), rhs.getDueLocalDate()) // .isEquals(); } + * @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return + * true; } if (obj.getClass() != getClass()) { return false; } final LoanCharge rhs = (LoanCharge) obj; return new + * EqualsBuilder().appendSuper(super.equals(obj)) // .append(getId(), rhs.getId()) // .append(this.charge.getId(), + * rhs.charge.getId()) // .append(this.amount, rhs.amount) // .append(getDueLocalDate(), rhs.getDueLocalDate()) // + * .isEquals(); } * * @Override public int hashCode() { return 1; * - * return new HashCodeBuilder(3, 5) // .append(getId()) // - * .append(this.charge.getId()) // + * return new HashCodeBuilder(3, 5) // .append(getId()) // .append(this.charge.getId()) // * .append(this.amount).append(getDueLocalDate()) // .toHashCode(); * * } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalculationDetails.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalculationDetails.java index a2712782f..71efa7be3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalculationDetails.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalculationDetails.java @@ -30,8 +30,7 @@ import org.apache.fineract.portfolio.loanproduct.domain.LoanRescheduleStrategyMe import org.apache.fineract.portfolio.loanproduct.domain.RecalculationFrequencyType; /** - * Entity for holding interest recalculation setting, details will be copied - * from product directly + * Entity for holding interest recalculation setting, details will be copied from product directly * * @author conflux */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java index 1dcca2338..39bc909d9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java @@ -26,8 +26,7 @@ import org.apache.fineract.organisation.monetary.domain.Money; import org.joda.time.LocalDate; /** - * A wrapper around loan schedule related data exposing needed behaviour by - * loan. + * A wrapper around loan schedule related data exposing needed behaviour by loan. */ public class LoanRepaymentScheduleProcessingWrapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepositoryWrapper.java index 3dd04c9e9..00fab0d12 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepositoryWrapper.java @@ -31,8 +31,7 @@ import org.springframework.transaction.annotation.Transactional; /** *

      - * Wrapper for {@link LoanRepository} that adds NULL checking and Error handling - * capabilities + * Wrapper for {@link LoanRepository} that adds NULL checking and Error handling capabilities *

      */ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummary.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummary.java index 8e4b1b52b..0eb7da607 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummary.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummary.java @@ -170,8 +170,7 @@ public final class LoanSummary { } /** - * All fields but totalFeeChargesDueAtDisbursement should be - * reset. + * All fields but totalFeeChargesDueAtDisbursement should be reset. */ public void zeroFields() { this.totalPrincipalDisbursed = BigDecimal.ZERO; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummaryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummaryWrapper.java index 1b33d1371..90ed8c82d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummaryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummaryWrapper.java @@ -26,8 +26,7 @@ import org.joda.time.LocalDate; import org.springframework.stereotype.Component; /** - * A wrapper for dealing with side-effect free functionality related to a loans - * transactions and repayment schedule. + * A wrapper for dealing with side-effect free functionality related to a loans transactions and repayment schedule. */ @Component public final class LoanSummaryWrapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariationsComparator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariationsComparator.java index 67ce832e2..8f7b3b5d7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariationsComparator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariationsComparator.java @@ -30,8 +30,8 @@ public class LoanTermVariationsComparator implements Comparator { @@ -31,9 +30,8 @@ public class LoanTransactionComparator implements Comparator { int compareResult = 0; final int comparsion = o1.getTransactionDate().compareTo(o2.getTransactionDate()); /** - * For transactions bearing the same transaction date, we sort - * transactions based on created date (when available) after which - * sorting for waivers takes place + * For transactions bearing the same transaction date, we sort transactions based on created date (when + * available) after which sorting for waivers takes place **/ if (comparsion == 0) { int comparisonBasedOnCreatedDate = 0; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionType.java index 2ac359037..efb777e55 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionType.java @@ -29,21 +29,19 @@ public enum LoanTransactionType { WRITEOFF(6, "loanTransactionType.writeOff"), // MARKED_FOR_RESCHEDULING(7, "loanTransactionType.marked.for.rescheduling"), // /** - * This type of transactions is allowed on written-off loans where mfi still - * attempts to recover payments from applicant after writing-off. + * This type of transactions is allowed on written-off loans where mfi still attempts to recover payments from + * applicant after writing-off. */ RECOVERY_REPAYMENT(8, "loanTransactionType.recoveryRepayment"), // WAIVE_CHARGES(9, "loanTransactionType.waiveCharges"), // /** - * Transaction represents an Accrual (For either interest, charge or a - * penalty + * Transaction represents an Accrual (For either interest, charge or a penalty **/ ACCRUAL(10, "loanTransactionType.accrual"), // /*** - * A Loan Transfer involves two steps, first a "initiate" Loan transfer - * transaction done by the Source branch followed by a "complete" loan - * transaction initiated by the destination branch + * A Loan Transfer involves two steps, first a "initiate" Loan transfer transaction done by the Source branch + * followed by a "complete" loan transaction initiated by the destination branch **/ INITIATE_TRANSFER(12, "loanTransactionType.initiateTransfer"), // APPROVE_TRANSFER(13, "loanTransactionType.approveTransfer"), // diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java index 328da6071..4992cbe63 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java @@ -43,8 +43,8 @@ import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.imp import org.joda.time.LocalDate; /** - * Abstract implementation of {@link LoanRepaymentScheduleTransactionProcessor} - * which is more convenient for concrete implementations to extend. + * Abstract implementation of {@link LoanRepaymentScheduleTransactionProcessor} which is more convenient for concrete + * implementations to extend. * * @see InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor * @@ -54,11 +54,10 @@ import org.joda.time.LocalDate; public abstract class AbstractLoanRepaymentScheduleTransactionProcessor implements LoanRepaymentScheduleTransactionProcessor { /** - * Provides support for passing all {@link LoanTransaction}'s so it will - * completely re-process the entire loan schedule. This is required in cases - * where the {@link LoanTransaction} being processed is in the past and - * falls before existing transactions or and adjustment is made to an - * existing in which case the entire loan schedule needs to be re-processed. + * Provides support for passing all {@link LoanTransaction}'s so it will completely re-process the entire loan + * schedule. This is required in cases where the {@link LoanTransaction} being processed is in the past and falls + * before existing transactions or and adjustment is made to an existing in which case the entire loan schedule + * needs to be re-processed. */ @Override @@ -160,9 +159,8 @@ public abstract class AbstractLoanRepaymentScheduleTransactionProcessor implemen loanTransaction.adjustInterestComponent(currency); } else { /** - * For existing transactions, check if the re-payment - * breakup (principal, interest, fees, penalties) has - * changed.
      + * For existing transactions, check if the re-payment breakup (principal, interest, fees, penalties) + * has changed.
      **/ final LoanTransaction newLoanTransaction = LoanTransaction.copyTransactionProperties(loanTransaction); @@ -171,8 +169,7 @@ public abstract class AbstractLoanRepaymentScheduleTransactionProcessor implemen handleTransaction(newLoanTransaction, currency, installments, charges); newLoanTransaction.adjustInterestComponent(currency); /** - * Check if the transaction amounts have changed. If so, - * reverse the original transaction and update + * Check if the transaction amounts have changed. If so, reverse the original transaction and update * changedTransactionDetail accordingly **/ if (LoanTransaction.transactionAmountsMatch(currency, loanTransaction, newLoanTransaction)) { @@ -198,8 +195,8 @@ public abstract class AbstractLoanRepaymentScheduleTransactionProcessor implemen } /** - * Provides support for processing the latest transaction (which should be - * latest transaction) against the loan schedule. + * Provides support for processing the latest transaction (which should be latest transaction) against the loan + * schedule. */ @Override public void handleTransaction(final LoanTransaction loanTransaction, final MonetaryCurrency currency, @@ -416,11 +413,11 @@ public abstract class AbstractLoanRepaymentScheduleTransactionProcessor implemen // abstract interface /** - * This method is responsible for checking if the current transaction is 'an - * advance/early payment' based on the details passed through. + * This method is responsible for checking if the current transaction is 'an advance/early payment' based on the + * details passed through. * - * Default implementation simply processes transactions as 'Late' if the - * transaction date is after the installment due date. + * Default implementation simply processes transactions as 'Late' if the transaction date is after the installment + * due date. */ protected boolean isTransactionALateRepaymentOnInstallment(final int installmentIndex, final List installments, final LocalDate transactionDate) { @@ -441,11 +438,10 @@ public abstract class AbstractLoanRepaymentScheduleTransactionProcessor implemen final Money transactionAmountUnprocessed, final List transactionMappings); /** - * This method is responsible for checking if the current transaction is 'an - * advance/early payment' based on the details passed through. + * This method is responsible for checking if the current transaction is 'an advance/early payment' based on the + * details passed through. * - * Default implementation is check transaction date is before installment - * due date. + * Default implementation is check transaction date is before installment due date. */ protected boolean isTransactionInAdvanceOfInstallment(final int currentInstallmentIndex, final List installments, final LocalDate transactionDate, @@ -480,8 +476,7 @@ public abstract class AbstractLoanRepaymentScheduleTransactionProcessor implemen /** * Invoked when a transaction results in an over-payment of the full loan. * - * transaction amount is greater than the total expected principal and - * interest of the loan. + * transaction amount is greater than the total expected principal and interest of the loan. */ @SuppressWarnings("unused") protected void onLoanOverpayment(final LoanTransaction loanTransaction, final Money loanOverPaymentAmount) { @@ -559,11 +554,9 @@ public abstract class AbstractLoanRepaymentScheduleTransactionProcessor implemen } /** - * Invoked when a there is a refund of an active loan or undo of an active - * loan + * Invoked when a there is a refund of an active loan or undo of an active loan * - * Undoes principal, interest, fees and charges of this transaction based on - * the repayment strategy + * Undoes principal, interest, fees and charges of this transaction based on the repayment strategy * * @param transactionMappings * TODO diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/LoanRepaymentScheduleTransactionProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/LoanRepaymentScheduleTransactionProcessor.java index 015f3e7da..21df78a24 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/LoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/LoanRepaymentScheduleTransactionProcessor.java @@ -43,8 +43,7 @@ public interface LoanRepaymentScheduleTransactionProcessor { List installments); /** - * Used in interest recalculation to introduce new interest only - * installment. + * Used in interest recalculation to introduce new interest only installment. */ boolean isInterestFirstRepaymentScheduleTransactionProcessor(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/CreocoreLoanRepaymentScheduleTransactionProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/CreocoreLoanRepaymentScheduleTransactionProcessor.java index a1f36decf..11eb456e8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/CreocoreLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/CreocoreLoanRepaymentScheduleTransactionProcessor.java @@ -31,21 +31,17 @@ import org.joda.time.LocalDate; /** * Creocore style {@link LoanRepaymentScheduleTransactionProcessor}. * - * For standard transactions, pays off components in order of interest, then - * principal. + * For standard transactions, pays off components in order of interest, then principal. * - * If a transaction results in an advance payment or over-payment for a given - * installment, the over paid amount is pay off on the principal component of - * subsequent installments. + * If a transaction results in an advance payment or over-payment for a given installment, the over paid amount is pay + * off on the principal component of subsequent installments. * - * If the entire principal of an installment is paid in advance then the - * interest component is waived. + * If the entire principal of an installment is paid in advance then the interest component is waived. */ public class CreocoreLoanRepaymentScheduleTransactionProcessor extends AbstractLoanRepaymentScheduleTransactionProcessor { /** - * For creocore, early is defined as any date before the installment due - * date + * For creocore, early is defined as any date before the installment due date */ @SuppressWarnings("unused") @Override @@ -58,8 +54,7 @@ public class CreocoreLoanRepaymentScheduleTransactionProcessor extends AbstractL } /** - * For early/'in advance' repayments, pay off in the same way as on-time - * payments, interest first then principal. + * For early/'in advance' repayments, pay off in the same way as on-time payments, interest first then principal. */ @SuppressWarnings("unused") @Override @@ -73,8 +68,7 @@ public class CreocoreLoanRepaymentScheduleTransactionProcessor extends AbstractL } /** - * For late repayments, pay off in the same way as on-time payments, - * interest first then principal. + * For late repayments, pay off in the same way as on-time payments, interest first then principal. */ @SuppressWarnings("unused") @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/EarlyPaymentLoanRepaymentScheduleTransactionProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/EarlyPaymentLoanRepaymentScheduleTransactionProcessor.java index d412ad441..b5f728676 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/EarlyPaymentLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/EarlyPaymentLoanRepaymentScheduleTransactionProcessor.java @@ -29,14 +29,14 @@ import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.Loa import org.joda.time.LocalDate; /** - * This {@link LoanRepaymentScheduleTransactionProcessor} defaults to having the - * payment order of Interest first, then principal, penalties and fees. + * This {@link LoanRepaymentScheduleTransactionProcessor} defaults to having the payment order of Interest first, then + * principal, penalties and fees. */ public class EarlyPaymentLoanRepaymentScheduleTransactionProcessor extends AbstractLoanRepaymentScheduleTransactionProcessor { /** - * For early/'in advance' repayments, pay off in the same way as on-time - * payments, interest first, principal, penalties and charges. + * For early/'in advance' repayments, pay off in the same way as on-time payments, interest first, principal, + * penalties and charges. */ @SuppressWarnings("unused") @Override @@ -92,8 +92,7 @@ public class EarlyPaymentLoanRepaymentScheduleTransactionProcessor extends Abstr } /** - * For late repayments, pay off in the same way as on-time payments, - * interest first then principal. + * For late repayments, pay off in the same way as on-time payments, interest first then principal. */ @SuppressWarnings("unused") @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/FineractStyleLoanRepaymentScheduleTransactionProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/FineractStyleLoanRepaymentScheduleTransactionProcessor.java index b28621715..9ef2dac55 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/FineractStyleLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/FineractStyleLoanRepaymentScheduleTransactionProcessor.java @@ -31,13 +31,11 @@ import org.joda.time.LocalDate; /** * Old style {@link LoanRepaymentScheduleTransactionProcessor}. * - * For ALL types of transactions, pays off components in order of interest, then - * principal. + * For ALL types of transactions, pays off components in order of interest, then principal. * - * Other formulas exist on fineract where you can choose 'Declining-Balance - * Interest Recalculation' which simply means, recalculate the interest - * component based on the how much principal is outstanding at a point in time; - * but this isnt trying to model that option only the basic one for now. + * Other formulas exist on fineract where you can choose 'Declining-Balance Interest Recalculation' which simply means, + * recalculate the interest component based on the how much principal is outstanding at a point in time; but this isnt + * trying to model that option only the basic one for now. */ @SuppressWarnings("unused") public class FineractStyleLoanRepaymentScheduleTransactionProcessor extends AbstractLoanRepaymentScheduleTransactionProcessor { @@ -52,8 +50,7 @@ public class FineractStyleLoanRepaymentScheduleTransactionProcessor extends Abst } /** - * For early/'in advance' repayments, pay off in the same way as on-time - * payments, interest first then principal. + * For early/'in advance' repayments, pay off in the same way as on-time payments, interest first then principal. */ @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, @@ -66,8 +63,7 @@ public class FineractStyleLoanRepaymentScheduleTransactionProcessor extends Abst } /** - * For late repayments, pay off in the same way as on-time payments, - * interest first then principal. + * For late repayments, pay off in the same way as on-time payments, interest first then principal. */ @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/HeavensFamilyLoanRepaymentScheduleTransactionProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/HeavensFamilyLoanRepaymentScheduleTransactionProcessor.java index 3750b9928..2711dbd61 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/HeavensFamilyLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/HeavensFamilyLoanRepaymentScheduleTransactionProcessor.java @@ -31,22 +31,18 @@ import org.joda.time.LocalDate; /** * Heavensfamily style {@link LoanRepaymentScheduleTransactionProcessor}. * - * For standard transactions, pays off components in order of interest, then - * principal. + * For standard transactions, pays off components in order of interest, then principal. * - * If a transaction results in an advance payment or overpayment for a given - * installment, the over paid amount is pay off on the principal component of - * subsequent installments. + * If a transaction results in an advance payment or overpayment for a given installment, the over paid amount is pay + * off on the principal component of subsequent installments. * - * If the entire principal of an installment is paid in advance then the - * interest component is waived. + * If the entire principal of an installment is paid in advance then the interest component is waived. */ @SuppressWarnings("unused") public class HeavensFamilyLoanRepaymentScheduleTransactionProcessor extends AbstractLoanRepaymentScheduleTransactionProcessor { /** - * For late repayments, pay off in the same way as on-time payments, - * interest first then principal. + * For late repayments, pay off in the same way as on-time payments, interest first then principal. */ @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java index 6e5a8592d..87bb81f3d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java @@ -29,15 +29,15 @@ import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.Loa import org.joda.time.LocalDate; /** - * This {@link LoanRepaymentScheduleTransactionProcessor} defaults to having the - * payment order of Interest first, then principal, penalties and fees. + * This {@link LoanRepaymentScheduleTransactionProcessor} defaults to having the payment order of Interest first, then + * principal, penalties and fees. */ public class InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor extends AbstractLoanRepaymentScheduleTransactionProcessor { /** - * For early/'in advance' repayments, pay off in the same way as on-time - * payments, interest first, principal, penalties and charges. + * For early/'in advance' repayments, pay off in the same way as on-time payments, interest first, principal, + * penalties and charges. */ @SuppressWarnings("unused") @Override @@ -51,8 +51,7 @@ public class InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionPr } /** - * For late repayments, pay off in the same way as on-time payments, - * interest first then principal. + * For late repayments, pay off in the same way as on-time payments, interest first then principal. */ @SuppressWarnings("unused") @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java index a86b87529..6906084ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java @@ -29,15 +29,15 @@ import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.Loa import org.joda.time.LocalDate; /** - * This {@link LoanRepaymentScheduleTransactionProcessor} defaults to having the - * payment order of principal first, then interest, penalties and fees. + * This {@link LoanRepaymentScheduleTransactionProcessor} defaults to having the payment order of principal first, then + * interest, penalties and fees. */ public class PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor extends AbstractLoanRepaymentScheduleTransactionProcessor { /** - * For early/'in advance' repayments, pay off in the same way as on-time - * payments, interest first, principal, penalties and charges. + * For early/'in advance' repayments, pay off in the same way as on-time payments, interest first, principal, + * penalties and charges. */ @SuppressWarnings("unused") @Override @@ -51,8 +51,7 @@ public class PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionPr } /** - * For late repayments, pay off in the same way as on-time payments, - * interest first then principal. + * For late repayments, pay off in the same way as on-time payments, interest first then principal. */ @SuppressWarnings("unused") @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/RBILoanRepaymentScheduleTransactionProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/RBILoanRepaymentScheduleTransactionProcessor.java index 00b153a13..0078ef71d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/RBILoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/RBILoanRepaymentScheduleTransactionProcessor.java @@ -33,20 +33,18 @@ import org.joda.time.LocalDate; * * From https://mifosforge.jira.com/browse/MIFOS-5636: * - * Per RBI regulations, all interest must be paid (both current and overdue) - * before principal is paid. + * Per RBI regulations, all interest must be paid (both current and overdue) before principal is paid. * - * For example on a loan with two installments due (one current and one overdue) - * of 220 each (200 principal + 20 interest): + * For example on a loan with two installments due (one current and one overdue) of 220 each (200 principal + 20 + * interest): * - * Partial Payment of 40 20 Payment to interest on Installment #1 (200 principal - * remaining) 20 Payment to interest on Installment #2 (200 principal remaining) + * Partial Payment of 40 20 Payment to interest on Installment #1 (200 principal remaining) 20 Payment to interest on + * Installment #2 (200 principal remaining) */ public class RBILoanRepaymentScheduleTransactionProcessor extends AbstractLoanRepaymentScheduleTransactionProcessor { /** - * For creocore, early is defined as any date before the installment due - * date + * For creocore, early is defined as any date before the installment due date */ @SuppressWarnings("unused") @Override @@ -73,8 +71,7 @@ public class RBILoanRepaymentScheduleTransactionProcessor extends AbstractLoanRe } /** - * For late repayments, pay off in the same way as on-time payments, - * interest first then principal. + * For late repayments, pay off in the same way as on-time payments, interest first then principal. */ @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/DateMismatchException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/DateMismatchException.java index 31e34b347..6c489a605 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/DateMismatchException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/DateMismatchException.java @@ -22,8 +22,8 @@ import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainR import org.joda.time.LocalDate; /** - * {@link AbstractPlatformDomainRuleException} thrown when actual disbursement - * date does not match with expected disbursement date + * {@link AbstractPlatformDomainRuleException} thrown when actual disbursement date does not match with expected + * disbursement date * */ public class DateMismatchException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanStateTransitionException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanStateTransitionException.java index 71ab58430..ef85d50fd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanStateTransitionException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanStateTransitionException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.loanaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown an action to transition a - * loan from one state to another violates a domain rule. + * {@link AbstractPlatformDomainRuleException} thrown an action to transition a loan from one state to another violates + * a domain rule. */ public class InvalidLoanStateTransitionException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTransactionTypeException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTransactionTypeException.java index 4f629f8a0..8b8342295 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTransactionTypeException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTransactionTypeException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.loanaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown an action to transition a - * loan from one state to another violates a domain rule. + * {@link AbstractPlatformDomainRuleException} thrown an action to transition a loan from one state to another violates + * a domain rule. */ public class InvalidLoanTransactionTypeException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTypeException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTypeException.java index ba0989856..94e063a49 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTypeException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTypeException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.loanaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown an action to transition a - * loan from one state to another violates a domain rule. + * {@link AbstractPlatformDomainRuleException} thrown an action to transition a loan from one state to another violates + * a domain rule. */ public class InvalidLoanTypeException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidPaidInAdvanceAmountException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidPaidInAdvanceAmountException.java index 090c62000..d46339e90 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidPaidInAdvanceAmountException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidPaidInAdvanceAmountException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.loanaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown an action to transition a - * loan from one state to another violates a domain rule. + * {@link AbstractPlatformDomainRuleException} thrown an action to transition a loan from one state to another violates + * a domain rule. */ public class InvalidPaidInAdvanceAmountException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeDeleted.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeDeleted.java index ed7d734e1..751d2e8e2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeDeleted.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeDeleted.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when trying to delete a - * loan in an invalid state. + * {@link AbstractPlatformDomainRuleException} thrown when trying to delete a loan in an invalid state. */ public class LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeDeleted extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified.java index 721be7931..0f3fd367d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when trying to modify a - * loan in an invalid state. + * {@link AbstractPlatformDomainRuleException} thrown when trying to modify a loan in an invalid state. */ public class LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTemplateTypeRequiredException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTemplateTypeRequiredException.java index 8819c3142..b151a8cc7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTemplateTypeRequiredException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTemplateTypeRequiredException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when not supported loan - * template type is sent. + * {@link AbstractPlatformDomainRuleException} thrown when not supported loan template type is sent. */ public class LoanTemplateTypeRequiredException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingStrategyNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingStrategyNotFoundException.java index c33889c9d..c445d7ffa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingStrategyNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingStrategyNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when loan transactions processing strategy - * resources are not found. + * A {@link RuntimeException} thrown when loan transactions processing strategy resources are not found. */ public class LoanTransactionProcessingStrategyNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MinDaysBetweenDisbursalAndFirstRepaymentViolationException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MinDaysBetweenDisbursalAndFirstRepaymentViolationException.java index e08ac5433..b9a183e52 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MinDaysBetweenDisbursalAndFirstRepaymentViolationException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MinDaysBetweenDisbursalAndFirstRepaymentViolationException.java @@ -22,9 +22,8 @@ import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainR import org.joda.time.LocalDate; /** - * {@link AbstractPlatformDomainRuleException} thrown when a number of days - * between disbursal date and firstRepayment is less than - * minimumDaysBetweenDisbursalAndFirstRepayment + * {@link AbstractPlatformDomainRuleException} thrown when a number of days between disbursal date and firstRepayment is + * less than minimumDaysBetweenDisbursalAndFirstRepayment * */ public class MinDaysBetweenDisbursalAndFirstRepaymentViolationException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/NotSupportedLoanTemplateTypeException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/NotSupportedLoanTemplateTypeException.java index 0248609da..7b1371eaf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/NotSupportedLoanTemplateTypeException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/NotSupportedLoanTemplateTypeException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when not supported loan - * template type is sent. + * {@link AbstractPlatformDomainRuleException} thrown when not supported loan template type is sent. */ public class NotSupportedLoanTemplateTypeException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/InvalidGuarantorException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/InvalidGuarantorException.java index 894784b70..7c7ec9580 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/InvalidGuarantorException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/InvalidGuarantorException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanaccount.guarantor.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when a Client is set as a - * guarantor for his/her own loans + * {@link AbstractPlatformDomainRuleException} thrown when a Client is set as a guarantor for his/her own loans */ public class InvalidGuarantorException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/serialization/GuarantorCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/serialization/GuarantorCommandFromApiJsonDeserializer.java index 4a1ce12f2..cd0bbff06 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/serialization/GuarantorCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/serialization/GuarantorCommandFromApiJsonDeserializer.java @@ -37,8 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link GuarantorCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link GuarantorCommand}'s. */ @Component public final class GuarantorCommandFromApiJsonDeserializer extends AbstractFromApiJsonDeserializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java index c7957c122..e758072e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java @@ -164,8 +164,7 @@ public class GuarantorDomainServiceImpl implements GuarantorDomainService { } /** - * Method assigns a guarantor to loan and blocks the funds on guarantor's - * account + * Method assigns a guarantor to loan and blocks the funds on guarantor's account */ @Override public void assignGuarantor(final GuarantorFundingDetails guarantorFundingDetails, final LocalDate transactionDate) { @@ -190,8 +189,7 @@ public class GuarantorDomainServiceImpl implements GuarantorDomainService { } /** - * Method releases(withdraw) a guarantor from loan and unblocks the funds on - * guarantor's account + * Method releases(withdraw) a guarantor from loan and unblocks the funds on guarantor's account */ @Override public void releaseGuarantor(final GuarantorFundingDetails guarantorFundingDetails, final LocalDate transactionDate) { @@ -213,9 +211,8 @@ public class GuarantorDomainServiceImpl implements GuarantorDomainService { } /** - * Method is to recover funds from guarantor's in case loan is unpaid. - * (Transfers guarantee amount from guarantor's account to loan account and - * releases guarantor) + * Method is to recover funds from guarantor's in case loan is unpaid. (Transfers guarantee amount from guarantor's + * account to loan account and releases guarantor) */ @Override public void transaferFundsFromGuarantor(final Loan loan) { @@ -292,8 +289,8 @@ public class GuarantorDomainServiceImpl implements GuarantorDomainService { } /** - * Method reverses all blocked fund(both hold and release) transactions. - * example: reverses all transactions on undo approval of loan account. + * Method reverses all blocked fund(both hold and release) transactions. example: reverses all transactions on undo + * approval of loan account. * */ private void reverseAllFundTransaction(final Loan loan) { @@ -317,8 +314,8 @@ public class GuarantorDomainServiceImpl implements GuarantorDomainService { } /** - * Method holds all guarantor's guarantee amount for a loan account. - * example: hold funds on approval of loan account. + * Method holds all guarantor's guarantee amount for a loan account. example: hold funds on approval of loan + * account. * */ private void holdGuarantorFunds(final Loan loan) { @@ -377,10 +374,9 @@ public class GuarantorDomainServiceImpl implements GuarantorDomainService { } /** - * Method releases all guarantor's guarantee amount(first external guarantee - * and then self guarantee) for a loan account in the portion of guarantee - * percentage on a paid principal. example: releases funds on repayments of - * loan account. + * Method releases all guarantor's guarantee amount(first external guarantee and then self guarantee) for a loan + * account in the portion of guarantee percentage on a paid principal. example: releases funds on repayments of loan + * account. * */ private void releaseGuarantorFunds(final LoanTransaction loanTransaction) { @@ -432,8 +428,7 @@ public class GuarantorDomainServiceImpl implements GuarantorDomainService { } /** - * Method releases all guarantor's guarantee amount. example: releases funds - * on write-off of a loan account. + * Method releases all guarantor's guarantee amount. example: releases funds on write-off of a loan account. * */ private void releaseAllGuarantors(final LoanTransaction loanTransaction) { @@ -471,9 +466,8 @@ public class GuarantorDomainServiceImpl implements GuarantorDomainService { } /** - * Method releases guarantor's guarantee amount on transferring guarantee - * amount to loan account. example: on recovery of guarantee funds from - * guarantor's. + * Method releases guarantor's guarantee amount on transferring guarantee amount to loan account. example: on + * recovery of guarantee funds from guarantor's. */ private void completeGuarantorFund(final LoanTransaction loanTransaction) { Loan loan = loanTransaction.getLoan(); @@ -516,8 +510,7 @@ public class GuarantorDomainServiceImpl implements GuarantorDomainService { } /** - * Method reverses the fund release transactions in case of loan transaction - * reversed + * Method reverses the fund release transactions in case of loan transaction reversed */ private void reverseTransaction(final List loanTransactionIds) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformService.java index 28f2f3faa..054d3bc4b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformService.java @@ -33,8 +33,7 @@ public interface GuarantorReadPlatformService { List retrieveGuarantorsForValidLoan(Long loanId); /** - * Methods Returns all Guarantors for a Given loan Id (if the loan Id is - * valid and Exists) + * Methods Returns all Guarantors for a Given loan Id (if the loan Id is valid and Exists) * * @param loanId * @return diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleData.java index 86c7b050e..da1d8907c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleData.java @@ -26,10 +26,9 @@ import org.apache.fineract.organisation.monetary.data.CurrencyData; * Immutable data object to represent aspects of a loan schedule such as: * *
        - *
      • Totals information - the totals for each part of repayment schedule - * monitored.
      • - *
      • Repayment schedule - the principal due, outstanding balance and cost of - * loan items such as interest and charges (both fees and penalties)
      • + *
      • Totals information - the totals for each part of repayment schedule monitored.
      • + *
      • Repayment schedule - the principal due, outstanding balance and cost of loan items such as interest and charges + * (both fees and penalties)
      • *
      */ @SuppressWarnings("unused") @@ -55,9 +54,8 @@ public class LoanScheduleData { private final BigDecimal totalOutstanding; /** - * periods is collection of data objects containing specific - * information to each period of the loan schedule including disbursement - * and repayment information. + * periods is collection of data objects containing specific information to each period of the loan + * schedule including disbursement and repayment information. */ private final Collection periods; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java index 5463f8daf..a8ba9b348 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java @@ -134,8 +134,7 @@ public final class LoanSchedulePeriodData { } /* - * constructor used for creating period on loan schedule that is only a - * disbursement (typically first period) + * constructor used for creating period on loan schedule that is only a disbursement (typically first period) */ private LoanSchedulePeriodData(final Integer periodNumber, final LocalDate fromDate, final LocalDate dueDate, final BigDecimal principalDisbursed, final BigDecimal chargesDueAtTimeOfDisbursement, final boolean isDisbursed) { @@ -201,8 +200,7 @@ public final class LoanSchedulePeriodData { } /* - * used for repayment only period when creating an empty loan schedule for - * preview etc + * used for repayment only period when creating an empty loan schedule for preview etc */ private LoanSchedulePeriodData(final Integer periodNumber, final LocalDate fromDate, final LocalDate dueDate, final BigDecimal principalOriginalDue, final BigDecimal principalOutstanding, @@ -264,8 +262,8 @@ public final class LoanSchedulePeriodData { } /* - * Used for creating loan schedule periods with full information on expected - * principal, interest & charges along with what portion of each is paid. + * Used for creating loan schedule periods with full information on expected principal, interest & charges along + * with what portion of each is paid. */ private LoanSchedulePeriodData(final Integer periodNumber, final LocalDate fromDate, final LocalDate dueDate, final LocalDate obligationsMetOnDate, final boolean complete, final BigDecimal principalOriginalDue, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java index c2edf6ff3..5457357a2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java @@ -1248,8 +1248,7 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener } /** - * this method calculates the principal amount for generating the repayment - * schedule. + * this method calculates the principal amount for generating the repayment schedule. */ private Money getPrincipalToBeScheduled(final LoanApplicationTerms loanApplicationTerms) { Money principalToBeScheduled; @@ -1298,9 +1297,8 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener } /** - * Method calculates interest on not paid outstanding principal and interest - * (if compounding is enabled) till current date and adds new repayment - * schedule detail + * Method calculates interest on not paid outstanding principal and interest (if compounding is enabled) till + * current date and adds new repayment schedule detail * * @param compoundingMap * TODO @@ -1522,8 +1520,7 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener } /** - * Identifies all the past date principal changes and apply them on - * outstanding balance for future calculations + * Identifies all the past date principal changes and apply them on outstanding balance for future calculations */ private Money updateBalanceForInterestCalculation(final Map principalPortionMap, final LocalDate scheduledDueDate, final Money outstandingBalanceAsPerRest, boolean addMapDetails) { @@ -1591,9 +1588,8 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener } /** - * this Method updates late/ not paid installment components to Map with - * effective date as per REST(for principal portion ) and compounding - * (interest or fee or interest and fee portions) frequency + * this Method updates late/ not paid installment components to Map with effective date as per REST(for principal + * portion ) and compounding (interest or fee or interest and fee portions) frequency * */ private void updateLatePaymentsToMap(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, @@ -1802,8 +1798,7 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener } /** - * This Method updates principal paid component to map with effective date - * as per the REST + * This Method updates principal paid component to map with effective date as per the REST * */ private void updatePrincipalPaidPortionToMap(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, @@ -1819,9 +1814,8 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener } /** - * merges all the applicable amounts(compounding dates, disbursements, late - * payment compounding and principal change as per rest) changes to single - * map for interest calculation + * merges all the applicable amounts(compounding dates, disbursements, late payment compounding and principal change + * as per rest) changes to single map for interest calculation * */ private TreeMap mergeVariationsToMap(final LoanScheduleParams params) { @@ -2049,8 +2043,7 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener } /** - * Method preprocess the installments and transactions and sets the required - * fields to generate the schedule + * Method preprocess the installments and transactions and sets the required fields to generate the schedule */ @Override public LoanScheduleDTO rescheduleNextInstallments(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, Loan loan, @@ -2395,8 +2388,7 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener } /** - * Method identifies the early paid amounts for a installment and update the - * principal map for further calculations + * Method identifies the early paid amounts for a installment and update the principal map for further calculations */ private Money updateEarlyPaidAmountsToMap(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, @@ -2493,8 +2485,7 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener } /** - * Method identifies early paid amount and applies the early payment - * strategy + * Method identifies early paid amount and applies the early payment strategy */ private Money fetchEarlyPaidAmount(final Money principalPortion, final Money principalPortionCalculated, final Money reducePrincipal, final LoanApplicationTerms applicationTerms, final Money totalCumulativePrincipal, int periodNumber, final MathContext mc) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DecliningBalanceInterestLoanScheduleGenerator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DecliningBalanceInterestLoanScheduleGenerator.java index 740517079..2af9487a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DecliningBalanceInterestLoanScheduleGenerator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DecliningBalanceInterestLoanScheduleGenerator.java @@ -32,8 +32,7 @@ import org.joda.time.LocalDate; /** *

      - * Declining balance can be amortized (see {@link AmortizationMethod}) in two - * ways at present: + * Declining balance can be amortized (see {@link AmortizationMethod}) in two ways at present: *

        *
      1. Equal principal payments
      2. *
      3. Equal installment payments
      4. @@ -42,18 +41,16 @@ import org.joda.time.LocalDate; *

        * *

        - * When amortized using equal principal payments, the principal - * component of each installment is fixed and interest due is - * calculated from the outstanding principal balance resulting in a - * different total payment due for each installment. + * When amortized using equal principal payments, the principal component of each installment is fixed and + * interest due is calculated from the outstanding principal balance resulting in a different total + * payment due for each installment. *

        * *

        - * When amortized using equal installments, the total payment due - * for each installment is fixed and is calculated using the excel like - * pmt function. The interest due is calculated from the - * outstanding principal balance which results in a principal - * component that is total payment due minus interest due. + * When amortized using equal installments, the total payment due for each installment is fixed and is + * calculated using the excel like pmt function. The interest due is calculated from the + * outstanding principal balance which results in a principal component that is total payment due + * minus interest due. *

        */ public class DecliningBalanceInterestLoanScheduleGenerator extends AbstractLoanScheduleGenerator { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java index 01a70da38..1440ba0af 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java @@ -115,9 +115,8 @@ public class DefaultScheduledDateGenerator implements ScheduledDateGenerator { } /** - * Recursively checking non working days and holidays and working days - * exemption to generate next repayment period date Base on the - * configuration + * Recursively checking non working days and holidays and working days exemption to generate next repayment period + * date Base on the configuration * * @param adjustedDateDetailsDTO * @param loanApplicationTerms @@ -138,8 +137,8 @@ public class DefaultScheduledDateGenerator implements ScheduledDateGenerator { isFirstRepayment); /** - * Check Changed Schedule Date is holiday or is not a working day Then - * re-call this method to get the non holiday and working day + * Check Changed Schedule Date is holiday or is not a working day Then re-call this method to get the non + * holiday and working day */ if ((holidayDetailDTO.isHolidayEnabled() && HolidayUtil.getApplicableHoliday(adjustedDateDetailsDTO.getChangedScheduleDate(), holidayDetailDTO.getHolidays()) != null) @@ -151,8 +150,7 @@ public class DefaultScheduledDateGenerator implements ScheduledDateGenerator { } /** - * This method to check and update the working day if repayment date is - * holiday + * This method to check and update the working day if repayment date is holiday * * @param adjustedDateDetailsDTO * @param holidayDetailDTO @@ -183,8 +181,7 @@ public class DefaultScheduledDateGenerator implements ScheduledDateGenerator { } /** - * This method to check and update the working day if repayment date is non - * working day + * This method to check and update the working day if repayment date is non working day * * @param adjustedDateDetailsDTO * @param holidayDetailDTO diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FinanicalFunctions.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FinanicalFunctions.java index 9666ff639..54c2cd2cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FinanicalFunctions.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FinanicalFunctions.java @@ -21,15 +21,13 @@ package org.apache.fineract.portfolio.loanaccount.loanschedule.domain; public class FinanicalFunctions { /** - * PMT calculates a fixed monthly payment to be paid by borrower every - * 'period' to ensure loan is paid off in full (with interest). + * PMT calculates a fixed monthly payment to be paid by borrower every 'period' to ensure loan is paid off in full + * (with interest). * - * This monthly payment c depends upon the monthly interest rate r - * (expressed as a fraction, not a percentage, i.e., divide the quoted - * yearly percentage rate by 100 and by 12 to obtain the monthly interest - * rate), the number of monthly payments N called the loan's term, and the - * amount borrowed P known as the loan's principal; c is given by the - * formula: + * This monthly payment c depends upon the monthly interest rate r (expressed as a fraction, not a percentage, i.e., + * divide the quoted yearly percentage rate by 100 and by 12 to obtain the monthly interest rate), the number of + * monthly payments N called the loan's term, and the amount borrowed P known as the loan's principal; c is given by + * the formula: * * c = (r / (1 - (1 + r)^-N))P * diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FlatInterestLoanScheduleGenerator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FlatInterestLoanScheduleGenerator.java index f71fe8922..98b8c7e5b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FlatInterestLoanScheduleGenerator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FlatInterestLoanScheduleGenerator.java @@ -57,12 +57,10 @@ public class FlatInterestLoanScheduleGenerator extends AbstractLoanScheduleGener // totalCumulativeInterest from partial schedule generation for multi // rescheduling /* - * if (loanApplicationTerms.getPartialTotalCumulativeInterest() != null - * && loanApplicationTerms.getTotalInterestDue() != null) { - * totalInterestDueForLoan = loanApplicationTerms.getTotalInterestDue(); - * totalInterestDueForLoan = - * totalInterestDueForLoan.plus(loanApplicationTerms. - * getPartialTotalCumulativeInterest()); } + * if (loanApplicationTerms.getPartialTotalCumulativeInterest() != null && + * loanApplicationTerms.getTotalInterestDue() != null) { totalInterestDueForLoan = + * loanApplicationTerms.getTotalInterestDue(); totalInterestDueForLoan = + * totalInterestDueForLoan.plus(loanApplicationTerms. getPartialTotalCumulativeInterest()); } */ interestForThisInstallment = loanApplicationTerms.adjustInterestIfLastRepaymentPeriod(interestForThisInstallment, totalCumulativeInterestToDate, totalInterestDueForLoan, periodNumber); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java index 3c7663ffa..7bf3d1dad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java @@ -86,30 +86,26 @@ public final class LoanApplicationTerms { private final LocalDate repaymentsStartingFromDate; private final LocalDate calculatedRepaymentsStartingFromDate; /** - * Integer representing the number of 'repayment frequencies' or - * installments where 'grace' should apply to the principal component of a - * loans repayment period (installment). + * Integer representing the number of 'repayment frequencies' or installments where 'grace' should apply to the + * principal component of a loans repayment period (installment). */ private Integer principalGrace; private Integer recurringMoratoriumOnPrincipalPeriods; /** - * Integer representing the number of 'repayment frequencies' or - * installments where 'grace' should apply to the payment of interest in a - * loans repayment period (installment). + * Integer representing the number of 'repayment frequencies' or installments where 'grace' should apply to the + * payment of interest in a loans repayment period (installment). * - * Note: Interest is still calculated taking into account the full - * loan term, the interest is simply offset to a later period. + * Note: Interest is still calculated taking into account the full loan term, the interest is simply offset + * to a later period. */ private Integer interestPaymentGrace; /** - * Integer representing the number of 'repayment frequencies' or - * installments where 'grace' should apply to the charging of interest in a - * loans repayment period (installment). + * Integer representing the number of 'repayment frequencies' or installments where 'grace' should apply to the + * charging of interest in a loans repayment period (installment). * - * Note: The loan is interest-free for the period of time - * indicated. + * Note: The loan is interest-free for the period of time indicated. */ private final Integer interestChargingGrace; @@ -117,13 +113,11 @@ public final class LoanApplicationTerms { * Legacy method of support 'grace' on the charging of interest on a loan. * *

        - * For the typical structured loan, its reasonable to use an integer to - * indicate the number of 'repayment frequency' periods the 'grace' should - * apply to but for slightly irregular loans where the period between - * disbursement and the date of the 'first repayment period' isnt doest - * match the 'repayment frequency' but can be less (15days instead of 1 - * month) or more (6 weeks instead of 1 month) - The idea was to use a date - * to indicate from whence interest should be charged. + * For the typical structured loan, its reasonable to use an integer to indicate the number of 'repayment frequency' + * periods the 'grace' should apply to but for slightly irregular loans where the period between disbursement + * and the date of the 'first repayment period' isnt doest match the 'repayment frequency' but can be less (15days + * instead of 1 month) or more (6 weeks instead of 1 month) - The idea was to use a date to indicate from whence + * interest should be charged. *

        */ private LocalDate interestChargedFromDate; @@ -565,8 +559,7 @@ public final class LoanApplicationTerms { } /** - * Calculates the total interest to be charged on loan taking into account - * grace settings. + * Calculates the total interest to be charged on loan taking into account grace settings. * */ public Money calculateTotalInterestCharged(final PaymentPeriodsInOneYearCalculator calculator, final MathContext mc) { @@ -732,8 +725,7 @@ public final class LoanApplicationTerms { } /** - * general method to calculate totalInterestDue discounting any grace - * settings + * general method to calculate totalInterestDue discounting any grace settings */ private Money calculateTotalFlatInterestDueWithoutGrace(final PaymentPeriodsInOneYearCalculator calculator, final MathContext mc) { @@ -937,11 +929,9 @@ public final class LoanApplicationTerms { } /* - * calculates the interest that should be due for a given scheduled loan - * repayment period. It takes into account GRACE periods and calculates how - * much interest is due per period by averaging the number of periods where - * interest is due and should be paid against the total known interest that - * is due without grace. + * calculates the interest that should be due for a given scheduled loan repayment period. It takes into account + * GRACE periods and calculates how much interest is due per period by averaging the number of periods where + * interest is due and should be paid against the total known interest that is due without grace. */ private Money calculateTotalFlatInterestForInstallmentAveragingOutGracePeriods(final PaymentPeriodsInOneYearCalculator calculator, final int periodNumber, final MathContext mc) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelDisbursementPeriod.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelDisbursementPeriod.java index c1eb9fa90..68731b429 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelDisbursementPeriod.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelDisbursementPeriod.java @@ -26,8 +26,7 @@ import org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanScheduleP import org.joda.time.LocalDate; /** - * Domain representation of a Loan Schedule Disbursement Period (not used for - * persistence) + * Domain representation of a Loan Schedule Disbursement Period (not used for persistence) */ public final class LoanScheduleModelDisbursementPeriod implements LoanScheduleModelPeriod { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelRepaymentPeriod.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelRepaymentPeriod.java index 138a41f9e..3cb035f6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelRepaymentPeriod.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelRepaymentPeriod.java @@ -27,8 +27,7 @@ import org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanScheduleP import org.joda.time.LocalDate; /** - * Domain representation of a Loan Schedule Repayment Period (not used for - * persistence) + * Domain representation of a Loan Schedule Repayment Period (not used for persistence) */ public final class LoanScheduleModelRepaymentPeriod implements LoanScheduleModelPeriod { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java index 5a80d925c..ebfd5048a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java @@ -245,10 +245,9 @@ public class LoanScheduleAssembler { final AccountType loanType = AccountType.fromName(loanTypeStr); /* - * If it is JLG loan/Group Loan then make sure loan frequency is same as - * Group/Center meeting frequency or multiple of it. TODO: Check should - * be either same frequency or loan freq is multiple of center/group - * meeting freq multiples + * If it is JLG loan/Group Loan then make sure loan frequency is same as Group/Center meeting frequency or + * multiple of it. TODO: Check should be either same frequency or loan freq is multiple of center/group meeting + * freq multiples */ if ((loanType.isJLGAccount() || loanType.isGroupAccount()) && calendarId != null) { calendar = this.calendarRepository.findById(calendarId).orElseThrow(() -> new CalendarNotFoundException(calendarId)); @@ -267,8 +266,7 @@ public class LoanScheduleAssembler { } /* - * If user has not passed the first repayments date then then derive the - * same based on loan type. + * If user has not passed the first repayments date then then derive the same based on loan type. */ if (calculatedRepaymentsStartingFromDate == null) { calculatedRepaymentsStartingFromDate = deriveFirstRepaymentDate(loanType, repaymentEvery, expectedDisbursementDate, @@ -276,8 +274,7 @@ public class LoanScheduleAssembler { } /* - * If it is JLG loan/Group Loan synched with a meeting, then make sure - * first repayment falls on meeting date + * If it is JLG loan/Group Loan synched with a meeting, then make sure first repayment falls on meeting date */ final Long groupId = this.fromApiJsonHelper.extractLongNamed("groupId", element); Group group = null; @@ -299,8 +296,7 @@ public class LoanScheduleAssembler { numberOfDays); /* - * If disbursement is synced on meeting, make sure disbursement date - * is on a meeting date + * If disbursement is synced on meeting, make sure disbursement date is on a meeting date */ if (synchDisbursement != null && synchDisbursement.booleanValue()) { validateDisbursementDateWithMeetingDates(expectedDisbursementDate, calendar, isSkipMeetingOnFirstDay, numberOfDays); @@ -696,11 +692,9 @@ public class LoanScheduleAssembler { // Collections.sort(variations, new LoanTermVariationsComparator()); /* - * List loanTermVariationsDatas = new - * ArrayList<>(); loanTermVariationsDatas.addAll(loanApplicationTerms. - * getLoanTermVariations ().getExceptionData()); loanApplicationTerms = - * LoanApplicationTerms.assembleFrom(loanApplicationTerms, - * loanTermVariationsDatas); + * List loanTermVariationsDatas = new ArrayList<>(); + * loanTermVariationsDatas.addAll(loanApplicationTerms. getLoanTermVariations ().getExceptionData()); + * loanApplicationTerms = LoanApplicationTerms.assembleFrom(loanApplicationTerms, loanTermVariationsDatas); */ // date validations diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java index ffdc200d6..bf2d04fda 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java @@ -101,8 +101,7 @@ public class LoanScheduleCalculationPlatformServiceImpl implements LoanScheduleC public LoanScheduleModel calculateLoanSchedule(final JsonQuery query, Boolean validateParams) { /*** - * TODO: Vishwas, this is probably not required, test and remove the - * same + * TODO: Vishwas, this is probably not required, test and remove the same **/ final Long productId = this.fromJsonHelper.extractLongNamed("productId", query.parsedJson()); final LoanProduct loanProduct = this.loanProductRepository.findById(productId) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java index a17e4cba7..62bad9a5d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java @@ -196,20 +196,16 @@ public class RescheduleLoansApiResource { * * @Consumes({ MediaType.APPLICATION_JSON }) * - * @Produces({ MediaType.APPLICATION_JSON }) public String - * retrieveTemplate(@Context final UriInfo uriInfo) { + * @Produces({ MediaType.APPLICATION_JSON }) public String retrieveTemplate(@Context final UriInfo uriInfo) { * * this.platformSecurityContext.authenticatedUser(). - * validateHasReadPermission(RescheduleLoansApiConstants.ENTITY_NAME); final - * ApiRequestJsonSerializationSettings settings = - * this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); + * validateHasReadPermission(RescheduleLoansApiConstants.ENTITY_NAME); final ApiRequestJsonSerializationSettings + * settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); * - * LoanRescheduleRequestData loanRescheduleReasons = null; - * loanRescheduleReasons = this.loanRescheduleRequestReadPlatformService - * .retrieveAllRescheduleReasons(RescheduleLoansApiConstants. + * LoanRescheduleRequestData loanRescheduleReasons = null; loanRescheduleReasons = + * this.loanRescheduleRequestReadPlatformService .retrieveAllRescheduleReasons(RescheduleLoansApiConstants. * LOAN_RESCHEDULE_REASON); * - * return this.loanRescheduleRequestToApiJsonSerializer.serialize(settings, - * loanRescheduleReasons); } + * return this.loanRescheduleRequestToApiJsonSerializer.serialize(settings, loanRescheduleReasons); } */ } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java index 5f9318c7b..7f392a8c2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanaccount.rescheduleloan.data; import org.joda.time.LocalDate; /** - * Immutable data object represent the timeline events of a loan reschedule - * request + * Immutable data object represent the timeline events of a loan reschedule request **/ @SuppressWarnings("unused") public class LoanRescheduleRequestTimelineData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java index ffc016ee3..7f91e7a89 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java @@ -260,8 +260,8 @@ public class LoanRescheduleRequest extends AbstractPersistableCustom { } /** - * change the status of the loan reschedule request to approved, also - * updating the approvedByUser and approvedOnDate properties + * change the status of the loan reschedule request to approved, also updating the approvedByUser and approvedOnDate + * properties * * @param approvedByUser * the user who approved the request @@ -279,8 +279,8 @@ public class LoanRescheduleRequest extends AbstractPersistableCustom { } /** - * change the status of the loan reschedule request to rejected, also - * updating the approvedByUser and approvedOnDate properties + * change the status of the loan reschedule request to rejected, also updating the approvedByUser and approvedOnDate + * properties * * @param approvedByUser * the user who approved the request diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/exception/LoanRescheduleRequestNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/exception/LoanRescheduleRequestNotFoundException.java index 1aa61e50f..787306e79 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/exception/LoanRescheduleRequestNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/exception/LoanRescheduleRequestNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanaccount.rescheduleloan.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when loan reschedule request resources are - * not found. + * A {@link RuntimeException} thrown when loan reschedule request resources are not found. **/ public class LoanRescheduleRequestNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java index f121607e8..8d390c056 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java @@ -63,9 +63,8 @@ public interface LoanRescheduleRequestReadPlatformService { * get all loan reschedule request * * @param command - * all/null - give all request approved - give all approved - * request pending - give all request which is pending for - * approval reject - give all rejected requests + * all/null - give all request approved - give all approved request pending - give all request which is + * pending for approval reject - give all rejected requests * @return list of LoanRescheduleRequestData objects **/ public List retrieveAllRescheduleRequests(String command); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestWritePlatformServiceImpl.java index 1b85773d6..a9c0e4dba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestWritePlatformServiceImpl.java @@ -156,8 +156,7 @@ public class LoanRescheduleRequestWritePlatformServiceImpl implements LoanResche } /** - * create a new instance of the LoanRescheduleRequest object from the - * JsonCommand object and persist + * create a new instance of the LoanRescheduleRequest object from the JsonCommand object and persist * * @return CommandProcessingResult object **/ @@ -435,17 +434,13 @@ public class LoanRescheduleRequestWritePlatformServiceImpl implements LoanResche /* * for (LoanTermVariationsData loanTermVariation : - * loanApplicationTerms.getLoanTermVariations().getDueDateVariation( - * )) { if (rescheduleFromDate.isBefore(loanTermVariation. - * getTermApplicableFrom())) { LocalDate applicableDate = - * this.scheduledDateGenerator.generateNextRepaymentDate( - * rescheduleFromDate, loanApplicationTerms, false, + * loanApplicationTerms.getLoanTermVariations().getDueDateVariation( )) { if + * (rescheduleFromDate.isBefore(loanTermVariation. getTermApplicableFrom())) { LocalDate applicableDate = + * this.scheduledDateGenerator.generateNextRepaymentDate( rescheduleFromDate, loanApplicationTerms, false, * loanApplicationTerms.getHolidayDetailDTO()); if - * (loanTermVariation.getTermApplicableFrom().equals(applicableDate) - * ) { LocalDate adjustedDate = - * this.scheduledDateGenerator.generateNextRepaymentDate( - * adjustedApplicableDate, loanApplicationTerms, false, - * loanApplicationTerms.getHolidayDetailDTO()); + * (loanTermVariation.getTermApplicableFrom().equals(applicableDate) ) { LocalDate adjustedDate = + * this.scheduledDateGenerator.generateNextRepaymentDate( adjustedApplicableDate, loanApplicationTerms, + * false, loanApplicationTerms.getHolidayDetailDTO()); * loanTermVariation.setApplicableFromDate(adjustedDate); } } } */ @@ -586,8 +581,7 @@ public class LoanRescheduleRequestWritePlatformServiceImpl implements LoanResche } /** - * handles the data integrity violation exception for loan reschedule write - * services + * handles the data integrity violation exception for loan reschedule write services * * @param dve * data integrity violation exception diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationCommandFromApiJsonHelper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationCommandFromApiJsonHelper.java index 650600830..e30df95b4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationCommandFromApiJsonHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationCommandFromApiJsonHelper.java @@ -993,9 +993,8 @@ public final class LoanApplicationCommandFromApiJsonHelper { numberOfRepayments, repaymentEvery, repaymentEveryType); /** - * For multi-disbursal loans where schedules are auto-generated based on - * a fixed EMI, ensure the number of repayments is within the - * permissible range defined by the loan product + * For multi-disbursal loans where schedules are auto-generated based on a fixed EMI, ensure the number of + * repayments is within the permissible range defined by the loan product **/ if (loan.getFixedEmiAmount() != null) { Integer minimumNoOfRepayments = loan.loanProduct().getMinNumberOfRepayments(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java index b62b7bd13..962e16b36 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java @@ -774,8 +774,7 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa .fetchDisbursementData(command.parsedJson().getAsJsonObject()); /** - * Stores all charges which are passed in during modify loan - * application + * Stores all charges which are passed in during modify loan application **/ final Set possiblyModifedLoanCharges = this.loanChargeAssembler.fromParsedJson(command.parsedJson(), disbursementDetails); @@ -788,8 +787,8 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa } /** - * If there are any charges already present, which are now not - * passed in as a part of the request, deem the charges as modified + * If there are any charges already present, which are now not passed in as a part of the request, deem the + * charges as modified **/ if (!possiblyModifedLoanCharges.isEmpty()) { if (!possiblyModifedLoanCharges.containsAll(existingCharges)) { @@ -798,8 +797,7 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa } /** - * If any new charges are added or values of existing charges are - * modified + * If any new charges are added or values of existing charges are modified **/ for (LoanCharge loanCharge : possiblyModifedLoanCharges) { if (loanCharge.getId() == null) { @@ -1223,8 +1221,7 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformService.java index 731c3a405..eeb14d45f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformService.java @@ -82,12 +82,11 @@ public interface LoanReadPlatformService { Collection retrieveAllowedLoanOfficers(Long selectedOfficeId, boolean staffInSelectedOfficeOnly); /* - * musoni-specific at present - will find overdue scheduled installments - * that have a special 'overdue charge' associated with the loan product. + * musoni-specific at present - will find overdue scheduled installments that have a special 'overdue charge' + * associated with the loan product. * - * The 'overdue-charge' is only ever applied once to an installment and as a - * result overdue installments with this charge already applied are not - * returned. + * The 'overdue-charge' is only ever applied once to an installment and as a result overdue installments with this + * charge already applied are not returned. */ Collection retrieveAllLoansWithOverdueInstallments(final Long penaltyWaitPeriod, final Boolean backdatePenalties); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java index b5c98d423..ee937c4d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java @@ -472,16 +472,12 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService { private BigDecimal adjustPrepayInstallmentCharge(Loan loan, final LocalDate onDate) { BigDecimal chargeAmount = BigDecimal.ZERO; /* - * for(LoanCharge loanCharge: loan.charges()){ - * if(loanCharge.isInstalmentFee() && - * loanCharge.getCharge().getChargeCalculation()==ChargeCalculationType. - * FLAT.getValue()){ for (LoanRepaymentScheduleInstallment installment : - * loan.getRepaymentScheduleInstallments()) { - * if(onDate.isBefore(installment.getDueDate())){ LoanInstallmentCharge - * loanInstallmentCharge = - * loanCharge.getInstallmentLoanCharge(installment.getInstallmentNumber( - * )); if(loanInstallmentCharge != null){ chargeAmount = - * chargeAmount.add(loanInstallmentCharge.getAmountOutstanding()); } + * for(LoanCharge loanCharge: loan.charges()){ if(loanCharge.isInstalmentFee() && + * loanCharge.getCharge().getChargeCalculation()==ChargeCalculationType. FLAT.getValue()){ for + * (LoanRepaymentScheduleInstallment installment : loan.getRepaymentScheduleInstallments()) { + * if(onDate.isBefore(installment.getDueDate())){ LoanInstallmentCharge loanInstallmentCharge = + * loanCharge.getInstallmentLoanCharge(installment.getInstallmentNumber( )); if(loanInstallmentCharge != null){ + * chargeAmount = chargeAmount.add(loanInstallmentCharge.getAmountOutstanding()); } * * break; } } } } */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java index ef31aee14..b856926a5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java @@ -633,8 +633,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf /**** * TODO Vishwas: Pair with Ashok and re-factor collection sheet code-base * - * May of the changes made to disburseLoan aren't being made here, should - * refactor to reuse disburseLoan ASAP + * May of the changes made to disburseLoan aren't being made here, should refactor to reuse disburseLoan ASAP *****/ @Transactional @Override @@ -1038,11 +1037,9 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf } /*** - * TODO Vishwas Batch save is giving me a - * HibernateOptimisticLockingFailureException, looping and saving for - * the time being, not a major issue for now as this loop is entered - * only in edge cases (when a adjustment is made before the latest - * payment recorded against the loan) + * TODO Vishwas Batch save is giving me a HibernateOptimisticLockingFailureException, looping and saving for the + * time being, not a major issue for now as this loop is entered only in edge cases (when a adjustment is made + * before the latest payment recorded against the loan) ***/ saveAndFlushLoanWithDataIntegrityViolationChecks(loan); if (changedTransactionDetail != null) { @@ -1059,8 +1056,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf changes.put("note", noteText); Note note = null; /** - * If a new transaction is not created, associate note with the - * transaction to be adjusted + * If a new transaction is not created, associate note with the transaction to be adjusted **/ if (newTransactionDetail.isGreaterThanZero(loan.getPrincpal().getCurrency())) { note = Note.loanTransactionNote(loan, newTransactionDetail, noteText); @@ -1147,11 +1143,9 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf this.loanTransactionRepository.save(waiveInterestTransaction); /*** - * TODO Vishwas Batch save is giving me a - * HibernateOptimisticLockingFailureException, looping and saving for - * the time being, not a major issue for now as this loop is entered - * only in edge cases (when a waiver is made before the latest payment - * recorded against the loan) + * TODO Vishwas Batch save is giving me a HibernateOptimisticLockingFailureException, looping and saving for the + * time being, not a major issue for now as this loop is entered only in edge cases (when a waiver is made + * before the latest payment recorded against the loan) ***/ saveAndFlushLoanWithDataIntegrityViolationChecks(loan); if (changedTransactionDetail != null) { @@ -1546,9 +1540,8 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf this.loanChargeRepository.save(loanCharge); /** - * we want to apply charge transactions only for those loans charges - * that are applied when a loan is active and the loan product uses - * Upfront Accruals + * we want to apply charge transactions only for those loans charges that are applied when a loan is active and + * the loan product uses Upfront Accruals **/ if (loan.status().isActive() && loan.isNoneOrCashOrUpfrontAccrualAccountingEnabledOnLoanProduct()) { final LoanTransaction applyLoanChargeTransaction = loan.handleChargeAppliedTransaction(loanCharge, null, currentUser); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationCompoundingMethod.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationCompoundingMethod.java index 37ec24b05..88c90a330 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationCompoundingMethod.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationCompoundingMethod.java @@ -23,8 +23,7 @@ import java.util.Map; /*** * - * People typically use either of the following settings when defining interest - * recalculation method: + * People typically use either of the following settings when defining interest recalculation method: *
          *
        • NONE
        • *
        • INTEREST
        • diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationPeriodMethod.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationPeriodMethod.java index 5e522789b..5d8f85367 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationPeriodMethod.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationPeriodMethod.java @@ -23,8 +23,7 @@ import java.util.Map; /*** * - * People typically use either of the following settings when defining interest - * recalculation method: + * People typically use either of the following settings when defining interest recalculation method: *
            *
          • SAME_AS_REPAYMENT_PERIOD
          • *
          • DAILY
          • diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LendingStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LendingStrategy.java index 25403336e..3f01da31c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LendingStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LendingStrategy.java @@ -22,12 +22,10 @@ import java.util.HashMap; import java.util.Map; /** - * INDIVIDUAL_LOAN: Individual loans are applicable only to clients. GROUP_LOAN: - * * Group loans are applicable only to groups. And tracked only at group level. - * JOINT_LIABILITY_LOAN: Joint liability loans are applicable only to clients - * within a group. LINKED_LOAN: Loan is given to group, then later loan amount - * is split into individual loans. Loan is tracked at both individual and group - * level + * INDIVIDUAL_LOAN: Individual loans are applicable only to clients. GROUP_LOAN: * Group loans are applicable only to + * groups. And tracked only at group level. JOINT_LIABILITY_LOAN: Joint liability loans are applicable only to clients + * within a group. LINKED_LOAN: Loan is given to group, then later loan amount is split into individual loans. Loan is + * tracked at both individual and group level * */ public enum LendingStrategy { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProduct.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProduct.java index 758eb606f..3fb922359 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProduct.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProduct.java @@ -65,11 +65,10 @@ import org.apache.fineract.portfolio.rate.domain.Rate; import org.joda.time.LocalDate; /** - * Loan products allow for categorisation of an organisations loans into - * something meaningful to them. + * Loan products allow for categorisation of an organisations loans into something meaningful to them. * - * They provide a means of simplifying creation/maintenance of loans. They can - * also allow for product comparison to take place when reporting. + * They provide a means of simplifying creation/maintenance of loans. They can also allow for product comparison to take + * place when reporting. * * They allow for constraints to be added at product level. */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinMaxConstraints.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinMaxConstraints.java index fa8d6deec..de4c3567c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinMaxConstraints.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinMaxConstraints.java @@ -26,8 +26,7 @@ import javax.persistence.Embeddable; import org.apache.fineract.infrastructure.core.api.JsonCommand; /** - * LoanProductMinMaxConstraints encapsulates all the Min and Max details of a - * {@link LoanProduct}. + * LoanProductMinMaxConstraints encapsulates all the Min and Max details of a {@link LoanProduct}. */ @Embeddable public class LoanProductMinMaxConstraints { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinimumRepaymentScheduleRelatedDetail.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinimumRepaymentScheduleRelatedDetail.java index fb1d55733..81c7dfd93 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinimumRepaymentScheduleRelatedDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinimumRepaymentScheduleRelatedDetail.java @@ -24,8 +24,7 @@ import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; /** - * Represents the bare minimum repayment details needed for activities related - * to generating repayment schedules. + * Represents the bare minimum repayment details needed for activities related to generating repayment schedules. */ public interface LoanProductMinimumRepaymentScheduleRelatedDetail { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java index 375e6e297..28146174f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java @@ -42,8 +42,8 @@ import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.AprCalculat import org.apache.fineract.portfolio.loanproduct.LoanProductConstants; /** - * LoanRepaymentScheduleDetail encapsulates all the details of a - * {@link LoanProduct} that are also used and persisted by a {@link Loan}. + * LoanRepaymentScheduleDetail encapsulates all the details of a {@link LoanProduct} that are also used and persisted by + * a {@link Loan}. */ @Embeddable public class LoanProductRelatedDetail implements LoanProductMinimumRepaymentScheduleRelatedDetail { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanRescheduleStrategyMethod.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanRescheduleStrategyMethod.java index 1ac347758..253ccd231 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanRescheduleStrategyMethod.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanRescheduleStrategyMethod.java @@ -22,8 +22,7 @@ import java.util.HashMap; import java.util.Map; /*** - * * People typically use either of the following settings when defining - * interest recalculation method: + * * People typically use either of the following settings when defining interest recalculation method: *
              *
            • RESCHEDULE_NEXT_REPAYMENTS
            • *
            • REDUCE_NUMBER_OF_INSTALLMENTS
            • diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidCurrencyException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidCurrencyException.java index b81b6cb16..3a965bb2f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidCurrencyException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidCurrencyException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanproduct.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when currency mismatch - * occurs + * {@link AbstractPlatformDomainRuleException} thrown when currency mismatch occurs */ public class InvalidCurrencyException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidLendingStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidLendingStrategy.java index 38fae3f6b..285e63a39 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidLendingStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidLendingStrategy.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanproduct.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when lending strategy - * mismatch occurs + * {@link AbstractPlatformDomainRuleException} thrown when lending strategy mismatch occurs */ public class InvalidLendingStrategy extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/NotInMinMaxRangeException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/NotInMinMaxRangeException.java index 5569d705c..ae6a1539a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/NotInMinMaxRangeException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/NotInMinMaxRangeException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanproduct.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when a value is not within - * minimum and maximum values. + * {@link AbstractPlatformDomainRuleException} thrown when a value is not within minimum and maximum values. * */ public class NotInMinMaxRangeException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/exception/ProductMixNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/exception/ProductMixNotFoundException.java index 6606d636e..26610606f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/exception/ProductMixNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/exception/ProductMixNotFoundException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.loanproduct.productmix.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when no product mixes found with the - * productId. + * A {@link RuntimeException} thrown when no product mixes found with the productId. */ public class ProductMixNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixWritePlatformServiceJpaRepositoryImpl.java index ba95ee9d6..718762c53 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixWritePlatformServiceJpaRepositoryImpl.java @@ -150,8 +150,8 @@ public class ProductMixWritePlatformServiceJpaRepositoryImpl implements ProductM } /* - * if restrictedProducts array is not empty delete the duplicate ids - * which are already exists and update existedProductMixes + * if restrictedProducts array is not empty delete the duplicate ids which are already exists and update + * existedProductMixes */ final List productMixesToRemove = updateRestrictedIds(restrictedIds, existedProductMixes); final Map restrictedProductsAsMap = getRestrictedProducts(restrictedIds); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java index a76dcaed5..a4c1a5e87 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java @@ -337,8 +337,7 @@ public class LoanProductWritePlatformServiceJpaRepositoryImpl implements LoanPro } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepositoryWrapper.java index e9b50f060..f125037b5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepositoryWrapper.java @@ -24,14 +24,13 @@ import org.springframework.stereotype.Service; /** *

              - * Wrapper for {@link MeetingRepository} that is responsible for checking if - * {@link Meeting} is returned when using findOne repository method - * and throwing an appropriate not found exception. + * Wrapper for {@link MeetingRepository} that is responsible for checking if {@link Meeting} is returned when using + * findOne repository method and throwing an appropriate not found exception. *

              * *

              - * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link MeetingRepository} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where {@link MeetingRepository} is + * required. *

              */ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotSupportedResourceException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotSupportedResourceException.java index be3712c9f..933aec1c6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotSupportedResourceException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotSupportedResourceException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.meeting.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when meeting is captured - * against not supported resource. + * {@link AbstractPlatformDomainRuleException} thrown when meeting is captured against not supported resource. */ public class MeetingNotSupportedResourceException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/service/MeetingWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/service/MeetingWritePlatformServiceJpaRepositoryImpl.java index 1c1af3263..441bc5767 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/service/MeetingWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/service/MeetingWritePlatformServiceJpaRepositoryImpl.java @@ -99,15 +99,11 @@ public class MeetingWritePlatformServiceJpaRepositoryImpl implements MeetingWrit final Date meetingDate = command.dateValueOfParameterNamed(meetingDateParamName); final Boolean isTransactionDateOnNonMeetingDate = false; /* - * Boolean isSkipRepaymentOnFirstMonth = false; Integer numberOfDays = - * 0; boolean isSkipRepaymentOnFirstMonthEnabled = - * configurationDomainService.isSkippingMeetingOnFirstDayOfMonthEnabled( - * ); if(isSkipRepaymentOnFirstMonthEnabled){ - * isSkipRepaymentOnFirstMonth = - * isLoanRepaymentsSyncWithMeeting(loan.group(), calendar); - * if(isSkipRepaymentOnFirstMonth) { numberOfDays = - * configurationDomainService. - * retreivePeroidInNumberOfDaysForSkipMeetingDate().intValue(); } } + * Boolean isSkipRepaymentOnFirstMonth = false; Integer numberOfDays = 0; boolean + * isSkipRepaymentOnFirstMonthEnabled = configurationDomainService.isSkippingMeetingOnFirstDayOfMonthEnabled( ); + * if(isSkipRepaymentOnFirstMonthEnabled){ isSkipRepaymentOnFirstMonth = + * isLoanRepaymentsSyncWithMeeting(loan.group(), calendar); if(isSkipRepaymentOnFirstMonth) { numberOfDays = + * configurationDomainService. retreivePeroidInNumberOfDaysForSkipMeetingDate().intValue(); } } */ try { @@ -163,8 +159,7 @@ public class MeetingWritePlatformServiceJpaRepositoryImpl implements MeetingWrit entityId = command.getGroupId(); entityType = CalendarEntityType.GROUPS; /* - * If group is within a center then center entityType should be - * passed for retrieving CalendarInstance. + * If group is within a center then center entityType should be passed for retrieving CalendarInstance. */ final Group group = this.groupRepository.findById(entityId).get(); if (group.isCenter()) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/data/NoteData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/data/NoteData.java index 1dc2f1ba3..a2247487a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/data/NoteData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/data/NoteData.java @@ -22,8 +22,7 @@ import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.joda.time.DateTime; /** - * Immutable data object represent note or case information about a client, loan - * or loan transaction. + * Immutable data object represent note or case information about a client, loan or loan transaction. */ public class NoteData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepository.java index 243b3289b..6abe50295 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepository.java @@ -23,8 +23,7 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; /** - * Bowpi GT Rate repository to save on m_rate table (custom change for Credi - * Chapin) Created by Jose on 19/07/2017. + * Bowpi GT Rate repository to save on m_rate table (custom change for Credi Chapin) Created by Jose on 19/07/2017. */ public interface RateRepository extends JpaRepository, JpaSpecificationExecutor { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteServiceImpl.java index 3fb703a1b..207283c9c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteServiceImpl.java @@ -133,8 +133,7 @@ public class RateWriteServiceImpl implements RateWriteService { } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleRateDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { if (realCause.getMessage().contains("rate_name_org")) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnClosureType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnClosureType.java index 76b0e5aa2..61da52012 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnClosureType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnClosureType.java @@ -24,8 +24,8 @@ import org.apache.fineract.portfolio.savings.domain.FixedDepositAccount; import org.apache.fineract.portfolio.savings.domain.RecurringDepositAccount; /** - * An enumeration of different options available on account closure - * {@link FixedDepositAccount} & {@link RecurringDepositAccount}. + * An enumeration of different options available on account closure {@link FixedDepositAccount} & + * {@link RecurringDepositAccount}. */ public enum DepositAccountOnClosureType { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnHoldTransactionType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnHoldTransactionType.java index b6b6f1c51..751782100 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnHoldTransactionType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnHoldTransactionType.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.savings; import org.apache.fineract.portfolio.savings.domain.SavingsAccount; /** - * An enumeration of on hold transactions that can occur on a - * {@link SavingsAccount}. + * An enumeration of on hold transactions that can occur on a {@link SavingsAccount}. */ public enum DepositAccountOnHoldTransactionType { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountType.java index 5cc539f8e..b038dd309 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountType.java @@ -22,8 +22,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.fineract.portfolio.savings.domain.SavingsAccount; /** - * An enumeration of different transactions that can occur on a - * {@link SavingsAccount}. + * An enumeration of different transactions that can occur on a {@link SavingsAccount}. */ public enum DepositAccountType { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsAccountTransactionType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsAccountTransactionType.java index 99956b6d0..65bb7cc0d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsAccountTransactionType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsAccountTransactionType.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.savings; import org.apache.fineract.portfolio.savings.domain.SavingsAccount; /** - * An enumeration of different transactions that can occur on a - * {@link SavingsAccount}. + * An enumeration of different transactions that can occur on a {@link SavingsAccount}. */ public enum SavingsAccountTransactionType { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsCompoundingInterestPeriodType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsCompoundingInterestPeriodType.java index 966c3d4ff..0aa5290b1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsCompoundingInterestPeriodType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsCompoundingInterestPeriodType.java @@ -23,8 +23,7 @@ import java.util.List; /** *

              - * The compounding interest period is the span of time at the end of which - * savings in a client's account earn interest. + * The compounding interest period is the span of time at the end of which savings in a client's account earn interest. *

              */ public enum SavingsCompoundingInterestPeriodType { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationDaysInYearType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationDaysInYearType.java index 0696e0951..d0f655267 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationDaysInYearType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationDaysInYearType.java @@ -23,8 +23,7 @@ import java.util.List; /** * - * People typically use either of the following settings when calculating there - * interest using the daily method: + * People typically use either of the following settings when calculating there interest using the daily method: *
                *
              • 360 and
              • *
              • 365
              • diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationType.java index 0e35dbb25..a62f1af85 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationType.java @@ -30,8 +30,7 @@ import java.util.List; *
              * *

              - * The interest calculation must be based on a point in time for determining the - * balance in the account, such as: + * The interest calculation must be based on a point in time for determining the balance in the account, such as: *

              *
                *
              • beginning-of-day balance
              • @@ -40,8 +39,7 @@ import java.util.List; *
              * *

              - * Any one of the three may be used, but must be applied consistently. - * End-of-day balance is used by default at present. + * Any one of the three may be used, but must be applied consistently. End-of-day balance is used by default at present. *

              */ public enum SavingsInterestCalculationType { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsPostingInterestPeriodType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsPostingInterestPeriodType.java index 59e35ed7a..c2e2a6828 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsPostingInterestPeriodType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/SavingsPostingInterestPeriodType.java @@ -22,8 +22,8 @@ import java.util.ArrayList; import java.util.List; /** - * The interest posting period is the span of time at the end of which savings - * earned but not yet credited/posted in a client's account is credited/posted. + * The interest posting period is the span of time at the end of which savings earned but not yet credited/posted in a + * client's account is credited/posted. */ public enum SavingsPostingInterestPeriodType { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java index 115c267a5..0c1cb2def 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java @@ -128,15 +128,13 @@ public class RecurringDepositAccountTransactionsApiResource { } /*** - * By default get the deposit template for deposits and withdrawal - * transactions + * By default get the deposit template for deposits and withdrawal transactions */ SavingsAccountTransactionData savingsAccount = this.depositAccountReadPlatformService .retrieveRecurringAccountDepositTransactionTemplate(recurringDepositAccountId); /*** - * Update transaction date and transaction type if transaction type is - * withdrawal + * Update transaction date and transaction type if transaction type is withdrawal */ if (is(commandParam, "withdrawal")) { savingsAccount = SavingsAccountTransactionData.withWithDrawalTransactionDetails(savingsAccount); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java index 49390fa7d..2753833c0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java @@ -307,20 +307,18 @@ public class SavingsAccountsApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) /* - * public String updateGsim(@PathParam("parentAccountId") final Long - * parentAccountId, final String apiRequestBodyAsJson, + * public String updateGsim(@PathParam("parentAccountId") final Long parentAccountId, final String + * apiRequestBodyAsJson, * * @QueryParam("command") final String commandParam) { */ public String updateGsim(@PathParam("parentAccountId") final Long parentAccountId, final String apiRequestBodyAsJson) { /* - * if (is(commandParam, "updateWithHoldTax")) { final CommandWrapper - * commandRequest = new - * CommandWrapperBuilder().withJson(apiRequestBodyAsJson). - * updateWithHoldTax(accountId) .build(); final CommandProcessingResult - * result = this.commandsSourceWritePlatformService.logCommandSource( - * commandRequest); return this.toApiJsonSerializer.serialize(result); } + * if (is(commandParam, "updateWithHoldTax")) { final CommandWrapper commandRequest = new + * CommandWrapperBuilder().withJson(apiRequestBodyAsJson). updateWithHoldTax(accountId) .build(); final + * CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource( commandRequest); + * return this.toApiJsonSerializer.serialize(result); } */ final CommandWrapper commandRequest = new CommandWrapperBuilder().updateGSIMAccount(parentAccountId).withJson(apiRequestBodyAsJson) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsApiSetConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsApiSetConstants.java index 78fb5ef47..3ec70e700 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsApiSetConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsApiSetConstants.java @@ -28,9 +28,8 @@ import org.apache.fineract.portfolio.savings.data.SavingsProductData; public class SavingsApiSetConstants extends SavingsApiConstants { /** - * These parameters will match the class level parameters of - * {@link SavingsProductData}. Where possible, we try to get response - * parameters to match those of request parameters. + * These parameters will match the class level parameters of {@link SavingsProductData}. Where possible, we try to + * get response parameters to match those of request parameters. */ protected static final Set SAVINGS_PRODUCT_RESPONSE_DATA_PARAMETERS = new HashSet<>( Arrays.asList(idParamName, nameParamName, shortNameParamName, descriptionParamName, "currency", digitsAfterDecimalParamName, @@ -45,9 +44,8 @@ public class SavingsApiSetConstants extends SavingsApiConstants { daysToDormancyParamName, daysToInactiveParamName)); /** - * These parameters will match the class level parameters of - * {@link SavingsAccountData}. Where possible, we try to get response - * parameters to match those of request parameters. + * These parameters will match the class level parameters of {@link SavingsAccountData}. Where possible, we try to + * get response parameters to match those of request parameters. */ protected static final Set SAVINGS_ACCOUNT_RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(idParamName, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountData.java index b68679885..e9ae7f32e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountData.java @@ -30,8 +30,7 @@ import org.apache.fineract.portfolio.charge.data.ChargeData; import org.apache.fineract.portfolio.tax.data.TaxGroupData; /** - * Immutable data object representing abstract for Fixed and Recurring Deposit - * Accounts Accounts. + * Immutable data object representing abstract for Fixed and Recurring Deposit Accounts Accounts. */ public class DepositAccountData { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountDataValidator.java index 21e84a6c3..87d0cb7cb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountDataValidator.java @@ -626,14 +626,10 @@ public class DepositAccountDataValidator { baseDataValidator.reset().parameter(recurringFrequencyParamName).value(frequency).notNull().integerGreaterThanZero(); /* - * if (CalendarFrequencyType.fromInt(frequency).isWeekly()) { - * final Integer repeatsOnDay = - * this.fromApiJsonHelper.extractIntegerSansLocaleNamed - * (repeatsOnDayParamName, element); - * baseDataValidator.reset().parameter - * (repeatsOnDayParamName).value(repeatsOnDay).notBlank() - * .inMinMaxRange(CalendarWeekDaysType.getMinValue(), - * CalendarWeekDaysType.getMaxValue()); } + * if (CalendarFrequencyType.fromInt(frequency).isWeekly()) { final Integer repeatsOnDay = + * this.fromApiJsonHelper.extractIntegerSansLocaleNamed (repeatsOnDayParamName, element); + * baseDataValidator.reset().parameter (repeatsOnDayParamName).value(repeatsOnDay).notBlank() + * .inMinMaxRange(CalendarWeekDaysType.getMinValue(), CalendarWeekDaysType.getMaxValue()); } */ } } @@ -674,16 +670,11 @@ public class DepositAccountDataValidator { final Integer frequency = this.fromApiJsonHelper.extractIntegerSansLocaleNamed(recurringFrequencyParamName, element); baseDataValidator.reset().parameter(recurringFrequencyParamName).value(frequency).notNull().integerGreaterThanZero(); /* - * if (this.fromApiJsonHelper.parameterExists(repeatsOnDayParamName, - * element)) { if - * (CalendarFrequencyType.fromInt(frequency).isWeekly()) { final - * Integer repeatsOnDay = - * this.fromApiJsonHelper.extractIntegerSansLocaleNamed - * (repeatsOnDayParamName, element); - * baseDataValidator.reset().parameter - * (repeatsOnDayParamName).value(repeatsOnDay).notBlank() - * .inMinMaxRange(CalendarWeekDaysType.getMinValue(), - * CalendarWeekDaysType.getMaxValue()); } } + * if (this.fromApiJsonHelper.parameterExists(repeatsOnDayParamName, element)) { if + * (CalendarFrequencyType.fromInt(frequency).isWeekly()) { final Integer repeatsOnDay = + * this.fromApiJsonHelper.extractIntegerSansLocaleNamed (repeatsOnDayParamName, element); + * baseDataValidator.reset().parameter (repeatsOnDayParamName).value(repeatsOnDay).notBlank() + * .inMinMaxRange(CalendarWeekDaysType.getMinValue(), CalendarWeekDaysType.getMaxValue()); } } */ } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductData.java index 0493c2d5a..04c72bf02 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductData.java @@ -144,8 +144,8 @@ public class DepositProductData { } /** - * Returns a {@link DepositProductData} that contains and exist - * {@link DepositProductData} data with further template data for dropdowns. + * Returns a {@link DepositProductData} that contains and exist {@link DepositProductData} data with further + * template data for dropdowns. * * @param taxGroupOptions * TODO diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductDataValidator.java index e4b68a8ba..59d35c1dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductDataValidator.java @@ -259,13 +259,9 @@ public class DepositProductDataValidator { .isOneOfTheseValues(SavingsInterestCalculationDaysInYearType.integerValues()); /* - * if - * (fromApiJsonHelper.parameterExists(minRequiredOpeningBalanceParamName - * , element)) { final BigDecimal minOpeningBalance = - * fromApiJsonHelper.extractBigDecimalWithLocaleNamed - * (minRequiredOpeningBalanceParamName, element); - * baseDataValidator.reset - * ().parameter(minRequiredOpeningBalanceParamName + * if (fromApiJsonHelper.parameterExists(minRequiredOpeningBalanceParamName , element)) { final BigDecimal + * minOpeningBalance = fromApiJsonHelper.extractBigDecimalWithLocaleNamed (minRequiredOpeningBalanceParamName, + * element); baseDataValidator.reset ().parameter(minRequiredOpeningBalanceParamName * ).value(minOpeningBalance).zeroOrPositiveAmount(); } */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/FixedDepositProductData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/FixedDepositProductData.java index b59532b9d..7b580ebfa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/FixedDepositProductData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/FixedDepositProductData.java @@ -134,9 +134,8 @@ public final class FixedDepositProductData extends DepositProductData { } /** - * Returns a {@link FixedDepositProductData} that contains and exist - * {@link FixedDepositProductData} data with further template data for - * dropdowns. + * Returns a {@link FixedDepositProductData} that contains and exist {@link FixedDepositProductData} data with + * further template data for dropdowns. * * @param taxGroupOptions * TODO diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/RecurringDepositProductData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/RecurringDepositProductData.java index 1be8d15e3..7952a0144 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/RecurringDepositProductData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/RecurringDepositProductData.java @@ -142,9 +142,8 @@ public final class RecurringDepositProductData extends DepositProductData { } /** - * Returns a {@link RecurringDepositProductData} that contains and exist - * {@link RecurringDepositProductData} data with further template data for - * dropdowns. + * Returns a {@link RecurringDepositProductData} that contains and exist {@link RecurringDepositProductData} data + * with further template data for dropdowns. * * @param taxGroupOptions * TODO diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountApplicationTimelineData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountApplicationTimelineData.java index 120917689..b3481d837 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountApplicationTimelineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountApplicationTimelineData.java @@ -22,8 +22,7 @@ import java.io.Serializable; import org.joda.time.LocalDate; /** - * Immutable data object represent the important time-line events of a savings - * account application. + * Immutable data object represent the important time-line events of a savings account application. */ @SuppressWarnings("unused") public class SavingsAccountApplicationTimelineData implements Serializable { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountConstant.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountConstant.java index dce547582..150eabade 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountConstant.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountConstant.java @@ -26,9 +26,8 @@ import org.apache.fineract.portfolio.savings.SavingsApiConstants; public class SavingsAccountConstant extends SavingsApiConstants { /** - * These parameters will match the class level parameters of - * {@link SavingsProductData}. Where possible, we try to get response - * parameters to match those of request parameters. + * These parameters will match the class level parameters of {@link SavingsProductData}. Where possible, we try to + * get response parameters to match those of request parameters. */ protected static final Set SAVINGS_ACCOUNT_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName, dateFormatParamName, monthDayFormatParamName, staffIdParamName, isGSIM, isParentAccount, accountNoParamName, @@ -43,9 +42,8 @@ public class SavingsAccountConstant extends SavingsApiConstants { gsimApplicationId, gsimLastApplication)); /** - * These parameters will match the class level parameters of - * {@link SavingsAccountData}. Where possible, we try to get response - * parameters to match those of request parameters. + * These parameters will match the class level parameters of {@link SavingsAccountData}. Where possible, we try to + * get response parameters to match those of request parameters. */ protected static final Set SAVINGS_ACCOUNT_TRANSACTION_REQUEST_DATA_PARAMETERS = new HashSet<>( diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionEnumData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionEnumData.java index c7ab3b631..61684354b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionEnumData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionEnumData.java @@ -22,8 +22,7 @@ import java.io.Serializable; import org.apache.fineract.portfolio.savings.SavingsAccountTransactionType; /** - * Immutable data object represent savings account transaction type - * enumerations. + * Immutable data object represent savings account transaction type enumerations. */ public class SavingsAccountTransactionEnumData implements Serializable { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductData.java index 5937f33ff..856adf407 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductData.java @@ -162,8 +162,8 @@ public final class SavingsProductData implements Serializable { } /** - * Returns a {@link SavingsProductData} that contains and exist - * {@link SavingsProductData} data with further template data for dropdowns. + * Returns a {@link SavingsProductData} that contains and exist {@link SavingsProductData} data with further + * template data for dropdowns. * * @param taxGroupOptions * TODO diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductDataValidator.java index 46a60b161..0dfd0b91c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductDataValidator.java @@ -204,38 +204,25 @@ public class SavingsProductDataValidator { } /* - * if - * (this.fromApiJsonHelper.parameterExists(withdrawalFeeAmountParamName, - * element)) { + * if (this.fromApiJsonHelper.parameterExists(withdrawalFeeAmountParamName, element)) { * - * final BigDecimal withdrawalFeeAmount = - * this.fromApiJsonHelper.extractBigDecimalWithLocaleNamed - * (withdrawalFeeAmountParamName, element); - * baseDataValidator.reset().parameter - * (withdrawalFeeAmountParamName).value - * (withdrawalFeeAmount).zeroOrPositiveAmount(); + * final BigDecimal withdrawalFeeAmount = this.fromApiJsonHelper.extractBigDecimalWithLocaleNamed + * (withdrawalFeeAmountParamName, element); baseDataValidator.reset().parameter + * (withdrawalFeeAmountParamName).value (withdrawalFeeAmount).zeroOrPositiveAmount(); * * if (withdrawalFeeAmount != null) { final Integer withdrawalFeeType = - * this.fromApiJsonHelper.extractIntegerSansLocaleNamed( - * withdrawalFeeTypeParamName, element); - * baseDataValidator.reset().parameter - * (withdrawalFeeTypeParamName).value(withdrawalFeeType) + * this.fromApiJsonHelper.extractIntegerSansLocaleNamed( withdrawalFeeTypeParamName, element); + * baseDataValidator.reset().parameter (withdrawalFeeTypeParamName).value(withdrawalFeeType) * .isOneOfTheseValues(SavingsWithdrawalFeesType.integerValues()); } } * - * if - * (this.fromApiJsonHelper.parameterExists(withdrawalFeeTypeParamName, - * element)) { final Integer withdrawalFeeType = - * this.fromApiJsonHelper.extractIntegerSansLocaleNamed - * (withdrawalFeeTypeParamName, element); - * baseDataValidator.reset().parameter - * (withdrawalFeeTypeParamName).value(withdrawalFeeType).ignoreIfNull() - * .isOneOfTheseValues(1, 2); + * if (this.fromApiJsonHelper.parameterExists(withdrawalFeeTypeParamName, element)) { final Integer + * withdrawalFeeType = this.fromApiJsonHelper.extractIntegerSansLocaleNamed (withdrawalFeeTypeParamName, + * element); baseDataValidator.reset().parameter + * (withdrawalFeeTypeParamName).value(withdrawalFeeType).ignoreIfNull() .isOneOfTheseValues(1, 2); * - * if (withdrawalFeeType != null) { final BigDecimal withdrawalFeeAmount - * = this.fromApiJsonHelper.extractBigDecimalWithLocaleNamed( - * withdrawalFeeAmountParamName, element); - * baseDataValidator.reset().parameter - * (withdrawalFeeAmountParamName).value(withdrawalFeeAmount).notNull() + * if (withdrawalFeeType != null) { final BigDecimal withdrawalFeeAmount = + * this.fromApiJsonHelper.extractBigDecimalWithLocaleNamed( withdrawalFeeAmountParamName, element); + * baseDataValidator.reset().parameter (withdrawalFeeAmountParamName).value(withdrawalFeeAmount).notNull() * .zeroOrPositiveAmount(); } } */ if (this.fromApiJsonHelper.parameterExists(withdrawalFeeForTransfersParamName, element)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountAssembler.java index b8f8e292a..4c53f3c45 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountAssembler.java @@ -148,9 +148,8 @@ public class DepositAccountAssembler { } /** - * Assembles a new {@link SavingsAccount} from JSON details passed in - * request inheriting details where relevant from chosen - * {@link SavingsProduct}. + * Assembles a new {@link SavingsAccount} from JSON details passed in request inheriting details where relevant from + * chosen {@link SavingsProduct}. */ public SavingsAccount assembleFrom(final JsonCommand command, final AppUser submittedBy, final DepositAccountType depositAccountType) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainServiceJpa.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainServiceJpa.java index c54ece998..cbf643256 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainServiceJpa.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainServiceJpa.java @@ -209,17 +209,13 @@ public class DepositAccountDomainServiceJpa implements DepositAccountDomainServi */ updateExistingTransactionsDetails(account, existingTransactionIds, existingReversedTransactionIds); /* - * final SavingsAccountTransactionDTO transactionDTO = new - * SavingsAccountTransactionDTO(fmt, transactionDate, transactionAmount, - * paymentDetail, new Date()); final SavingsAccountTransaction deposit = - * account.deposit(transactionDTO); boolean isInterestTransfer = false; - * final MathContext mc = MathContext.DECIMAL64; if - * (account.isBeforeLastPostingPeriod(transactionDate)) { final - * LocalDate today = DateUtils.getLocalDateOfTenant(); - * account.postInterest(mc, today, isInterestTransfer); } else { final - * LocalDate today = DateUtils.getLocalDateOfTenant(); - * account.calculateInterestUsing(mc, today, isInterestTransfer); - * ======= + * final SavingsAccountTransactionDTO transactionDTO = new SavingsAccountTransactionDTO(fmt, transactionDate, + * transactionAmount, paymentDetail, new Date()); final SavingsAccountTransaction deposit = + * account.deposit(transactionDTO); boolean isInterestTransfer = false; final MathContext mc = + * MathContext.DECIMAL64; if (account.isBeforeLastPostingPeriod(transactionDate)) { final LocalDate today = + * DateUtils.getLocalDateOfTenant(); account.postInterest(mc, today, isInterestTransfer); } else { final + * LocalDate today = DateUtils.getLocalDateOfTenant(); account.calculateInterestUsing(mc, today, + * isInterestTransfer); ======= */ final MathContext mc = MathContext.DECIMAL64; final Locale locale = command.extractLocale(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositPreClosureDetail.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositPreClosureDetail.java index e8d786eef..e22ad229b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositPreClosureDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositPreClosureDetail.java @@ -34,9 +34,8 @@ import org.apache.fineract.portfolio.savings.PreClosurePenalInterestOnType; import org.apache.fineract.portfolio.savings.service.SavingsEnumerations; /** - * DepositPreClosureDetail encapsulates all the details of a - * {@link FixedDepositProduct} that are also used and persisted by a - * {@link FixedDepositAccount}. + * DepositPreClosureDetail encapsulates all the details of a {@link FixedDepositProduct} that are also used and + * persisted by a {@link FixedDepositAccount}. */ @Embeddable public class DepositPreClosureDetail { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositProductAmountDetails.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositProductAmountDetails.java index 955602019..b7ac667f0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositProductAmountDetails.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositProductAmountDetails.java @@ -26,8 +26,7 @@ import javax.persistence.Embeddable; import org.apache.fineract.infrastructure.core.api.JsonCommand; /** - * RecurringDepositProductAmountDetails encapsulates all recurring Deposit - * Amount of a {@link RecurringDepositProduct}. + * RecurringDepositProductAmountDetails encapsulates all recurring Deposit Amount of a {@link RecurringDepositProduct}. */ @Embeddable public class DepositProductAmountDetails { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositRecurringDetail.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositRecurringDetail.java index 1a8a03b7d..67c96c560 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositRecurringDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositRecurringDetail.java @@ -29,9 +29,8 @@ import javax.persistence.Embeddable; import org.apache.fineract.infrastructure.core.api.JsonCommand; /** - * DepositRecurringDetail encapsulates all the details of a - * {@link RecurringDepositProduct} that are also used and persisted by a - * {@link RecurringDepositAccount}. + * DepositRecurringDetail encapsulates all the details of a {@link RecurringDepositProduct} that are also used and + * persisted by a {@link RecurringDepositAccount}. */ @Embeddable public class DepositRecurringDetail { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositTermDetail.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositTermDetail.java index fd36bf8ee..5c874ac4e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositTermDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositTermDetail.java @@ -41,8 +41,7 @@ import org.joda.time.Weeks; import org.joda.time.Years; /** - * DepositTermDetail encapsulates all the details of a - * {@link FixedDepositProduct} that are also used and persisted by a + * DepositTermDetail encapsulates all the details of a {@link FixedDepositProduct} that are also used and persisted by a * {@link FixedDepositAccount}. */ @Embeddable diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java index 6fb2ceff5..e4dc721cf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java @@ -406,12 +406,10 @@ public class FixedDepositAccount extends SavingsAccount { this.accountTermAndPreClosure.updateOnAccountClosureStatus(onClosureType); /* - * // withdraw deposit amount before closing the account final Money - * transactionAmountMoney = Money.of(this.currency, - * this.getAccountBalance()); final SavingsAccountTransaction withdraw = - * SavingsAccountTransaction.withdrawal(this, office(), paymentDetail, - * closedDate, transactionAmountMoney, new Date()); - * this.transactions.add(withdraw); + * // withdraw deposit amount before closing the account final Money transactionAmountMoney = + * Money.of(this.currency, this.getAccountBalance()); final SavingsAccountTransaction withdraw = + * SavingsAccountTransaction.withdrawal(this, office(), paymentDetail, closedDate, transactionAmountMoney, new + * Date()); this.transactions.add(withdraw); */ actualChanges.put(SavingsApiConstants.statusParamName, SavingsEnumerations.status(this.status)); actualChanges.put(SavingsApiConstants.localeParamName, command.locale()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccount.java index 171fb7ade..1839ce0ed 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccount.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccount.java @@ -511,12 +511,10 @@ public class RecurringDepositAccount extends SavingsAccount { this.accountTermAndPreClosure.updateOnAccountClosureStatus(onClosureType); /* - * // withdraw deposit amount before closing the account final Money - * transactionAmountMoney = Money.of(this.currency, - * this.getAccountBalance()); final SavingsAccountTransaction withdraw = - * SavingsAccountTransaction.withdrawal(this, office(), paymentDetail, - * closedDate, transactionAmountMoney, new Date()); - * this.transactions.add(withdraw); + * // withdraw deposit amount before closing the account final Money transactionAmountMoney = + * Money.of(this.currency, this.getAccountBalance()); final SavingsAccountTransaction withdraw = + * SavingsAccountTransaction.withdrawal(this, office(), paymentDetail, closedDate, transactionAmountMoney, new + * Date()); this.transactions.add(withdraw); */ actualChanges.put(SavingsApiConstants.statusParamName, SavingsEnumerations.status(this.status)); actualChanges.put(SavingsApiConstants.localeParamName, command.locale()); @@ -611,12 +609,10 @@ public class RecurringDepositAccount extends SavingsAccount { this.accountTermAndPreClosure.updateOnAccountClosureStatus(onClosureType); /* - * // withdraw deposit amount before closing the account final Money - * transactionAmountMoney = Money.of(this.currency, - * this.getAccountBalance()); final SavingsAccountTransaction withdraw = - * SavingsAccountTransaction.withdrawal(this, office(), paymentDetail, - * closedDate, transactionAmountMoney, new Date()); - * this.transactions.add(withdraw); + * // withdraw deposit amount before closing the account final Money transactionAmountMoney = + * Money.of(this.currency, this.getAccountBalance()); final SavingsAccountTransaction withdraw = + * SavingsAccountTransaction.withdrawal(this, office(), paymentDetail, closedDate, transactionAmountMoney, new + * Date()); this.transactions.add(withdraw); */ actualChanges.put(SavingsApiConstants.statusParamName, SavingsEnumerations.status(this.status)); @@ -944,11 +940,10 @@ public class RecurringDepositAccount extends SavingsAccount { } /** - * This method is responsible for checking if the current transaction is 'an - * advance/early payment' based on the details passed through. + * This method is responsible for checking if the current transaction is 'an advance/early payment' based on the + * details passed through. * - * Default implementation is check transaction date is before installment - * due date. + * Default implementation is check transaction date is before installment due date. */ protected boolean isTransactionInAdvanceOfInstallment(final int currentInstallmentIndex, final List installments, final LocalDate transactionDate) { @@ -1042,8 +1037,7 @@ public class RecurringDepositAccount extends SavingsAccount { // FIXME: Handle this scenario /* - * //final boolean recurringFrequencyBeforeDepositPeriod = - * recurringFrequencyBeforeDepositPeriod(); + * //final boolean recurringFrequencyBeforeDepositPeriod = recurringFrequencyBeforeDepositPeriod(); * * if (!recurringFrequencyBeforeDepositPeriod) { * baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode( @@ -1087,8 +1081,7 @@ public class RecurringDepositAccount extends SavingsAccount { throw new PlatformApiDataValidationException(dataValidationErrors); } /** - * final boolean recurringFrequencyBeforeDepositPeriod = - * recurringFrequencyBeforeDepositPeriod(); + * final boolean recurringFrequencyBeforeDepositPeriod = recurringFrequencyBeforeDepositPeriod(); * * if (!recurringFrequencyBeforeDepositPeriod) { * baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode( diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java index 27b2d9b77..8e9ef3187 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java @@ -220,11 +220,9 @@ public class SavingsAccount extends AbstractPersistableCustom { protected BigDecimal nominalAnnualInterestRate; /** - * The interest period is the span of time at the end of which savings in a - * client's account earn interest. + * The interest period is the span of time at the end of which savings in a client's account earn interest. * - * A value from the {@link SavingsCompoundingInterestPeriodType} - * enumeration. + * A value from the {@link SavingsCompoundingInterestPeriodType} enumeration. */ @Column(name = "interest_compounding_period_enum", nullable = false) protected Integer interestCompoundingPeriodType; @@ -242,8 +240,7 @@ public class SavingsAccount extends AbstractPersistableCustom { protected Integer interestCalculationType; /** - * A value from the {@link SavingsInterestCalculationDaysInYearType} - * enumeration. + * A value from the {@link SavingsInterestCalculationDaysInYearType} enumeration. */ @Column(name = "interest_calculation_days_in_year_type_enum", nullable = false) protected Integer interestCalculationDaysInYearType; @@ -258,8 +255,7 @@ public class SavingsAccount extends AbstractPersistableCustom { protected Integer lockinPeriodFrequencyType; /** - * When account becomes active this field is derived if - * lockinPeriodFrequency and + * When account becomes active this field is derived if lockinPeriodFrequency and * lockinPeriodFrequencyType details are present. */ @Temporal(TemporalType.DATE) @@ -433,9 +429,8 @@ public class SavingsAccount extends AbstractPersistableCustom { } /** - * Used after fetching/hydrating a {@link SavingsAccount} object to inject - * helper services/components used for update summary details after - * events/transactions on a {@link SavingsAccount}. + * Used after fetching/hydrating a {@link SavingsAccount} object to inject helper services/components used for + * update summary details after events/transactions on a {@link SavingsAccount}. */ public void setHelpers(final SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper, final SavingsHelper savingsHelper) { @@ -676,16 +671,13 @@ public class SavingsAccount extends AbstractPersistableCustom { /** * All interest calculation based on END-OF-DAY-BALANCE. * - * Interest calculation is performed on-the-fly over all account - * transactions. + * Interest calculation is performed on-the-fly over all account transactions. * * - * 1. Calculate Interest From Beginning Of Account 1a. determine the - * 'crediting' periods that exist for this savings acccount 1b. determine - * the 'compounding' periods that exist within each 'crediting' period - * calculate the amount of interest due at the end of each 'crediting' - * period check if an existing 'interest posting' transaction exists for - * date and matches the amount posted + * 1. Calculate Interest From Beginning Of Account 1a. determine the 'crediting' periods that exist for this savings + * acccount 1b. determine the 'compounding' periods that exist within each 'crediting' period calculate the amount + * of interest due at the end of each 'crediting' period check if an existing 'interest posting' transaction exists + * for date and matches the amount posted * * @param isInterestTransfer * TODO @@ -1107,9 +1099,8 @@ public class SavingsAccount extends AbstractPersistableCustom { } /* - * Loop through the onHold funds and see if we need to deduct or add - * to minimum required balance and the point in time the transaction - * was made: + * Loop through the onHold funds and see if we need to deduct or add to minimum required balance and the + * point in time the transaction was made: */ if (depositAccountOnHoldTransactions != null) { for (final DepositAccountOnHoldTransaction onHoldTransaction : depositAccountOnHoldTransactions) { @@ -1169,9 +1160,8 @@ public class SavingsAccount extends AbstractPersistableCustom { } /* - * Loop through the onHold funds and see if we need to deduct or add - * to minimum required balance and the point in time the transaction - * was made: + * Loop through the onHold funds and see if we need to deduct or add to minimum required balance and the + * point in time the transaction was made: */ if (depositAccountOnHoldTransactions != null) { for (final DepositAccountOnHoldTransaction onHoldTransaction : depositAccountOnHoldTransactions) { @@ -1451,8 +1441,7 @@ public class SavingsAccount extends AbstractPersistableCustom { } /** - * If overdrafts are allowed and the overdraft limit is not set, set the - * same to Zero + * If overdrafts are allowed and the overdraft limit is not set, set the same to Zero **/ private void esnureOverdraftLimitsSetForOverdraftAccounts() { @@ -1466,9 +1455,8 @@ public class SavingsAccount extends AbstractPersistableCustom { private void validateLockinDetails(final DataValidatorBuilder baseDataValidator) { /* - * final List dataValidationErrors = new - * ArrayList(); final DataValidatorBuilder - * baseDataValidator = new DataValidatorBuilder(dataValidationErrors) + * final List dataValidationErrors = new ArrayList(); final + * DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors) * .resource(resourceName); */ @@ -2185,8 +2173,7 @@ public class SavingsAccount extends AbstractPersistableCustom { this.lockedInUntilDate = calculateDateAccountIsLockedUntil(getActivationLocalDate()); /* - * if (annualFeeSettingsSet()) { - * updateToNextAnnualFeeDueDateFrom(getActivationLocalDate()); } + * if (annualFeeSettingsSet()) { updateToNextAnnualFeeDueDateFrom(getActivationLocalDate()); } */ if (this.client != null && this.client.isActivatedAfter(activationDate)) { final DateTimeFormatter formatter = DateTimeFormat.forPattern(command.dateFormat()).withLocale(command.extractLocale()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountAssembler.java index c57e810b0..6642baf32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountAssembler.java @@ -109,9 +109,8 @@ public class SavingsAccountAssembler { } /** - * Assembles a new {@link SavingsAccount} from JSON details passed in - * request inheriting details where relevant from chosen - * {@link SavingsProduct}. + * Assembles a new {@link SavingsAccount} from JSON details passed in request inheriting details where relevant from + * chosen {@link SavingsProduct}. */ public SavingsAccount assembleFrom(final JsonCommand command, final AppUser submittedBy) { @@ -319,9 +318,8 @@ public class SavingsAccountAssembler { } /** - * Assembles a new {@link SavingsAccount} from JSON details passed in - * request inheriting details where relevant from chosen - * {@link SavingsProduct}. + * Assembles a new {@link SavingsAccount} from JSON details passed in request inheriting details where relevant from + * chosen {@link SavingsProduct}. */ public SavingsAccount assembleFrom(final Client client, final Group group, final Long productId, final LocalDate appliedonDate, final AppUser appliedBy) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java index a447503f1..76364a637 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java @@ -193,8 +193,7 @@ public class SavingsAccountCharge extends AbstractPersistableCustom { defaultUserMessage, chargeDefinition.getId(), chargeDefinition.getName()); } /** - * For Weekly fee feeOnDay is ISO standard day of the week. - * Monday=1, Tuesday=2 + * For Weekly fee feeOnDay is ISO standard day of the week. Monday=1, Tuesday=2 */ this.feeOnDay = dueDate.getDayOfWeek(); } else { @@ -858,11 +857,9 @@ public class SavingsAccountCharge extends AbstractPersistableCustom { } /** - * This method is to identify the charges which can override the savings - * rules(for example if there is a minimum enforced balance of 1000 on - * savings account with account balance of 1000, still these charges can be - * collected as these charges are initiated by system and it can bring down - * the balance below the enforced minimum balance). + * This method is to identify the charges which can override the savings rules(for example if there is a minimum + * enforced balance of 1000 on savings account with account balance of 1000, still these charges can be collected as + * these charges are initiated by system and it can bring down the balance below the enforced minimum balance). * */ public boolean canOverriteSavingAccountRules() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargeRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargeRepositoryWrapper.java index 1f8b9ead3..88af69c4c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargeRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargeRepositoryWrapper.java @@ -26,8 +26,7 @@ import org.springframework.stereotype.Service; /** *

              - * Wrapper for {@link SavingsAccountChargeRepository} that adds NULL checking - * and Error handling capabilities + * Wrapper for {@link SavingsAccountChargeRepository} that adds NULL checking and Error handling capabilities *

              */ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountRepositoryWrapper.java index 26b0de2a9..2ce045b60 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountRepositoryWrapper.java @@ -30,14 +30,13 @@ import org.springframework.transaction.annotation.Transactional; /** *

              - * Wrapper for {@link SavingsAccountRepository} that is responsible for checking - * if {@link SavingsAccount} is returned when using findOne - * repository method and throwing an appropriate not found exception. + * Wrapper for {@link SavingsAccountRepository} that is responsible for checking if {@link SavingsAccount} is returned + * when using findOne repository method and throwing an appropriate not found exception. *

              * *

              - * This is to avoid need for checking and throwing in multiple areas of code - * base where {@link SavingsAccountRepository} is required. + * This is to avoid need for checking and throwing in multiple areas of code base where {@link SavingsAccountRepository} + * is required. *

              */ @Service diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountSummary.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountSummary.java index 557f9b74a..a15debd19 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountSummary.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountSummary.java @@ -33,8 +33,7 @@ import org.apache.fineract.portfolio.savings.domain.interest.PostingPeriod; import org.joda.time.LocalDate; /** - * {@link SavingsAccountSummary} encapsulates all the summary details of a - * {@link SavingsAccount}. + * {@link SavingsAccountSummary} encapsulates all the summary details of a {@link SavingsAccount}. */ @Embeddable public final class SavingsAccountSummary { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransaction.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransaction.java index 5bb221f4b..bee444f50 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransaction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransaction.java @@ -55,8 +55,7 @@ import org.joda.time.LocalDate; import org.springframework.util.CollectionUtils; /** - * All monetary transactions against a savings account are modelled through this - * entity. + * All monetary transactions against a savings account are modelled through this entity. */ @Entity @Table(name = "m_savings_account_transaction") @@ -480,9 +479,8 @@ public final class SavingsAccountTransaction extends AbstractPersistableCustom { } /*** - * Sending data in a map, though in savings we currently expect a - * transaction to always repay a single charge (or may repay a part of a - * single charge too) + * Sending data in a map, though in savings we currently expect a transaction to always repay a single charge + * (or may repay a part of a single charge too) ***/ if (!this.savingsAccountChargesPaid.isEmpty()) { final List> savingsChargesPaidData = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionComparator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionComparator.java index 8fa1d6a60..e72028d99 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionComparator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionComparator.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.savings.domain; import java.util.Comparator; /** - * Sort savings account transactions by transaction date and transaction type - * placing + * Sort savings account transactions by transaction date and transaction type placing */ public class SavingsAccountTransactionComparator implements Comparator { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionSummaryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionSummaryWrapper.java index d72a2b1e1..51f1c639a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionSummaryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionSummaryWrapper.java @@ -25,8 +25,8 @@ import org.apache.fineract.organisation.monetary.domain.Money; import org.springframework.stereotype.Component; /** - * A wrapper for dealing with side-effect free functionality related to a - * {@link SavingsAccount}'s {@link SavingsAccountTransaction}'s. + * A wrapper for dealing with side-effect free functionality related to a {@link SavingsAccount}'s + * {@link SavingsAccountTransaction}'s. */ @Component public final class SavingsAccountTransactionSummaryWrapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsProduct.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsProduct.java index 8af02b9e1..b736fa2eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsProduct.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsProduct.java @@ -114,11 +114,9 @@ public class SavingsProduct extends AbstractPersistableCustom { protected BigDecimal nominalAnnualInterestRate; /** - * The interest period is the span of time at the end of which savings in a - * client's account earn interest. + * The interest period is the span of time at the end of which savings in a client's account earn interest. * - * A value from the {@link SavingsCompoundingInterestPeriodType} - * enumeration. + * A value from the {@link SavingsCompoundingInterestPeriodType} enumeration. */ @Column(name = "interest_compounding_period_enum", nullable = false) protected Integer interestCompoundingPeriodType; @@ -136,8 +134,7 @@ public class SavingsProduct extends AbstractPersistableCustom { protected Integer interestCalculationType; /** - * A value from the {@link SavingsInterestCalculationDaysInYearType} - * enumeration. + * A value from the {@link SavingsInterestCalculationDaysInYearType} enumeration. */ @Column(name = "interest_calculation_days_in_year_type_enum", nullable = false) protected Integer interestCalculationDaysInYearType; @@ -312,8 +309,7 @@ public class SavingsProduct extends AbstractPersistableCustom { } /** - * If overdrafts are allowed and the overdraft limit is not set, set the - * same to Zero + * If overdrafts are allowed and the overdraft limit is not set, set the same to Zero **/ private void esnureOverdraftLimitsSetForOverdraftAccounts() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestHelper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestHelper.java index 0d026cb47..777d7b2e4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestHelper.java @@ -30,12 +30,11 @@ public class CompoundInterestHelper { * @param currency * @param allPeriods * @param lockUntil - * - account locked date used with the combination of - * immediateWithdrawalOfInterest to avoid exclusion of + * - account locked date used with the combination of immediateWithdrawalOfInterest to avoid exclusion of * interestEarned * @param interestTransferEnabled - * - boolean flag used to avoid addition of interest to next - * posting period as income while calculating interest + * - boolean flag used to avoid addition of interest to next posting period as income while calculating + * interest * @return */ public Money calculateInterestForAllPostingPeriods(final MonetaryCurrency currency, final List allPeriods, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/EndOfDayBalance.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/EndOfDayBalance.java index 16e6b73be..14f313e51 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/EndOfDayBalance.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/EndOfDayBalance.java @@ -90,9 +90,8 @@ public class EndOfDayBalance { /** * Future Value (FV) = PV x (1+r)^n * - * Interest = FV - PV PV = Principal or the Account Balance r = rate per - * compounding period (so for daily, r = nominalInterestRateAsFraction x - * 1/365 n = number of periods rate is compounded + * Interest = FV - PV PV = Principal or the Account Balance r = rate per compounding period (so for daily, r = + * nominalInterestRateAsFraction x 1/365 n = number of periods rate is compounded */ public BigDecimal calculateInterestOnBalanceAndInterest(final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, @@ -132,9 +131,8 @@ public class EndOfDayBalance { /** * @param compoundingPeriodInterval * @param upToInterestCalculationDate - * : For calculating maturity details in advance - * upToInterestCalculationDate will be maturity date else it will - * be DateUtils.getLocalDateOfTenant(). + * : For calculating maturity details in advance upToInterestCalculationDate will be maturity date else + * it will be DateUtils.getLocalDateOfTenant(). * @return */ public EndOfDayBalance upTo(final LocalDateInterval compoundingPeriodInterval, final LocalDate upToInterestCalculationDate) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java index f0f057e91..257b81a64 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java @@ -436,10 +436,9 @@ public final class PostingPeriod { } boolean notInRange = true; /* - * if strt date is 2016-10-05 if financial year set to 4 then applicable - * month will be march and september that is (3,9) if start date fall in - * month of oct,nov or dec then month will be 10, 11 or 12 so period end - * date should be taken from next year for march month + * if strt date is 2016-10-05 if financial year set to 4 then applicable month will be march and september that + * is (3,9) if start date fall in month of oct,nov or dec then month will be 10, 11 or 12 so period end date + * should be taken from next year for march month */ for (Integer month : monthSet) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/DepositAccountTransactionNotAllowedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/DepositAccountTransactionNotAllowedException.java index 997051236..1c9b8aeda 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/DepositAccountTransactionNotAllowedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/DepositAccountTransactionNotAllowedException.java @@ -23,8 +23,7 @@ import org.apache.fineract.portfolio.savings.DepositAccountType; import org.apache.fineract.portfolio.savings.service.SavingsEnumerations; /** - * A {@link RuntimeException} thrown when deposit account transaction not - * allowed. + * A {@link RuntimeException} thrown when deposit account transaction not allowed. */ public class DepositAccountTransactionNotAllowedException extends AbstractPlatformServiceUnavailableException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/InsufficientAccountBalanceException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/InsufficientAccountBalanceException.java index f7194fe0a..f76474ad9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/InsufficientAccountBalanceException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/InsufficientAccountBalanceException.java @@ -22,8 +22,7 @@ import java.math.BigDecimal; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * Thrown when an attempt is made to withdraw money that is greater than the - * account balance. + * Thrown when an attempt is made to withdraw money that is greater than the account balance. */ public class InsufficientAccountBalanceException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/SavingsActivityPriorToClientTransferException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/SavingsActivityPriorToClientTransferException.java index 7c4b7d59a..aba18965d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/SavingsActivityPriorToClientTransferException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/SavingsActivityPriorToClientTransferException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.savings.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown an action to transition a - * loan from one state to another violates a domain rule. + * {@link AbstractPlatformDomainRuleException} thrown an action to transition a loan from one state to another violates + * a domain rule. */ public class SavingsActivityPriorToClientTransferException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/SavingsTransferTransactionsCannotBeUndoneException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/SavingsTransferTransactionsCannotBeUndoneException.java index 2179302e4..faef461fe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/SavingsTransferTransactionsCannotBeUndoneException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/exception/SavingsTransferTransactionsCannotBeUndoneException.java @@ -21,8 +21,8 @@ package org.apache.fineract.portfolio.savings.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown an action to transition a - * loan from one state to another violates a domain rule. + * {@link AbstractPlatformDomainRuleException} thrown an action to transition a loan from one state to another violates + * a domain rule. */ public class SavingsTransferTransactionsCannotBeUndoneException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java index 6f6d93a31..56b5b3ca6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java @@ -322,23 +322,20 @@ public class DepositAccountInterestRateChartReadPlatformServiceImpl implements D * * public String schema() { return this.schemaSql; } * - * private DepositAccountInterestRateChartSlabsMapper() { final - * StringBuilder sqlBuilder = new StringBuilder(400); + * private DepositAccountInterestRateChartSlabsMapper() { final StringBuilder sqlBuilder = new + * StringBuilder(400); * * sqlBuilder .append( - * "ircd.id as ircdId, ircd.description as ircdDescription, ircd.period_type_enum ircdPeriodTypeId, " - * ) .append( + * "ircd.id as ircdId, ircd.description as ircdDescription, ircd.period_type_enum ircdPeriodTypeId, " ) .append( * "ircd.from_period as ircdFromPeriod, ircd.to_period as ircdToPeriod, ircd.amount_range_from as ircdAmountRangeFrom, " - * ) .append( - * "ircd.amount_range_to as ircdAmountRangeTo, ircd.annual_interest_rate as ircdAnnualInterestRate, " + * ) .append( "ircd.amount_range_to as ircdAmountRangeTo, ircd.annual_interest_rate as ircdAnnualInterestRate, " * ) .append( * "curr.code as currencyCode, curr.name as currencyName, curr.internationalized_name_code as currencyNameCode, " * ) .append( * "curr.display_symbol as currencyDisplaySymbol, curr.decimal_places as currencyDigits, curr.currency_multiplesof as inMultiplesOf " - * ) .append("from ").append( - * "m_savings_account_interest_rate_slab ircd ") - * .append("left join m_currency curr on ircd.currency_code= curr.code " - * ); this.schemaSql = sqlBuilder.toString(); } + * ) .append("from ").append( "m_savings_account_interest_rate_slab ircd ") + * .append("left join m_currency curr on ircd.currency_code= curr.code " ); this.schemaSql = + * sqlBuilder.toString(); } */ @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java index 8bac0c01d..2fd008008 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java @@ -165,8 +165,7 @@ public class DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl impl } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java index 84e39f92d..c14f05d98 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java @@ -34,20 +34,14 @@ public class DepositsDropdownReadPlatformServiceImpl implements DepositsDropdown } /* - * @Override public Collection - * retrieveDepositTermTypeOptions() { return - * SavingsEnumerations.recurringDepositFrequencyType - * (SavingsPeriodFrequencyType.values()); } + * @Override public Collection retrieveDepositTermTypeOptions() { return + * SavingsEnumerations.recurringDepositFrequencyType (SavingsPeriodFrequencyType.values()); } * - * @Override public Collection - * retrieveDepositPeriodFrequencyOptions() { return - * SavingsEnumerations.depositPeriodFrequency - * (SavingsPeriodFrequencyType.values()); } + * @Override public Collection retrieveDepositPeriodFrequencyOptions() { return + * SavingsEnumerations.depositPeriodFrequency (SavingsPeriodFrequencyType.values()); } * - * @Override public Collection - * retrieveInMultiplesOfDepositTermTypeOptions() { return - * SavingsEnumerations - * .recurringDepositFrequencyType(SavingsPeriodFrequencyType.values()); } + * @Override public Collection retrieveInMultiplesOfDepositTermTypeOptions() { return + * SavingsEnumerations .recurringDepositFrequencyType(SavingsPeriodFrequencyType.values()); } */ @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java index c79e07807..b120d7480 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java @@ -184,8 +184,7 @@ public class FixedDepositProductWritePlatformServiceJpaRepositoryImpl implements } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dae) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java index 85adc3294..d53de7aa1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java @@ -184,8 +184,7 @@ public class RecurringDepositProductWritePlatformServiceJpaRepositoryImpl implem } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dae) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java index 3fc762e9d..941a48196 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java @@ -464,14 +464,11 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead } /* - * final BigDecimal withdrawalFeeAmount = - * rs.getBigDecimal("withdrawalFeeAmount"); + * final BigDecimal withdrawalFeeAmount = rs.getBigDecimal("withdrawalFeeAmount"); * - * EnumOptionData withdrawalFeeType = null; final Integer - * withdrawalFeeTypeValue = JdbcSupport.getInteger(rs, - * "withdrawalFeeTypeEnum"); if (withdrawalFeeTypeValue != null) { - * withdrawalFeeType = - * SavingsEnumerations.withdrawalFeeType(withdrawalFeeTypeValue); } + * EnumOptionData withdrawalFeeType = null; final Integer withdrawalFeeTypeValue = + * JdbcSupport.getInteger(rs, "withdrawalFeeTypeEnum"); if (withdrawalFeeTypeValue != null) { + * withdrawalFeeType = SavingsEnumerations.withdrawalFeeType(withdrawalFeeTypeValue); } */ final boolean withdrawalFeeForTransfers = rs.getBoolean("withdrawalFeeForTransfers"); @@ -487,19 +484,14 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead final boolean enforceMinRequiredBalance = rs.getBoolean("enforceMinRequiredBalance"); /* - * final BigDecimal annualFeeAmount = - * JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, - * "annualFeeAmount"); + * final BigDecimal annualFeeAmount = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "annualFeeAmount"); * - * MonthDay annualFeeOnMonthDay = null; final Integer - * annualFeeOnMonth = JdbcSupport.getInteger(rs, - * "annualFeeOnMonth"); final Integer annualFeeOnDay = - * JdbcSupport.getInteger(rs, "annualFeeOnDay"); if (annualFeeAmount - * != null && annualFeeOnDay != null) { annualFeeOnMonthDay = new + * MonthDay annualFeeOnMonthDay = null; final Integer annualFeeOnMonth = JdbcSupport.getInteger(rs, + * "annualFeeOnMonth"); final Integer annualFeeOnDay = JdbcSupport.getInteger(rs, "annualFeeOnDay"); if + * (annualFeeAmount != null && annualFeeOnDay != null) { annualFeeOnMonthDay = new * MonthDay(annualFeeOnMonth, annualFeeOnDay); } * - * final LocalDate annualFeeNextDueDate = - * JdbcSupport.getLocalDate(rs, "annualFeeNextDueDate"); + * final LocalDate annualFeeNextDueDate = JdbcSupport.getLocalDate(rs, "annualFeeNextDueDate"); */ final BigDecimal totalDeposits = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalDeposits"); final BigDecimal totalWithdrawals = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalWithdrawals"); @@ -770,14 +762,11 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead } /* - * @Override public Collection - * retrieveAccountsWithAnnualFeeDue() { final String sql = "select " + - * this.annualFeeMapper.schema() + - * " where sa.annual_fee_next_due_date is not null and sa.annual_fee_next_due_date <= NOW()" - * ; + * @Override public Collection retrieveAccountsWithAnnualFeeDue() { final String sql = + * "select " + this.annualFeeMapper.schema() + + * " where sa.annual_fee_next_due_date is not null and sa.annual_fee_next_due_date <= NOW()" ; * - * return this.jdbcTemplate.query(sql, this.annualFeeMapper, new Object[] - * {}); } + * return this.jdbcTemplate.query(sql, this.annualFeeMapper, new Object[] {}); } */ private static final class SavingsAccountTransactionsMapper implements RowMapper { @@ -1033,11 +1022,9 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead // rs.getBigDecimal("withdrawalFeeAmount"); /* - * EnumOptionData withdrawalFeeType = null; final Integer - * withdrawalFeeTypeValue = JdbcSupport.getInteger(rs, - * "withdrawalFeeTypeEnum"); if (withdrawalFeeTypeValue != null) { - * withdrawalFeeType = - * SavingsEnumerations.withdrawalFeeType(withdrawalFeeTypeValue); } + * EnumOptionData withdrawalFeeType = null; final Integer withdrawalFeeTypeValue = + * JdbcSupport.getInteger(rs, "withdrawalFeeTypeEnum"); if (withdrawalFeeTypeValue != null) { + * withdrawalFeeType = SavingsEnumerations.withdrawalFeeType(withdrawalFeeTypeValue); } */ final boolean withdrawalFeeForTransfers = rs.getBoolean("withdrawalFeeForTransfers"); @@ -1058,11 +1045,9 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead // "annualFeeAmount"); /* - * MonthDay annualFeeOnMonthDay = null; final Integer - * annualFeeOnMonth = JdbcSupport.getInteger(rs, - * "annualFeeOnMonth"); final Integer annualFeeOnDay = - * JdbcSupport.getInteger(rs, "annualFeeOnDay"); if (annualFeeAmount - * != null && annualFeeOnDay != null) { annualFeeOnMonthDay = new + * MonthDay annualFeeOnMonthDay = null; final Integer annualFeeOnMonth = JdbcSupport.getInteger(rs, + * "annualFeeOnMonth"); final Integer annualFeeOnDay = JdbcSupport.getInteger(rs, "annualFeeOnDay"); if + * (annualFeeAmount != null && annualFeeOnDay != null) { annualFeeOnMonthDay = new * MonthDay(annualFeeOnMonth, annualFeeOnDay); } */ @@ -1222,17 +1207,13 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead } } /* - * private static final class SavingsAccountAnnualFeeMapper implements - * RowMapper { + * private static final class SavingsAccountAnnualFeeMapper implements RowMapper { * * private final String schemaSql; * - * public SavingsAccountAnnualFeeMapper() { final StringBuilder sqlBuilder = - * new StringBuilder(200); - * sqlBuilder.append("sa.id as id, sa.account_no as accountNo, "); - * sqlBuilder - * .append("sa.annual_fee_next_due_date as annualFeeNextDueDate "); - * sqlBuilder.append("from m_savings_account sa "); + * public SavingsAccountAnnualFeeMapper() { final StringBuilder sqlBuilder = new StringBuilder(200); + * sqlBuilder.append("sa.id as id, sa.account_no as accountNo, "); sqlBuilder + * .append("sa.annual_fee_next_due_date as annualFeeNextDueDate "); sqlBuilder.append("from m_savings_account sa "); * * this.schemaSql = sqlBuilder.toString(); } * @@ -1242,12 +1223,10 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead * * @SuppressWarnings("unused") final int rowNum) throws SQLException { * - * final Long id = rs.getLong("id"); final String accountNo = - * rs.getString("accountNo"); final LocalDate annualFeeNextDueDate = - * JdbcSupport.getLocalDate(rs, "annualFeeNextDueDate"); + * final Long id = rs.getLong("id"); final String accountNo = rs.getString("accountNo"); final LocalDate + * annualFeeNextDueDate = JdbcSupport.getLocalDate(rs, "annualFeeNextDueDate"); * - * return SavingsAccountAnnualFeeData.instance(id, accountNo, - * annualFeeNextDueDate); } } + * return SavingsAccountAnnualFeeData.instance(id, accountNo, annualFeeNextDueDate); } } */ @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java index 8b3afbcf9..04c7cd6e3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java @@ -1526,8 +1526,7 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi } /** - * Disable all standing instructions linked to the savings account if the - * status is "closed" + * Disable all standing instructions linked to the savings account if the status is "closed" * * @param savingsAccount * -- the savings account object diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java index 56e5fda16..b14b40762 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java @@ -159,8 +159,7 @@ public class SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl impl } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java index f59f0dc1a..023d0ea01 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java @@ -82,8 +82,7 @@ public class SavingsProductWritePlatformServiceJpaRepositoryImpl implements Savi } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dae) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/exception/TaxMappingNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/exception/TaxMappingNotFoundException.java index 829ae9722..9f4f21927 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/exception/TaxMappingNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/exception/TaxMappingNotFoundException.java @@ -22,8 +22,7 @@ import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainR import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * {@link AbstractPlatformDomainRuleException} thrown when tax group mapping - * does not exist. + * {@link AbstractPlatformDomainRuleException} thrown when tax group mapping does not exist. */ public class TaxMappingNotFoundException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/TransferNotSupportedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/TransferNotSupportedException.java index f6638c91b..317bf1cf6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/TransferNotSupportedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/TransferNotSupportedException.java @@ -21,8 +21,7 @@ package org.apache.fineract.portfolio.transfer.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** - * {@link AbstractPlatformDomainRuleException} thrown when not supported loan - * template type is sent. + * {@link AbstractPlatformDomainRuleException} thrown when not supported loan template type is sent. */ public class TransferNotSupportedException extends AbstractPlatformDomainRuleException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformServiceJpaRepositoryImpl.java index 6fc887ab1..834694eab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformServiceJpaRepositoryImpl.java @@ -153,8 +153,8 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr * Variables that would make sense
              *
                *
              • inheritDestinationGroupLoanOfficer: Default true
              • - *
              • newStaffId: Optional field with Id of new Loan Officer to be linked - * to this client and all his JLG loans for this group
              • + *
              • newStaffId: Optional field with Id of new Loan Officer to be linked to this client and all his JLG loans for + * this group
              • *
              ***/ @Transactional @@ -171,8 +171,8 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr } /** - * TODO: for now we need to ensure that only one collection sheet - * calendar can be linked with a center or group entity
              + * TODO: for now we need to ensure that only one collection sheet calendar can be linked with a center or group + * entity
              **/ final CalendarInstance sourceGroupCalendarInstance = this.calendarInstanceRepository.findByEntityIdAndEntityTypeIdAndCalendarTypeId( sourceGroup.getId(), CalendarEntityType.GROUPS.getValue(), CalendarType.COLLECTION.getValue()); @@ -181,9 +181,8 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr .findCalendarInstancesForActiveLoansByGroupIdAndClientId(sourceGroup.getId(), client.getId()); /** - * if a calendar is present in the source group along with loans synced - * with it, we should ensure that the destination group also has a - * collection calendar + * if a calendar is present in the source group along with loans synced with it, we should ensure that the + * destination group also has a collection calendar **/ if (sourceGroupCalendarInstance != null && !activeLoanCalendarInstances.isEmpty()) { // get the destination calendar @@ -200,8 +199,8 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr final Calendar destinationGroupCalendar = destinationGroupCalendarInstance.getCalendar(); /*** - * Ensure that the recurrence pattern are same for collection - * meeting in both the source and the destination calendar + * Ensure that the recurrence pattern are same for collection meeting in both the source and the destination + * calendar ***/ if (!(CalendarUtils.isFrequencySame(sourceGroupCalendar.getRecurrence(), destinationGroupCalendar.getRecurrence()) && CalendarUtils.isIntervalSame(sourceGroupCalendar.getRecurrence(), destinationGroupCalendar.getRecurrence()))) { @@ -219,8 +218,7 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr } /** - * Now Change the loan officer for this client and all his active JLG - * loans + * Now Change the loan officer for this client and all his active JLG loans **/ final Staff destinationGroupLoanOfficer = destinationGroup.getStaff(); @@ -255,8 +253,8 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr } /** - * change client group membership (only if source group and destination - * group are not the same, i.e only Loan officer Transfer) + * change client group membership (only if source group and destination group are not the same, i.e only Loan + * officer Transfer) **/ if (!sourceGroup.getId().equals(destinationGroup.getId())) { client.getGroups().remove(sourceGroup); @@ -265,8 +263,8 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr } /** - * This API is meant for transferring clients between branches mainly by - * Organizations following an Individual lending Model
              + * This API is meant for transferring clients between branches mainly by Organizations following an Individual + * lending Model
              * * @param clientId * @param jsonCommand @@ -293,11 +291,10 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr } /** - * This API is meant for transferring clients between branches mainly by - * Organizations following an Individual lending Model
              - * If the Client is linked to any Groups, we can optionally choose to have - * all the linkages broken and all JLG Loans are converted into Individual - * Loans + * This API is meant for transferring clients between branches mainly by Organizations following an Individual + * lending Model
              + * If the Client is linked to any Groups, we can optionally choose to have all the linkages broken and all JLG Loans + * are converted into Individual Loans * * @param clientId * @param jsonCommand @@ -326,11 +323,10 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr } /** - * This API is meant for transferring clients between branches mainly by - * Organizations following an Individual lending Model
              - * If the Client is linked to any Groups, we can optionally choose to have - * all the linkages broken and all JLG Loans are converted into Individual - * Loans + * This API is meant for transferring clients between branches mainly by Organizations following an Individual + * lending Model
              + * If the Client is linked to any Groups, we can optionally choose to have all the linkages broken and all JLG Loans + * are converted into Individual Loans * * @param clientId * @param jsonCommand @@ -403,8 +399,7 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr // get each individual loan for the client for (final Loan loan : this.loanRepositoryWrapper.findLoanByClientId(client.getId())) { /** - * We need to create transactions etc only for loans which are - * disbursed and not yet closed + * We need to create transactions etc only for loans which are disbursed and not yet closed **/ if (loan.isDisbursed() && !loan.isClosed()) { switch (transferEventType) { @@ -528,9 +523,8 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr } /** - * private void validateGroupAwaitingTransferAcceptance(final Group group) { - * if (!group.isTransferInProgress()) { throw new - * ClientNotAwaitingTransferApprovalException(group.getId()); } } + * private void validateGroupAwaitingTransferAcceptance(final Group group) { if (!group.isTransferInProgress()) { + * throw new ClientNotAwaitingTransferApprovalException(group.getId()); } } **/ private void validateClientAwaitingTransferAcceptanceOnHold(final Client client) { @@ -540,9 +534,9 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr } /** - * private void validateGroupAwaitingTransferAcceptanceOnHold(final Group - * group) { if (!group.isTransferInProgressOrOnHold()) { throw new - * ClientNotAwaitingTransferApprovalException(group.getId()); } } + * private void validateGroupAwaitingTransferAcceptanceOnHold(final Group group) { if + * (!group.isTransferInProgressOrOnHold()) { throw new ClientNotAwaitingTransferApprovalException(group.getId()); } + * } **/ } diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java b/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java index 68bcdff12..c9c6c23a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java @@ -39,8 +39,7 @@ public class TrustModifier { private static SSLSocketFactory factory; /** - * Call this with any HttpURLConnection, and it will modify the trust - * settings if it is an HTTPS connection. + * Call this with any HttpURLConnection, and it will modify the trust settings if it is an HTTPS connection. */ public static void relaxHostChecking(final HttpURLConnection conn) throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java index cabfd4c72..b154e5031 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java @@ -74,8 +74,7 @@ import org.springframework.stereotype.Component; public class UsersApiResource { /** - * The set of parameters that are supported in response for - * {@link AppUserData}. + * The set of parameters that are supported in response for {@link AppUserData}. */ private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "officeId", "officeName", "username", "firstname", "lastname", "email", "allowedOffices", "availableRoles", "selectedRoles", "staff")); diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java index 0eb20f31a..4119f750a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java @@ -338,8 +338,7 @@ public class AppUser extends AbstractPersistableCustom implements PlatformUser { } /** - * Delete is a soft delete. Updates flag so it wont appear in - * query/report results. + * Delete is a soft delete. Updates flag so it wont appear in query/report results. * * Any fields with unique constraints and prepended with id of record. */ diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionCantBeMakerCheckerableException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionCantBeMakerCheckerableException.java index 5c7ffd959..9da77658f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionCantBeMakerCheckerableException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionCantBeMakerCheckerableException.java @@ -21,8 +21,7 @@ package org.apache.fineract.useradministration.exception; import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; /** - * A {@link RuntimeException} thrown when permission is attempted to be set as - * maker-checker enabled. + * A {@link RuntimeException} thrown when permission is attempted to be set as maker-checker enabled. */ public class PermissionCantBeMakerCheckerableException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UnAuthenticatedUserException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UnAuthenticatedUserException.java index 5cf2828f6..742dea73b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UnAuthenticatedUserException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UnAuthenticatedUserException.java @@ -21,8 +21,8 @@ package org.apache.fineract.useradministration.exception; import org.springframework.security.core.context.SecurityContext; /** - * A {@link RuntimeException} that is thrown in the case where no authenticated - * user exists within the platform {@link SecurityContext}. + * A {@link RuntimeException} that is thrown in the case where no authenticated user exists within the platform + * {@link SecurityContext}. */ public class UnAuthenticatedUserException extends RuntimeException { // no added behaviour diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/serialization/PermissionsCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/serialization/PermissionsCommandFromApiJsonDeserializer.java index 8b3d2acc0..37b86982b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/serialization/PermissionsCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/serialization/PermissionsCommandFromApiJsonDeserializer.java @@ -34,8 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * Implementation of {@link FromApiJsonDeserializer} for - * {@link PermissionsCommand}'s. + * Implementation of {@link FromApiJsonDeserializer} for {@link PermissionsCommand}'s. */ @Component public final class PermissionsCommandFromApiJsonDeserializer extends AbstractFromApiJsonDeserializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java index fa12ec1f2..f360dbdc8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java @@ -263,8 +263,8 @@ public class AppUserWritePlatformServiceJpaRepositoryImpl implements AppUserWrit } /** - * encode the new submitted password retrieve the last n used password check - * if the current submitted password, match with one of them + * encode the new submitted password retrieve the last n used password check if the current submitted password, + * match with one of them * * @param user * @param command @@ -333,8 +333,7 @@ public class AppUserWritePlatformServiceJpaRepositoryImpl implements AppUserWrit } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { if (realCause.getMessage().contains("'username_org'")) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformServiceImpl.java index a922176b0..c1b57e9c8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformServiceImpl.java @@ -101,9 +101,8 @@ public class PermissionReadPlatformServiceImpl implements PermissionReadPlatform public String makerCheckerablePermissionSchema() { /* - * get all 'Maker-Checkerable' permissions - Maintenance permissions - * (i.e. exclude the 'special' grouping, the READ permissions and - * the CHECKER permissions + * get all 'Maker-Checkerable' permissions - Maintenance permissions (i.e. exclude the 'special' grouping, + * the READ permissions and the CHECKER permissions */ return "select p.grouping, p.code, p.entity_name as entityName, p.action_name as actionName, p.can_maker_checker as selected" diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformServiceJpaRepositoryImpl.java index 996bd0442..10086e34f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformServiceJpaRepositoryImpl.java @@ -100,8 +100,7 @@ public class RoleWritePlatformServiceJpaRepositoryImpl implements RoleWritePlatf } /* - * Guaranteed to throw an exception no matter what the data integrity issue - * is. + * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) { diff --git a/fineract-provider/src/test/java/org/apache/fineract/batch/BatchBuilder.java b/fineract-provider/src/test/java/org/apache/fineract/batch/BatchBuilder.java index 7acb3a9bf..964015969 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/batch/BatchBuilder.java +++ b/fineract-provider/src/test/java/org/apache/fineract/batch/BatchBuilder.java @@ -29,8 +29,7 @@ import org.junit.jupiter.api.Test; import org.mockito.Mockito; /** - * Runs a unit test for BatchApiResource by mocking the BatchRequest and - * BatchApiService objects. + * Runs a unit test for BatchApiResource by mocking the BatchRequest and BatchApiService objects. * * @author Rishabh Shukla */ diff --git a/fineract-provider/src/test/java/org/apache/fineract/common/RestAssuredFixture.java b/fineract-provider/src/test/java/org/apache/fineract/common/RestAssuredFixture.java index 38f9db092..91662eda2 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/common/RestAssuredFixture.java +++ b/fineract-provider/src/test/java/org/apache/fineract/common/RestAssuredFixture.java @@ -27,10 +27,9 @@ import io.restassured.specification.RequestSpecification; import io.restassured.specification.ResponseSpecification; /** - * REST integration tests helper. Intended to encapsulate the current - * RestAssured-based implementation as private. May be REST integration tests - * should instead be written using e.g. Spring's TestRestTemplate or Square's - * Retrofit (already used in the Mifos X Android client). + * REST integration tests helper. Intended to encapsulate the current RestAssured-based implementation as private. May + * be REST integration tests should instead be written using e.g. Spring's TestRestTemplate or Square's Retrofit + * (already used in the Mifos X Android client). */ public class RestAssuredFixture { diff --git a/fineract-provider/src/test/java/org/apache/fineract/common/Utils.java b/fineract-provider/src/test/java/org/apache/fineract/common/Utils.java index 99d50b58e..f1cf5c260 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/common/Utils.java +++ b/fineract-provider/src/test/java/org/apache/fineract/common/Utils.java @@ -33,11 +33,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Util for RestAssured tests. This class here in src/test is copy/pasted :( - * from and identical to the one in src/integrationTest; please keep it in sync. - * The cunning plan is that, now that we have Spring Boot + MariaDB4j, - * eventually do completely away with src/integrationTest and have only - * src/test.. can you help? ;) + * Util for RestAssured tests. This class here in src/test is copy/pasted :( from and identical to the one in + * src/integrationTest; please keep it in sync. The cunning plan is that, now that we have Spring Boot + MariaDB4j, + * eventually do completely away with src/integrationTest and have only src/test.. can you help? ;) */ @SuppressWarnings("unchecked") public class Utils { diff --git a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/classdupes/ClasspathHellDuplicatesCheckExtension.java b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/classdupes/ClasspathHellDuplicatesCheckExtension.java index 1e6142adc..ad4f893d1 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/classdupes/ClasspathHellDuplicatesCheckExtension.java +++ b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/classdupes/ClasspathHellDuplicatesCheckExtension.java @@ -33,13 +33,11 @@ import org.opentest4j.AssertionFailedError; * * *

              - * NB that the basepom/duplicate-finder-maven-plugin already runs as part of - * odlparent. It has a similar purpose, but covers build time instead of runtime - * testing. This JUnit Rule class is thus recommended to be used in particular - * in tests which previously ran into JAR Hell issues, and for which - * non-regression with a clear failure message in case of future similar - * problems is important. (This provides more details at runtime than - * duplicate-finder-maven-plugin does at build time.) + * NB that the basepom/duplicate-finder-maven-plugin already runs as part of odlparent. It has a similar purpose, but + * covers build time instead of runtime testing. This JUnit Rule class is thus recommended to be used in particular in + * tests which previously ran into JAR Hell issues, and for which non-regression with a clear failure message in case of + * future similar problems is important. (This provides more details at runtime than duplicate-finder-maven-plugin does + * at build time.) * * @author Michael Vorburger.ch */ diff --git a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/configuration/spring/SpringConfigurationTest.java b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/configuration/spring/SpringConfigurationTest.java index cfb8b3665..a6d23e442 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/configuration/spring/SpringConfigurationTest.java +++ b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/configuration/spring/SpringConfigurationTest.java @@ -26,16 +26,12 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; /** - * This integration test ensure that the "production" Spring XML configuration - * files (appContext.xml & Co.) are valid. It does not need any database for - * that. + * This integration test ensure that the "production" Spring XML configuration files (appContext.xml & Co.) are valid. + * It does not need any database for that. * - * Note: For a simple test like this, contrary to - * AbstractSpringBootWithMariaDB4jIntegrationTest, there is no need to use - * Boot's SpringApplicationConfiguration here, instead the simpler classic Sring - * core ContextConfiguration is sufficient (as long as the - * TestsWithoutDatabaseAndNoJobsConfiguration used extends - * AbstractApplicationConfiguration). + * Note: For a simple test like this, contrary to AbstractSpringBootWithMariaDB4jIntegrationTest, there is no need to + * use Boot's SpringApplicationConfiguration here, instead the simpler classic Sring core ContextConfiguration is + * sufficient (as long as the TestsWithoutDatabaseAndNoJobsConfiguration used extends AbstractApplicationConfiguration). */ @ExtendWith(SpringExtension.class) @WebAppConfiguration @@ -44,11 +40,10 @@ import org.springframework.test.context.web.WebAppConfiguration; public class SpringConfigurationTest { /** - * This tests if "Aal izz well" (i.e. if we can start-up with the [almost] - * "production" Spring XML configuration) by doing nothing - it doesn't have - * to, as the SpringJUnit4ClassRunner with this @ContextConfiguration will - * automatically fail if e.g. there is any invalid Spring XML, an invalid - * bean definition somewhere or anything like that. + * This tests if "Aal izz well" (i.e. if we can start-up with the [almost] "production" Spring XML configuration) by + * doing nothing - it doesn't have to, as the SpringJUnit4ClassRunner with this @ContextConfiguration will + * automatically fail if e.g. there is any invalid Spring XML, an invalid bean definition somewhere or anything like + * that. * * @see https://www.google.ch/search?q=Aal+izz+well */ diff --git a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/configuration/spring/TestsWithoutDatabaseAndNoJobsConfiguration.java b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/configuration/spring/TestsWithoutDatabaseAndNoJobsConfiguration.java index dc4c07f3f..4ce3cb8e2 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/configuration/spring/TestsWithoutDatabaseAndNoJobsConfiguration.java +++ b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/configuration/spring/TestsWithoutDatabaseAndNoJobsConfiguration.java @@ -26,17 +26,15 @@ import org.mockito.Mockito; import org.springframework.context.annotation.Bean; /** - * Spring @Configuration which does not require a running database. It also does - * not load any job configuration (as they are in the DB), thus nor starts any - * background jobs. For some integration tests, this may be perfectly sufficient + * Spring @Configuration which does not require a running database. It also does not load any job configuration (as they + * are in the DB), thus nor starts any background jobs. For some integration tests, this may be perfectly sufficient * (and faster to run such tests). */ public class TestsWithoutDatabaseAndNoJobsConfiguration extends AbstractApplicationConfiguration { /** - * Override TenantDatabaseUpgradeService binding, because the real one has - * a @PostConstruct upgradeAllTenants() which accesses the database on - * start-up. + * Override TenantDatabaseUpgradeService binding, because the real one has a @PostConstruct upgradeAllTenants() + * which accesses the database on start-up. */ @Bean public TenantDatabaseUpgradeService tenantDatabaseUpgradeService() { @@ -50,9 +48,8 @@ public class TestsWithoutDatabaseAndNoJobsConfiguration extends AbstractApplicat } /** - * Override JobRegisterService binding, because the real - * JobRegisterServiceImpl has a @PostConstruct loadAllJobs() which accesses - * the database on start-up. + * Override JobRegisterService binding, because the real JobRegisterServiceImpl has a @PostConstruct loadAllJobs() + * which accesses the database on start-up. */ @Bean public JobRegisterService jobRegisterServiceImpl() { diff --git a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/AdhikarLoanRepaymentScheduleTransactionProcessorTest.java b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/AdhikarLoanRepaymentScheduleTransactionProcessorTest.java index aa2cb7721..37413fe8d 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/AdhikarLoanRepaymentScheduleTransactionProcessorTest.java +++ b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/AdhikarLoanRepaymentScheduleTransactionProcessorTest.java @@ -55,8 +55,7 @@ public class AdhikarLoanRepaymentScheduleTransactionProcessorTest { } /** - * Scenario 1: Given no overdue installments, current interest due is paid - * before principal. + * Scenario 1: Given no overdue installments, current interest due is paid before principal. */ @Test public void givenNoOverdueInstallmentsOnTimeRepaymentPaysOffInterestDueFirst() { diff --git a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/HeavensFamilyLoanRepaymentScheduleTransactionProcessorTest.java b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/HeavensFamilyLoanRepaymentScheduleTransactionProcessorTest.java index 2ad253cb9..738c450d7 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/HeavensFamilyLoanRepaymentScheduleTransactionProcessorTest.java +++ b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/HeavensFamilyLoanRepaymentScheduleTransactionProcessorTest.java @@ -55,13 +55,11 @@ public class HeavensFamilyLoanRepaymentScheduleTransactionProcessorTest { } /** - * Scenario 1: Single transaction which is less than the interest component - * of the first installment. + * Scenario 1: Single transaction which is less than the interest component of the first installment. * - * Expectation: - First installment shows interest completed equal to that - * of transactions, zero principal completed. (payment order interest, - * principal) - transaction has interest portion equal to transaction - * amount, and zero principal portion + * Expectation: - First installment shows interest completed equal to that of transactions, zero principal + * completed. (payment order interest, principal) - transaction has interest portion equal to transaction amount, + * and zero principal portion */ @Test public void givenSingleOnTimeLoanTransactionShouldPayoffInterestComponentFirst() { diff --git a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanProductRelatedDetailTestHelper.java b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanProductRelatedDetailTestHelper.java index c86eda5a3..273235989 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanProductRelatedDetailTestHelper.java +++ b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanProductRelatedDetailTestHelper.java @@ -30,9 +30,8 @@ import org.apache.fineract.portfolio.loanproduct.domain.InterestMethod; import org.apache.fineract.portfolio.loanproduct.domain.LoanProductRelatedDetail; /** - * This class is used to keep in one place configurations for setting up - * {@link LoanProductRelatedDetail} object used in {@link LoanScheduleGenerator} - * 's + * This class is used to keep in one place configurations for setting up {@link LoanProductRelatedDetail} object used in + * {@link LoanScheduleGenerator} 's */ public class LoanProductRelatedDetailTestHelper { diff --git a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanScheduleTestDataHelper.java b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanScheduleTestDataHelper.java index 3108b5d00..873357904 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanScheduleTestDataHelper.java +++ b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanScheduleTestDataHelper.java @@ -34,10 +34,9 @@ public class LoanScheduleTestDataHelper { * * For example: with firstDueDate = 02 July 2011 * - * Date Principal Interest Interest Waived - * ================================== - * ================================================ 02 July 2011 1,000 200 0 - * 02 August 2011 1,000 200 0 02 September 2011 1,000 200 0 + * Date Principal Interest Interest Waived ================================== + * ================================================ 02 July 2011 1,000 200 0 02 August 2011 1,000 200 0 02 September + * 2011 1,000 200 0 */ public static List createSimpleLoanSchedule(final LocalDate firstDueDate, final MonetaryCurrency currency) { @@ -58,12 +57,9 @@ public class LoanScheduleTestDataHelper { * * For example: with firstDueDate = 02 July 2011 * - * Date Principal Interest Interest Waived Completed - * ======================== - * ================================================== - * ====================================== 02 July 2011 1,000 200 0 true - * (principal paid, interest paid) 02 August 2011 1,000 200 0 false 02 - * September 2011 1,000 200 0 false + * Date Principal Interest Interest Waived Completed ======================== + * ================================================== ====================================== 02 July 2011 1,000 200 + * 0 true (principal paid, interest paid) 02 August 2011 1,000 200 0 false 02 September 2011 1,000 200 0 false */ public static List createSimpleLoanScheduleWithFirstInstallmentFullyPaid(final LocalDate firstDueDate, final MonetaryCurrency currency) { diff --git a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanTransactionBuilder.java b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanTransactionBuilder.java index 111058685..2658dc1ef 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanTransactionBuilder.java +++ b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/LoanTransactionBuilder.java @@ -35,8 +35,7 @@ public class LoanTransactionBuilder { * * LoanTransaction transaction = null; * - * if (repayment) { transaction = - * LoanTransaction.repayment(transactionAmount, transactionDate); } + * if (repayment) { transaction = LoanTransaction.repayment(transactionAmount, transactionDate); } * * return transaction; } **/