Class DomainDescriptor
- java.lang.Object
-
- org.silverpeas.core.admin.domain.driver.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 Summary
Constructors Constructor Description DomainDescriptor(String domainName)
Constructs a new descriptor of a domain with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Properties
getAuthenticationProperties()
Gets the authentication properties of the domain.Properties
getDomainProperties()
Gets the properties defining the domain itself and its parameters.void
loadAuthenticationProperties()
Loads only the authentication properties of the domain.void
loadDomainProperties()
Loads only the properties describing the domain itself.void
updateAuthenticationProperties(Properties authProperties)
Updates the authentication properties with the specified ones.void
updateDomainProperties(Properties domainProperties)
Updates the domain properties with the specified ones.
-
-
-
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.
-
-