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 domain name/URL/email address combination.
-
-
Constructor Summary
Constructors Constructor Description ModuleDNSQueries(java.lang.String moduleId, java.lang.String domainName)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDomainName()Accessorjava.lang.StringgetIndependentRecordLocation()Accessorjava.lang.StringgetManagedRecordLocation()Accessorjava.lang.StringgetModuleId()Accessorjava.lang.StringgetPopulatorLocation()Accessorjava.lang.StringgetPrepopulatedRecordLocation()Accessorvoidinitialise()Build the DNS query Strings and set the root/branch flag.booleanisRootQuery()AccessorvoidsetIndependentRecordLocation(java.lang.String location)Set the independent record location to a specific value.voidsetManagedRecordLocation(java.lang.String location)Override the managed record location, usually due to a redirectvoidsetPrepopulatedRecordLocation(java.lang.String location)Override the prepopulated record location, usually due to a redirectvoidsetRelativeRedirectIndependentRecordLocation(java.lang.String redirect, int levels)Change the independent record location due to a redirect.voidsetRelativeRedirectManagedRecordLocation(java.lang.String redirect, int levels)Change the managed record location due to a redirect.voidsetRelativeRedirectPrepopulatedRecordLocation(java.lang.String redirect, int levels)Change the pre-poulated record location due to a redirect.voidsetRootRedirectIndependentRecordLocation(java.lang.String redirectTo)Change the independent record location due to a redirect.voidsetRootRedirectManagedRecordLocation(java.lang.String redirect)Change the managed record location due to a redirect.voidsetRootRedirectPrepopulatedRecordLocation(java.lang.String redirect)Change the pre-populated record location due to a redirect.
-
-
-
Constructor Detail
-
ModuleDNSQueries
public ModuleDNSQueries(java.lang.String moduleId, java.lang.String domainName) throws NumInvalidParameterExceptionConstructor- Parameters:
moduleId- the module ID stringdomainName- the domain name/URL string/email address.- Throws:
NumInvalidParameterException- on error
-
-
Method Detail
-
isRootQuery
public boolean isRootQuery()
Accessor- Returns:
- true if this is a root query
-
initialise
public void initialise() throws NumBadURLException, NumInvalidParameterExceptionBuild the DNS query Strings and set the root/branch flag.- Throws:
NumBadURLException- on errorNumInvalidParameterException- on error
-
getModuleId
public java.lang.String getModuleId()
Accessor- Returns:
- the module ID string
-
getDomainName
public java.lang.String getDomainName()
Accessor- Returns:
- the domain name/URL/email address
-
getIndependentRecordLocation
public java.lang.String getIndependentRecordLocation()
Accessor- Returns:
- the independent record query string.
-
setIndependentRecordLocation
public void setIndependentRecordLocation(java.lang.String location)
Set the independent record location to a specific value.- Parameters:
location- the new independent record location
-
getManagedRecordLocation
public java.lang.String getManagedRecordLocation()
Accessor- Returns:
- the managed record query string
-
setManagedRecordLocation
public void setManagedRecordLocation(java.lang.String location)
Override the managed record location, usually due to a redirect- Parameters:
location- the new location
-
getPrepopulatedRecordLocation
public java.lang.String getPrepopulatedRecordLocation()
Accessor- Returns:
- the pre-populated record query string.
-
setPrepopulatedRecordLocation
public void setPrepopulatedRecordLocation(java.lang.String location)
Override the prepopulated record location, usually due to a redirect- Parameters:
location- the prepopulated record location
-
getPopulatorLocation
public java.lang.String getPopulatorLocation()
Accessor- Returns:
- the populator query string
-
setRootRedirectIndependentRecordLocation
public void setRootRedirectIndependentRecordLocation(java.lang.String redirectTo) throws NumInvalidParameterException, NumBadURLException, NumInvalidRedirectExceptionChange the independent record location due to a redirect.- Parameters:
redirectTo- the root-relative branch record to use.- Throws:
NumInvalidParameterException- on errorNumBadURLException- on errorNumInvalidRedirectException- on error
-
setRelativeRedirectIndependentRecordLocation
public void setRelativeRedirectIndependentRecordLocation(java.lang.String redirect, int levels) throws NumInvalidRedirectException, NumInvalidParameterException, NumBadURLExceptionChange the independent record location due to a redirect.- Parameters:
redirect- 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
-
setRootRedirectManagedRecordLocation
public void setRootRedirectManagedRecordLocation(java.lang.String redirect) throws NumInvalidParameterException, NumBadURLException, NumInvalidRedirectExceptionChange the managed record location due to a redirect.- Parameters:
redirect- the root-relative branch record to use.- Throws:
NumInvalidParameterException- on errorNumBadURLException- on errorNumInvalidRedirectException- on error
-
setRelativeRedirectManagedRecordLocation
public void setRelativeRedirectManagedRecordLocation(java.lang.String redirect, int levels) throws NumInvalidRedirectException, NumInvalidParameterException, NumBadURLExceptionChange the managed record location due to a redirect.- Parameters:
redirect- 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
-
setRootRedirectPrepopulatedRecordLocation
public void setRootRedirectPrepopulatedRecordLocation(java.lang.String redirect) throws NumBadURLException, NumInvalidParameterException, NumInvalidRedirectExceptionChange the pre-populated record location due to a redirect.- Parameters:
redirect- the root-relative branch record to use.- Throws:
NumBadURLException- on errorNumInvalidParameterException- on errorNumInvalidRedirectException- on error
-
setRelativeRedirectPrepopulatedRecordLocation
public void setRelativeRedirectPrepopulatedRecordLocation(java.lang.String redirect, int levels) throws NumBadURLException, NumInvalidParameterException, NumInvalidRedirectExceptionChange the pre-poulated record location due to a redirect.- Parameters:
redirect- the relative branch record to use.levels- the number of levels to go up before adding the redirect location- Throws:
NumBadURLException- on errorNumInvalidParameterException- on errorNumInvalidRedirectException- on error
-
-