Package uk.num.numlib.internal.module
Class ModuleDNSQueries
- java.lang.Object
-
- uk.num.numlib.internal.module.ModuleDNSQueries
-
public 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 voidinitialise(AppContext appContext)Build the DNS query Strings and set the root/branch flag.voidredirectHostedRecordLocationRelativeToCurrent(NonBlankString redirectTo)Handle simple redirectsvoidredirectIndependentRecordLocationRelativeToCurrent(NonBlankString redirectTo)Handle simple redirectsvoidsetEmailRecordDistributionLevels(AppContext appContext, int levels)A Zone Distribution Record has been found so we need to update the email lookups accordingly.voidsetRelativeRedirectHostedRecordLocation(AppContext appContext, NonBlankString redirect, int levels)Change the hosted record location due to a redirect.voidsetRelativeRedirectIndependentRecordLocation(AppContext appContext, NonBlankString redirect, int levels)Change the independent record location due to a redirect.voidsetRootRedirectHostedRecordLocation(AppContext appContext, NonBlankString redirect)Change the hosted record location due to a redirect.voidsetRootRedirectIndependentRecordLocation(AppContext appContext, NonBlankString redirectTo)Change the independent record location due to a redirect.
-
-
-
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 NumBadURLException, NumInvalidParameterException
Build the DNS query Strings and set the root/branch flag.- Parameters:
appContext- An AppContext object- Throws:
NumBadURLException- on errorNumInvalidParameterException- on error
-
setRootRedirectIndependentRecordLocation
public void setRootRedirectIndependentRecordLocation(AppContext appContext, NonBlankString redirectTo) throws NumInvalidParameterException, NumBadURLException, NumInvalidRedirectException
Change the independent record location due to a redirect.- Parameters:
appContext- the AppContextredirectTo- the root-relative branch record to use.- Throws:
NumInvalidParameterException- on errorNumBadURLException- on errorNumInvalidRedirectException- on error
-
setRelativeRedirectIndependentRecordLocation
public void setRelativeRedirectIndependentRecordLocation(AppContext appContext, NonBlankString redirect, int levels) throws NumInvalidRedirectException, NumInvalidParameterException, NumBadURLException
Change the independent record location due to a redirect.- Parameters:
appContext- the AppContextredirect- the relative branch record to use.levels- the number of levels to go up before adding the redirect location- Throws:
NumInvalidRedirectException- on errorNumInvalidParameterException- on errorNumBadURLException- on error
-
setRootRedirectHostedRecordLocation
public void setRootRedirectHostedRecordLocation(AppContext appContext, NonBlankString redirect) throws NumInvalidParameterException, NumBadURLException, NumInvalidRedirectException
Change the hosted record location due to a redirect.- Parameters:
appContext- the AppContextredirect- the root-relative branch record to use.- Throws:
NumInvalidParameterException- on errorNumBadURLException- on errorNumInvalidRedirectException- on error
-
setRelativeRedirectHostedRecordLocation
public void setRelativeRedirectHostedRecordLocation(AppContext appContext, NonBlankString redirect, int levels) throws NumInvalidRedirectException, NumInvalidParameterException, NumBadURLException
Change the hosted record location due to a redirect.- Parameters:
appContext- the AppContextredirect- the relative branch record to use.levels- the number of levels to go up before adding the redirect location- Throws:
NumInvalidRedirectException- on errorNumInvalidParameterException- on errorNumBadURLException- on error
-
redirectIndependentRecordLocationRelativeToCurrent
public void redirectIndependentRecordLocationRelativeToCurrent(NonBlankString redirectTo)
Handle simple redirects- Parameters:
redirectTo- the target
-
redirectHostedRecordLocationRelativeToCurrent
public void redirectHostedRecordLocationRelativeToCurrent(NonBlankString redirectTo)
Handle simple redirects- Parameters:
redirectTo- the target
-
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
-
-