org.alfresco.repo.descriptor
Class DescriptorServiceImpl

java.lang.Object
  extended by org.springframework.extensions.surf.util.AbstractLifecycleBean
      extended by org.alfresco.repo.descriptor.DescriptorServiceImpl
All Implemented Interfaces:
java.util.EventListener, DescriptorService, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

public class DescriptorServiceImpl
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
implements DescriptorService, org.springframework.beans.factory.InitializingBean

Implementation of Descriptor Service.


Nested Class Summary
static class DescriptorServiceImpl.BaseDescriptor
          Base class for Descriptor implementations, provides a default getVersion() implementation.
 
Field Summary
 
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log
 
Constructor Summary
DescriptorServiceImpl()
           
 
Method Summary
 void afterPropertiesSet()
          Initialise Descriptors.
 Descriptor getCurrentRepositoryDescriptor()
          Get descriptor for the repository as it is currently installed.
 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 server
protected  void onBootstrap(org.springframework.context.ApplicationEvent event)
           
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 setServerDescriptorDAO(DescriptorDAO serverDescriptorDAO)
          Sets the server descriptor DAO.
 void setTransactionService(TransactionService transactionService)
          Sets the transaction service.
 
Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorServiceImpl

public DescriptorServiceImpl()
Method Detail

setServerDescriptorDAO

public void setServerDescriptorDAO(DescriptorDAO serverDescriptorDAO)
Sets the server descriptor DAO.

Parameters:
serverDescriptorDAO - the new server descriptor DAO

setCurrentRepoDescriptorDAO

public void setCurrentRepoDescriptorDAO(DescriptorDAO currentRepoDescriptorDAO)
Sets the current repo descriptor DAO.

Parameters:
currentRepoDescriptorDAO - the new current repo descriptor DAO

setInstalledRepoDescriptorDAO

public void setInstalledRepoDescriptorDAO(DescriptorDAO installedRepoDescriptorDAO)
Sets the installed repo descriptor DAO.

Parameters:
installedRepoDescriptorDAO - the new installed repo descriptor DAO

setTransactionService

public void setTransactionService(TransactionService transactionService)
Sets the transaction service.

Parameters:
transactionService - transaction service

getServerDescriptor

public Descriptor getServerDescriptor()
Description copied from interface: DescriptorService
Get descriptor for the server

Specified by:
getServerDescriptor in interface DescriptorService
Returns:
server descriptor

getCurrentRepositoryDescriptor

public Descriptor getCurrentRepositoryDescriptor()
Description copied from interface: DescriptorService
Get descriptor for the repository as it is currently installed. The current repository descriptor will always be the same as the server descriptor.

Specified by:
getCurrentRepositoryDescriptor in interface DescriptorService
Returns:
repository descriptor

getInstalledRepositoryDescriptor

public Descriptor getInstalledRepositoryDescriptor()
Description copied from interface: DescriptorService
Get descriptor for the repository as it was when first installed.

Specified by:
getInstalledRepositoryDescriptor in interface DescriptorService
Returns:
repository descriptor

getLicenseDescriptor

public LicenseDescriptor getLicenseDescriptor()
Description copied from interface: DescriptorService
Gets the License Descriptor

Specified by:
getLicenseDescriptor in interface DescriptorService
Returns:
the license descriptor

onBootstrap

protected void onBootstrap(org.springframework.context.ApplicationEvent event)
Specified by:
onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean

onShutdown

protected void onShutdown(org.springframework.context.ApplicationEvent event)
Specified by:
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBean

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Initialise Descriptors.

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception - the exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.