org.alfresco.repo.descriptor
Class DescriptorServiceImpl

java.lang.Object
  extended by org.alfresco.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.alfresco.util.AbstractLifecycleBean
implements DescriptorService, org.springframework.beans.factory.InitializingBean

Implementation of Descriptor Service


Nested Class Summary
 class DescriptorServiceImpl.BaseDescriptor
          Base class for Descriptor implementations, provides a default getVersion() implementation.
 
Field Summary
 
Fields inherited from class org.alfresco.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 setDescriptor(org.springframework.core.io.Resource descriptorResource)
          Sets the server descriptor from a resource file
 void setNamespaceService(NamespaceService namespaceService)
           
 void setNodeService(NodeService nodeService)
           
 void setRepositoryName(java.lang.String repositoryName)
          Sets the repository properties from a resource file
 void setSearchService(SearchService searchService)
           
 void setSystemBootstrap(ImporterBootstrap systemBootstrap)
           
 void setTransactionService(TransactionService transactionService)
           
 
Methods inherited from class org.alfresco.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

setRepositoryName

public void setRepositoryName(java.lang.String repositoryName)
                       throws java.io.IOException
Sets the repository properties from a resource file

Parameters:
repositoryResource - resource containing repository properties
Throws:
java.io.IOException

setDescriptor

public void setDescriptor(org.springframework.core.io.Resource descriptorResource)
                   throws java.io.IOException
Sets the server descriptor from a resource file

Parameters:
descriptorResource - resource containing server descriptor meta-data
Throws:
java.io.IOException

setSystemBootstrap

public void setSystemBootstrap(ImporterBootstrap systemBootstrap)
Parameters:
systemBootstrap - system bootstrap

setTransactionService

public void setTransactionService(TransactionService transactionService)
Parameters:
transactionService - transaction service

setNamespaceService

public void setNamespaceService(NamespaceService namespaceService)
Parameters:
namespaceService - namespace service

setNodeService

public void setNodeService(NodeService nodeService)
Parameters:
nodeService - node service

setSearchService

public void setSearchService(SearchService searchService)
Parameters:
searchService - search 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.alfresco.util.AbstractLifecycleBean

onShutdown

protected void onShutdown(org.springframework.context.ApplicationEvent event)
Specified by:
onShutdown in class org.alfresco.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


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