Class DomainDescriptor


  • public class DomainDescriptor
    extends Object
    Descriptor of a domain. It is made up of two properties file: one describing the domain itself, how to access it and some additional properties, and the other one defining the authentication servers to use when authenticating a user of the domain.
    Author:
    mmoquillon
    • Constructor Detail

      • DomainDescriptor

        public DomainDescriptor​(String domainName)
        Constructs a new descriptor of a domain with the specified name. The name is used to find the different properties file of the domain.
        Parameters:
        domainName - the name of a domain.
    • Method Detail

      • loadDomainProperties

        public void loadDomainProperties()
                                  throws UncheckedIOException
        Loads only the properties describing the domain itself.
        Throws:
        UncheckedIOException - if an error occurs while loading the domain properties.
      • loadAuthenticationProperties

        public void loadAuthenticationProperties()
                                          throws UncheckedIOException
        Loads only the authentication properties of the domain.
        Throws:
        UncheckedIOException - if an error occurs while loading the authentication properties.
      • getDomainProperties

        @NonNull
        public Properties getDomainProperties()
        Gets the properties defining the domain itself and its parameters. It the properties were not previously loaded, then the returned properties will be empty.
        Returns:
        the domain properties.
      • getAuthenticationProperties

        @NonNull
        public Properties getAuthenticationProperties()
        Gets the authentication properties of the domain. It the properties were not previously loaded, then the returned properties will be empty.
        Returns:
        the authentication properties.
      • updateDomainProperties

        public void updateDomainProperties​(Properties domainProperties)
                                    throws UncheckedIOException
        Updates the domain properties with the specified ones. New properties are ignored; only existing properties are updated with their new value.
        Parameters:
        domainProperties - the new valued properties with which the existing ones will be updated.
        Throws:
        UncheckedIOException - if an error occurs while storing the new properties value into the properties file.
      • updateAuthenticationProperties

        public void updateAuthenticationProperties​(Properties authProperties)
                                            throws UncheckedIOException
        Updates the authentication properties with the specified ones. New properties are ignored; only existing properties are updated with their new value.
        Parameters:
        authProperties - the new valued properties with which the existing ones will be updated.
        Throws:
        UncheckedIOException - if an error occurs while storing the new properties value into the properties file.