FINERACT-2418: add originator during the loan application
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.fineract.portfolio.loanaccount.service;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
|
||||
public interface LoanOriginatorLinkingService {
|
||||
|
||||
/**
|
||||
* Process originators provided during loan application. Creates new originators if allowed by global config, then
|
||||
* attaches them to the loan.
|
||||
*
|
||||
* @param loanId
|
||||
* the loan ID to attach originators to
|
||||
* @param originatorsArray
|
||||
* JSON array of originator data from loan request
|
||||
*/
|
||||
void processOriginatorsForLoanApplication(Long loanId, JsonArray originatorsArray);
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.fineract.portfolio.loanaccount.service;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* No-op implementation of {@link LoanOriginatorLinkingService} that is used when the loan-origination module is
|
||||
* disabled. When originator data is provided during loan application, this implementation silently ignores it.
|
||||
*/
|
||||
@Service
|
||||
@ConditionalOnMissingBean(name = "loanOriginatorLinkingServiceImpl")
|
||||
public class LoanOriginatorLinkingServiceNoOp implements LoanOriginatorLinkingService {
|
||||
|
||||
@Override
|
||||
public void processOriginatorsForLoanApplication(Long loanId, JsonArray originatorsArray) {
|
||||
// No-op when loan-origination module is not enabled
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user