minor changes to vishwass pull request.2
This commit is contained in:
-13
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
package org.mifosplatform.infrastructure.core.service;
|
||||
|
||||
|
||||
public interface ITenantUpgradeService {
|
||||
|
||||
void upgradeAllTenants();
|
||||
|
||||
}
|
||||
+4
-5
@@ -17,20 +17,19 @@ import org.springframework.stereotype.Service;
|
||||
import com.googlecode.flyway.core.Flyway;
|
||||
|
||||
/**
|
||||
* A JDBC implementation of {@link TenantDetailsService} for loading a tenants
|
||||
* details by a <code>tenantIdentifier</code>.
|
||||
* A service that picks up on tenants that are configured to auto-update their
|
||||
* specific schema on application startup.
|
||||
*/
|
||||
@Service
|
||||
public class TenantUpgradeService implements ITenantUpgradeService {
|
||||
public class TenantDatabaseUpgradeService {
|
||||
|
||||
private final TenantDetailsService tenantDetailsService;
|
||||
|
||||
@Autowired
|
||||
public TenantUpgradeService(TenantDetailsService detailsService) {
|
||||
public TenantDatabaseUpgradeService(final TenantDetailsService detailsService) {
|
||||
this.tenantDetailsService = detailsService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
public void upgradeAllTenants() {
|
||||
List<MifosPlatformTenant> tenants = tenantDetailsService.findAllTenants();
|
||||
Reference in New Issue
Block a user