Package uk.num.numlib.internal.module
Class ModuleDNSQueries
- java.lang.Object
-
- uk.num.numlib.internal.module.ModuleDNSQueries
-
public final class ModuleDNSQueries extends java.lang.ObjectClass to hold the DNS query strings for a module and NUM ID combination.
-
-
Constructor Summary
Constructors Constructor Description ModuleDNSQueries(@NonNull NonBlankString moduleId, @NonNull NonBlankString numId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods 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(AppContext appContext)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(AppContext appContext, int levels)A Zone Distribution Record has been found so we need to update the email lookups accordingly.
-
-
-
Constructor Detail
-
ModuleDNSQueries
public ModuleDNSQueries(@NonNull @NonNull NonBlankString moduleId, @NonNull @NonNull NonBlankString numId)Constructor- Parameters:
moduleId- the module ID stringnumId- the NUM ID.
-
-
Method Detail
-
initialise
public void initialise(AppContext appContext) throws java.net.MalformedURLException
Build the DNS query Strings and set the root/branch flag.- Parameters:
appContext- An AppContext object- Throws:
java.net.MalformedURLException- on error
-
setEmailRecordDistributionLevels
public void setEmailRecordDistributionLevels(AppContext appContext, int levels)
A Zone Distribution Record has been found so we need to update the email lookups accordingly.- Parameters:
appContext- the AppContextlevels- the number of levels to use for zone distribution
-
getHostedRecordPath
public java.lang.String getHostedRecordPath() throws NumInvalidDNSQueryExceptionExtract the 'path' portion of the hosted record- Returns:
- a path of the form '/a/b/c'
- Throws:
NumInvalidDNSQueryException- if the
-
getIndependentRecordPath
public java.lang.String getIndependentRecordPath() throws NumInvalidDNSQueryExceptionExtract the 'path' portion of the independent record- Returns:
- a path of the form '/a/b/c'
- Throws:
NumInvalidDNSQueryException- if the
-
redirectHostedPath
public void redirectHostedPath(java.lang.String path) throws NumInvalidRedirectExceptionSet 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
public void redirectIndependentPath(java.lang.String path) throws NumInvalidRedirectExceptionSet the independent record to the specified path- Parameters:
path- the path String- Throws:
NumInvalidRedirectException- if the redirect attempts to redirect outside the root record
-
-