FINERACT-1932: Add custom Configuration class for self-pockets module
This commit is contained in:
committed by
Aleksandar Vidakovic
parent
19bd4fcb29
commit
311eb875b3
-6
@@ -22,17 +22,11 @@ package org.apache.fineract.portfolio.self.pockets.service;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Scope;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@Scope("singleton")
|
|
||||||
public class AccountEntityServiceFactory {
|
public class AccountEntityServiceFactory {
|
||||||
|
|
||||||
private Map<String, AccountEntityService> accountEntityServiceHashMap = new HashMap<>();
|
private Map<String, AccountEntityService> accountEntityServiceHashMap = new HashMap<>();
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public AccountEntityServiceFactory(final Set<AccountEntityService> accountEntityServices) {
|
public AccountEntityServiceFactory(final Set<AccountEntityService> accountEntityServices) {
|
||||||
for (AccountEntityService service : accountEntityServices) {
|
for (AccountEntityService service : accountEntityServices) {
|
||||||
this.accountEntityServiceHashMap.put(service.getKey(), service);
|
this.accountEntityServiceHashMap.put(service.getKey(), service);
|
||||||
|
|||||||
+2
-13
@@ -19,15 +19,14 @@
|
|||||||
|
|
||||||
package org.apache.fineract.portfolio.self.pockets.service;
|
package org.apache.fineract.portfolio.self.pockets.service;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
||||||
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||||
import org.apache.fineract.portfolio.loanaccount.exception.LoanNotFoundException;
|
import org.apache.fineract.portfolio.loanaccount.exception.LoanNotFoundException;
|
||||||
import org.apache.fineract.portfolio.loanaccount.service.LoanReadPlatformService;
|
import org.apache.fineract.portfolio.loanaccount.service.LoanReadPlatformService;
|
||||||
import org.apache.fineract.portfolio.self.loanaccount.service.AppuserLoansMapperReadService;
|
import org.apache.fineract.portfolio.self.loanaccount.service.AppuserLoansMapperReadService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class AccountEntityServiceForLoanImpl implements AccountEntityService {
|
public class AccountEntityServiceForLoanImpl implements AccountEntityService {
|
||||||
|
|
||||||
private static final String KEY = EntityAccountType.LOAN.name();
|
private static final String KEY = EntityAccountType.LOAN.name();
|
||||||
@@ -36,16 +35,6 @@ public class AccountEntityServiceForLoanImpl implements AccountEntityService {
|
|||||||
private final AppuserLoansMapperReadService appuserLoansMapperReadService;
|
private final AppuserLoansMapperReadService appuserLoansMapperReadService;
|
||||||
private final LoanReadPlatformService loanReadPlatformService;
|
private final LoanReadPlatformService loanReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public AccountEntityServiceForLoanImpl(final PlatformSecurityContext context,
|
|
||||||
final AppuserLoansMapperReadService appuserLoansMapperReadService, final LoanReadPlatformService loanReadPlatformService) {
|
|
||||||
|
|
||||||
this.context = context;
|
|
||||||
this.appuserLoansMapperReadService = appuserLoansMapperReadService;
|
|
||||||
this.loanReadPlatformService = loanReadPlatformService;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getKey() {
|
public String getKey() {
|
||||||
return KEY;
|
return KEY;
|
||||||
|
|||||||
+2
-14
@@ -19,15 +19,14 @@
|
|||||||
|
|
||||||
package org.apache.fineract.portfolio.self.pockets.service;
|
package org.apache.fineract.portfolio.self.pockets.service;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
||||||
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||||
import org.apache.fineract.portfolio.savings.exception.SavingsAccountNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.SavingsAccountNotFoundException;
|
||||||
import org.apache.fineract.portfolio.savings.service.SavingsAccountReadPlatformService;
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountReadPlatformService;
|
||||||
import org.apache.fineract.portfolio.self.savings.service.AppuserSavingsMapperReadService;
|
import org.apache.fineract.portfolio.self.savings.service.AppuserSavingsMapperReadService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class AccountEntityServiceForSavingsImpl implements AccountEntityService {
|
public class AccountEntityServiceForSavingsImpl implements AccountEntityService {
|
||||||
|
|
||||||
private static final String KEY = EntityAccountType.SAVINGS.name();
|
private static final String KEY = EntityAccountType.SAVINGS.name();
|
||||||
@@ -36,17 +35,6 @@ public class AccountEntityServiceForSavingsImpl implements AccountEntityService
|
|||||||
private final AppuserSavingsMapperReadService appuserSavingsMapperReadService;
|
private final AppuserSavingsMapperReadService appuserSavingsMapperReadService;
|
||||||
private final SavingsAccountReadPlatformService savingsAccountReadPlatformService;
|
private final SavingsAccountReadPlatformService savingsAccountReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public AccountEntityServiceForSavingsImpl(final PlatformSecurityContext context,
|
|
||||||
final AppuserSavingsMapperReadService appuserSavingsMapperReadService,
|
|
||||||
final SavingsAccountReadPlatformService savingsAccountReadPlatformService) {
|
|
||||||
|
|
||||||
this.context = context;
|
|
||||||
this.appuserSavingsMapperReadService = appuserSavingsMapperReadService;
|
|
||||||
this.savingsAccountReadPlatformService = savingsAccountReadPlatformService;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getKey() {
|
public String getKey() {
|
||||||
return KEY;
|
return KEY;
|
||||||
|
|||||||
+2
-12
@@ -19,15 +19,14 @@
|
|||||||
|
|
||||||
package org.apache.fineract.portfolio.self.pockets.service;
|
package org.apache.fineract.portfolio.self.pockets.service;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
||||||
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||||
import org.apache.fineract.portfolio.accounts.exceptions.ShareAccountNotFoundException;
|
import org.apache.fineract.portfolio.accounts.exceptions.ShareAccountNotFoundException;
|
||||||
import org.apache.fineract.portfolio.self.shareaccounts.service.AppUserShareAccountsMapperReadPlatformService;
|
import org.apache.fineract.portfolio.self.shareaccounts.service.AppUserShareAccountsMapperReadPlatformService;
|
||||||
import org.apache.fineract.portfolio.shareaccounts.service.ShareAccountReadPlatformService;
|
import org.apache.fineract.portfolio.shareaccounts.service.ShareAccountReadPlatformService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class AccountEntityServiceForShareAccountsImpl implements AccountEntityService {
|
public class AccountEntityServiceForShareAccountsImpl implements AccountEntityService {
|
||||||
|
|
||||||
private static final String KEY = EntityAccountType.SHARES.name();
|
private static final String KEY = EntityAccountType.SHARES.name();
|
||||||
@@ -36,15 +35,6 @@ public class AccountEntityServiceForShareAccountsImpl implements AccountEntitySe
|
|||||||
private final AppUserShareAccountsMapperReadPlatformService appUserShareAccountsMapperReadPlatformService;
|
private final AppUserShareAccountsMapperReadPlatformService appUserShareAccountsMapperReadPlatformService;
|
||||||
private final ShareAccountReadPlatformService shareAccountReadPlatformService;
|
private final ShareAccountReadPlatformService shareAccountReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public AccountEntityServiceForShareAccountsImpl(final PlatformSecurityContext context,
|
|
||||||
final AppUserShareAccountsMapperReadPlatformService appUserShareAccountsMapperReadPlatformService,
|
|
||||||
final ShareAccountReadPlatformService shareAccountReadPlatformService) {
|
|
||||||
this.context = context;
|
|
||||||
this.appUserShareAccountsMapperReadPlatformService = appUserShareAccountsMapperReadPlatformService;
|
|
||||||
this.shareAccountReadPlatformService = shareAccountReadPlatformService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getKey() {
|
public String getKey() {
|
||||||
return KEY;
|
return KEY;
|
||||||
|
|||||||
+2
-13
@@ -20,17 +20,16 @@ package org.apache.fineract.portfolio.self.pockets.service;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
||||||
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||||
import org.apache.fineract.portfolio.self.pockets.data.PocketAccountMappingData;
|
import org.apache.fineract.portfolio.self.pockets.data.PocketAccountMappingData;
|
||||||
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMapping;
|
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMapping;
|
||||||
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMappingRepositoryWrapper;
|
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMappingRepositoryWrapper;
|
||||||
import org.apache.fineract.portfolio.self.pockets.domain.PocketRepositoryWrapper;
|
import org.apache.fineract.portfolio.self.pockets.domain.PocketRepositoryWrapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class PocketAccountMappingReadPlatformServiceImpl implements PocketAccountMappingReadPlatformService {
|
public class PocketAccountMappingReadPlatformServiceImpl implements PocketAccountMappingReadPlatformService {
|
||||||
|
|
||||||
private final JdbcTemplate jdbcTemplate;
|
private final JdbcTemplate jdbcTemplate;
|
||||||
@@ -38,16 +37,6 @@ public class PocketAccountMappingReadPlatformServiceImpl implements PocketAccoun
|
|||||||
private final PocketRepositoryWrapper pocketRepositoryWrapper;
|
private final PocketRepositoryWrapper pocketRepositoryWrapper;
|
||||||
private final PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper;
|
private final PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public PocketAccountMappingReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate, final PlatformSecurityContext context,
|
|
||||||
final PocketRepositoryWrapper pocketRepositoryWrapper,
|
|
||||||
final PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper) {
|
|
||||||
this.jdbcTemplate = jdbcTemplate;
|
|
||||||
this.context = context;
|
|
||||||
this.pocketRepositoryWrapper = pocketRepositoryWrapper;
|
|
||||||
this.pocketAccountMappingRepositoryWrapper = pocketAccountMappingRepositoryWrapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PocketAccountMappingData retrieveAll() {
|
public PocketAccountMappingData retrieveAll() {
|
||||||
final Long pocketId = this.pocketRepositoryWrapper.findByAppUserId(this.context.authenticatedUser().getId());
|
final Long pocketId = this.pocketRepositoryWrapper.findByAppUserId(this.context.authenticatedUser().getId());
|
||||||
|
|||||||
+2
-16
@@ -24,6 +24,7 @@ import com.google.gson.JsonElement;
|
|||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
|
||||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||||
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
|
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
|
||||||
@@ -36,11 +37,9 @@ import org.apache.fineract.portfolio.self.pockets.domain.Pocket;
|
|||||||
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMapping;
|
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMapping;
|
||||||
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMappingRepositoryWrapper;
|
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMappingRepositoryWrapper;
|
||||||
import org.apache.fineract.portfolio.self.pockets.domain.PocketRepositoryWrapper;
|
import org.apache.fineract.portfolio.self.pockets.domain.PocketRepositoryWrapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class PocketWritePlatformServiceImpl implements PocketWritePlatformService {
|
public class PocketWritePlatformServiceImpl implements PocketWritePlatformService {
|
||||||
|
|
||||||
private final PlatformSecurityContext context;
|
private final PlatformSecurityContext context;
|
||||||
@@ -50,19 +49,6 @@ public class PocketWritePlatformServiceImpl implements PocketWritePlatformServic
|
|||||||
private final PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper;
|
private final PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper;
|
||||||
private final PocketAccountMappingReadPlatformService pocketAccountMappingReadPlatformService;
|
private final PocketAccountMappingReadPlatformService pocketAccountMappingReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public PocketWritePlatformServiceImpl(final PlatformSecurityContext context, PocketDataValidator pocketDataValidator,
|
|
||||||
final AccountEntityServiceFactory accountEntityServiceFactory, final PocketRepositoryWrapper pocketRepositoryWrapper,
|
|
||||||
final PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper,
|
|
||||||
final PocketAccountMappingReadPlatformService pocketAccountMappingReadPlatformService) {
|
|
||||||
this.context = context;
|
|
||||||
this.pocketDataValidator = pocketDataValidator;
|
|
||||||
this.accountEntityServiceFactory = accountEntityServiceFactory;
|
|
||||||
this.pocketRepositoryWrapper = pocketRepositoryWrapper;
|
|
||||||
this.pocketAccountMappingRepositoryWrapper = pocketAccountMappingRepositoryWrapper;
|
|
||||||
this.pocketAccountMappingReadPlatformService = pocketAccountMappingReadPlatformService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public CommandProcessingResult linkAccounts(JsonCommand command) {
|
public CommandProcessingResult linkAccounts(JsonCommand command) {
|
||||||
|
|||||||
+102
@@ -0,0 +1,102 @@
|
|||||||
|
/**
|
||||||
|
* 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.self.pockets.starter;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||||
|
import org.apache.fineract.portfolio.loanaccount.service.LoanReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.self.loanaccount.service.AppuserLoansMapperReadService;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.data.PocketDataValidator;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMappingRepositoryWrapper;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.domain.PocketRepositoryWrapper;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.service.AccountEntityService;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.service.AccountEntityServiceFactory;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.service.AccountEntityServiceForLoanImpl;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.service.AccountEntityServiceForSavingsImpl;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.service.AccountEntityServiceForShareAccountsImpl;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.service.PocketAccountMappingReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.service.PocketAccountMappingReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.service.PocketWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.self.pockets.service.PocketWritePlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.self.savings.service.AppuserSavingsMapperReadService;
|
||||||
|
import org.apache.fineract.portfolio.self.shareaccounts.service.AppUserShareAccountsMapperReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.shareaccounts.service.ShareAccountReadPlatformService;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class SelfPocketsConfiguration {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@Scope("singleton")
|
||||||
|
@ConditionalOnMissingBean(AccountEntityServiceFactory.class)
|
||||||
|
public AccountEntityServiceFactory accountEntityServiceFactory(Set<AccountEntityService> accountEntityServices) {
|
||||||
|
return new AccountEntityServiceFactory(accountEntityServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(AccountEntityServiceForLoanImpl.class)
|
||||||
|
public AccountEntityService accountEntityServiceForLoanImpl(PlatformSecurityContext context,
|
||||||
|
AppuserLoansMapperReadService appuserLoansMapperReadService, LoanReadPlatformService loanReadPlatformService) {
|
||||||
|
|
||||||
|
return new AccountEntityServiceForLoanImpl(context, appuserLoansMapperReadService, loanReadPlatformService);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(AccountEntityServiceForSavingsImpl.class)
|
||||||
|
public AccountEntityService accountEntityServiceForSavingsImpl(PlatformSecurityContext context,
|
||||||
|
AppuserSavingsMapperReadService appuserSavingsMapperReadService,
|
||||||
|
SavingsAccountReadPlatformService savingsAccountReadPlatformService) {
|
||||||
|
|
||||||
|
return new AccountEntityServiceForSavingsImpl(context, appuserSavingsMapperReadService, savingsAccountReadPlatformService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(AccountEntityServiceForShareAccountsImpl.class)
|
||||||
|
public AccountEntityService accountEntityServiceForShareAccountsImpl(PlatformSecurityContext context,
|
||||||
|
AppUserShareAccountsMapperReadPlatformService appUserShareAccountsMapperReadPlatformService,
|
||||||
|
ShareAccountReadPlatformService shareAccountReadPlatformService) {
|
||||||
|
return new AccountEntityServiceForShareAccountsImpl(context, appUserShareAccountsMapperReadPlatformService,
|
||||||
|
shareAccountReadPlatformService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(PocketAccountMappingReadPlatformService.class)
|
||||||
|
public PocketAccountMappingReadPlatformService pocketAccountMappingReadPlatformService(JdbcTemplate jdbcTemplate,
|
||||||
|
PlatformSecurityContext context, PocketRepositoryWrapper pocketRepositoryWrapper,
|
||||||
|
PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper) {
|
||||||
|
return new PocketAccountMappingReadPlatformServiceImpl(jdbcTemplate, context, pocketRepositoryWrapper,
|
||||||
|
pocketAccountMappingRepositoryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(PocketWritePlatformService.class)
|
||||||
|
public PocketWritePlatformService pocketWritePlatformService(PlatformSecurityContext context, PocketDataValidator pocketDataValidator,
|
||||||
|
AccountEntityServiceFactory accountEntityServiceFactory, PocketRepositoryWrapper pocketRepositoryWrapper,
|
||||||
|
PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper,
|
||||||
|
PocketAccountMappingReadPlatformService pocketAccountMappingReadPlatformService) {
|
||||||
|
return new PocketWritePlatformServiceImpl(context, pocketDataValidator, accountEntityServiceFactory, pocketRepositoryWrapper,
|
||||||
|
pocketAccountMappingRepositoryWrapper, pocketAccountMappingReadPlatformService);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user