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 and HeartBeat
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 |
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 setRepoUsageComponent(RepoUsageComponent repoUsageComponent)
public Descriptor getServerDescriptor()
DescriptorService
The information contained by this descriptor is read from a property file. The following properties are available in the descriptor
getServerDescriptor
in interface DescriptorService
public Descriptor getCurrentRepositoryDescriptor()
DescriptorService
The 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 DescriptorService
public Descriptor getInstalledRepositoryDescriptor()
DescriptorService
The information in this descriptor is read from a node in the system store.
getInstalledRepositoryDescriptor
in interface DescriptorService
public LicenseDescriptor getLicenseDescriptor()
DescriptorService
getLicenseDescriptor
in interface DescriptorService
public String loadLicense()
loadLicense
in interface DescriptorService
public String loadLicense(InputStream licenseStream)
loadLicense
in interface DescriptorService
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
protected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
- the exceptionpublic void onLicenseChange(LicenseDescriptor licenseDescriptor)
LicenseService.LicenseChangeHandler
onLicenseChange
in interface LicenseService.LicenseChangeHandler
licenseDescriptor
- the new license (never null)public void onLicenseFail()
onLicenseFail
in interface LicenseService.LicenseChangeHandler
public boolean isBootstrapped()
DescriptorService
isBootstrapped
in interface DescriptorService
Copyright © 2005–2017 Alfresco Software. All rights reserved.