MT - add startup logging, if repo is MT-enabled

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7460 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-11-28 12:46:10 +00:00
parent da5e6cface
commit ece15eb0d3
3 changed files with 30 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ import java.security.Principal;
import java.util.Date;
import java.util.Map;
import org.alfresco.repo.tenant.TenantService;
import org.alfresco.service.descriptor.Descriptor;
import org.alfresco.service.descriptor.DescriptorService;
import org.alfresco.service.license.LicenseDescriptor;
@@ -49,6 +50,7 @@ public class DescriptorStartupLog extends AbstractLifecycleBean
// Dependencies
private DescriptorService descriptorService;
private TenantService tenantService;
/**
* @param descriptorService Descriptor Service
@@ -58,6 +60,14 @@ public class DescriptorStartupLog extends AbstractLifecycleBean
this.descriptorService = descriptorService;
}
/**
* @param tenantService Tenant Service
*/
public void setTenantService(TenantService tenantService)
{
this.tenantService = tenantService;
}
/**
* Get Organisation from Principal
@@ -150,6 +160,12 @@ public class DescriptorStartupLog extends AbstractLifecycleBean
Descriptor serverDescriptor = descriptorService.getServerDescriptor();
Descriptor installedRepoDescriptor = descriptorService.getInstalledRepositoryDescriptor();
String serverEdition = serverDescriptor.getEdition();
if (tenantService.isEnabled())
{
serverEdition = serverEdition + " - Multi-Tenant";
}
String serverVersion = serverDescriptor.getVersion();
int serverSchemaVersion = serverDescriptor.getSchema();
String installedRepoVersion = installedRepoDescriptor.getVersion();