public class DescriptorServiceImpl extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements DescriptorService, org.springframework.beans.factory.InitializingBean, LicenseService.LicenseChangeHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
DescriptorServiceImpl.BaseDescriptor
Base class for Descriptor implementations, provides a default getVersion() implementation.
|
| Constructor and Description |
|---|
DescriptorServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Initialise Descriptors.
|
Descriptor |
getCurrentRepositoryDescriptor()
Get current descriptor for the repository.
|
Descriptor |
getInstalledRepositoryDescriptor()
Get descriptor for the repository as it was when first installed.
|
LicenseDescriptor |
getLicenseDescriptor()
Gets the License Descriptor
|
Descriptor |
getServerDescriptor()
Get descriptor for the alfresco software installed on the server.
|
boolean |
isBootstrapped()
Is this service bootstrapped?
|
String |
loadLicense()
Attempts to load the license.
|
String |
loadLicense(InputStream licenseStream)
Attempts to load the license from the input stream.
|
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event)
On bootstrap load the special services for LicenseComponent
Also set installedRepoDescriptor and update current
|
void |
onLicenseChange(LicenseDescriptor licenseDescriptor)
Notification of a license change.
|
void |
onLicenseFail()
Notification that a license have failed to validate
|
protected void |
onShutdown(org.springframework.context.ApplicationEvent event) |
void |
setCurrentRepoDescriptorDAO(DescriptorDAO currentRepoDescriptorDAO)
Sets the current repo descriptor DAO.
|
void |
setHbDataCollectorService(HBDataCollectorService hbDataCollectorService) |
void |
setInstalledRepoDescriptorDAO(DescriptorDAO installedRepoDescriptorDAO)
Sets the installed repo descriptor DAO.
|
void |
setRepoUsageComponent(RepoUsageComponent repoUsageComponent) |
void |
setServerDescriptorDAO(DescriptorDAO serverDescriptorDAO)
Sets the server descriptor DAO.
|
void |
setTransactionService(TransactionService transactionService)
Sets the transaction service.
|
public void setServerDescriptorDAO(DescriptorDAO serverDescriptorDAO)
serverDescriptorDAO - the new server descriptor DAOpublic void setCurrentRepoDescriptorDAO(DescriptorDAO currentRepoDescriptorDAO)
currentRepoDescriptorDAO - the new current repo descriptor DAOpublic void setInstalledRepoDescriptorDAO(DescriptorDAO installedRepoDescriptorDAO)
installedRepoDescriptorDAO - the new installed repo descriptor DAOpublic void setTransactionService(TransactionService transactionService)
transactionService - transaction servicepublic void setHbDataCollectorService(HBDataCollectorService hbDataCollectorService)
public void setRepoUsageComponent(RepoUsageComponent repoUsageComponent)
public Descriptor getServerDescriptor()
DescriptorServiceThe information contained by this descriptor is read from a property file. The following properties are available in the descriptor
getServerDescriptor in interface DescriptorServicepublic Descriptor getCurrentRepositoryDescriptor()
DescriptorServiceThe information in this descriptor is read from a node in the system store. After the patch process runs successfully, the version Major/Minor/Revision should be equal to the server descriptor.
The "repository id" that uniquely identifies each alfresco repository is available in the "id" property.
The following properties are available in the descriptor
getCurrentRepositoryDescriptor in interface DescriptorServicepublic Descriptor getInstalledRepositoryDescriptor()
DescriptorServiceThe information in this descriptor is read from a node in the system store.
getInstalledRepositoryDescriptor in interface DescriptorServicepublic LicenseDescriptor getLicenseDescriptor()
DescriptorServicegetLicenseDescriptor in interface DescriptorServicepublic String loadLicense()
loadLicense in interface DescriptorServicepublic String loadLicense(InputStream licenseStream)
loadLicense in interface DescriptorServiceprotected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBeanprotected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBeanpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException - the exceptionpublic void onLicenseChange(LicenseDescriptor licenseDescriptor)
LicenseService.LicenseChangeHandleronLicenseChange in interface LicenseService.LicenseChangeHandlerlicenseDescriptor - the new license (never null)public void onLicenseFail()
onLicenseFail in interface LicenseService.LicenseChangeHandlerpublic boolean isBootstrapped()
DescriptorServiceisBootstrapped in interface DescriptorServiceCopyright © 2005–2018 Alfresco Software. All rights reserved.