minor changes to vishwass pull request.2

This commit is contained in:
Keith Woodlock
2013-04-03 18:12:52 +01:00
parent 2ae603dcc2
commit 1666b2b452
3 changed files with 7 additions and 22 deletions
@@ -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();
}
@@ -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();