Package uk.num.numlib.internal.module
Class ModuleDNSQueries
java.lang.Object
uk.num.numlib.internal.module.ModuleDNSQueries
public final class ModuleDNSQueries
extends java.lang.Object
Class to hold the DNS query strings for a module and NUM ID combination.
-
Constructor Summary
Constructors Constructor Description ModuleDNSQueries(int moduleNumber, @NonNull java.lang.String numId)Constructor -
Method Summary
Modifier and Type Method Description java.lang.StringgetHostedRecordPath()Extract the 'path' portion of the hosted recordjava.lang.StringgetIndependentRecordPath()Extract the 'path' portion of the independent recordvoidinitialise()Build the DNS query Strings and set the root/branch flag.voidredirectHostedPath(java.lang.String path)Set the hosted record to the specified pathvoidredirectIndependentPath(java.lang.String path)Set the independent record to the specified pathvoidsetEmailRecordDistributionLevels(int levels)A Zone Distribution Record has been found so we need to update the email lookups accordingly.
-
Constructor Details
-
ModuleDNSQueries
public ModuleDNSQueries(int moduleNumber, @NonNull @NonNull java.lang.String numId) throws uk.num.numlib.exc.NumInvalidParameterExceptionConstructor- Parameters:
moduleNumber- the module ID stringnumId- the NUM ID.- Throws:
uk.num.numlib.exc.NumInvalidParameterException- on error
-
-
Method Details
-
initialise
public void initialise() throws uk.num.numlib.exc.NumInvalidParameterExceptionBuild the DNS query Strings and set the root/branch flag.- Throws:
uk.num.numlib.exc.NumInvalidParameterException- on error
-
setEmailRecordDistributionLevels
public void setEmailRecordDistributionLevels(int levels) throws uk.num.numlib.exc.NumInvalidParameterExceptionA Zone Distribution Record has been found so we need to update the email lookups accordingly.- Parameters:
levels- the number of levels to use for zone distribution- Throws:
uk.num.numlib.exc.NumInvalidParameterException- on error
-
getHostedRecordPath
public java.lang.String getHostedRecordPath() throws uk.num.numlib.exc.NumInvalidDNSQueryExceptionExtract the 'path' portion of the hosted record- Returns:
- a path of the form '/a/b/c'
- Throws:
uk.num.numlib.exc.NumInvalidDNSQueryException- if the
-
getIndependentRecordPath
public java.lang.String getIndependentRecordPath() throws uk.num.numlib.exc.NumInvalidDNSQueryExceptionExtract the 'path' portion of the independent record- Returns:
- a path of the form '/a/b/c'
- Throws:
uk.num.numlib.exc.NumInvalidDNSQueryException- if the
-
redirectHostedPath
Set the hosted record to the specified path- Parameters:
path- the path String- Throws:
NumInvalidRedirectException- if the redirect attempts to redirect outside the root record
-
redirectIndependentPath
Set the independent record to the specified path- Parameters:
path- the path String- Throws:
NumInvalidRedirectException- if the redirect attempts to redirect outside the root record
-