Class ServerDescriptorDAOImpl

  • All Implemented Interfaces:
    DescriptorDAO

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

      • serverProperties

        protected java.util.Properties serverProperties
        The server properties.
    • Constructor Detail

      • ServerDescriptorDAOImpl

        public ServerDescriptorDAOImpl()
    • Method Detail

      • setRepositoryName

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

        public void setResource​(org.springframework.core.io.Resource[] locations)
                         throws java.io.IOException
        Sets the server descriptor from a resource file.
        Parameters:
        locations - resources containing server descriptor meta-data
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • 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:
        java.lang.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