Class ServerDescriptorDAOImpl

java.lang.Object
org.alfresco.repo.descriptor.ServerDescriptorDAOImpl
All Implemented Interfaces:
DescriptorDAO

public class ServerDescriptorDAOImpl extends Object implements DescriptorDAO
Manages retrieval of the server Descriptor from a read-only resource file.
  • Field Details

    • serverProperties

      protected Properties serverProperties
      The server properties.
  • Constructor Details

    • ServerDescriptorDAOImpl

      public ServerDescriptorDAOImpl()
  • Method Details

    • setRepositoryName

      public void setRepositoryName(String repositoryName) throws IOException
      Sets the repository properties from a resource file.
      Parameters:
      repositoryName - the repository name
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • setResource

      public void setResource(org.springframework.core.io.Resource[] locations) throws IOException
      Sets the server descriptor from a resource file.
      Parameters:
      locations - resources containing server descriptor meta-data
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getDescriptor

      public Descriptor getDescriptor()
      Description copied from interface: DescriptorDAO
      Create repository descriptor.
      Specified by:
      getDescriptor in interface DescriptorDAO
      Returns:
      descriptor
    • getLicenseKey

      public byte[] getLicenseKey()
      Description copied from interface: DescriptorDAO
      Gets the license key.
      Specified by:
      getLicenseKey in interface DescriptorDAO
      Returns:
      the license key
    • updateDescriptor

      public Descriptor updateDescriptor(Descriptor serverDescriptor, RepoUsage.LicenseMode licenseMode)
      Description copied from interface: DescriptorDAO
      Push the current server descriptor properties into persistence.
      Specified by:
      updateDescriptor in interface DescriptorDAO
      Parameters:
      serverDescriptor - the current server descriptor
      Returns:
      the descriptor
      Throws:
      UnsupportedOperationException
    • updateLicenseKey

      public void updateLicenseKey(byte[] key)
      Description copied from interface: DescriptorDAO
      Update license key.
      Specified by:
      updateLicenseKey in interface DescriptorDAO
      Parameters:
      key - the key