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.String getHostedRecordPath()
    Extract the 'path' portion of the hosted record
    java.lang.String getIndependentRecordPath()
    Extract the 'path' portion of the independent record
    void initialise()
    Build the DNS query Strings and set the root/branch flag.
    void redirectHostedPath​(java.lang.String path)
    Set the hosted record to the specified path
    void redirectIndependentPath​(java.lang.String path)
    Set the independent record to the specified path
    void setEmailRecordDistributionLevels​(int levels)
    A Zone Distribution Record has been found so we need to update the email lookups accordingly.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModuleDNSQueries

      public ModuleDNSQueries​(int moduleNumber, @NonNull @NonNull java.lang.String numId) throws uk.num.numlib.exc.NumInvalidParameterException
      Constructor
      Parameters:
      moduleNumber - the module ID string
      numId - the NUM ID.
      Throws:
      uk.num.numlib.exc.NumInvalidParameterException - on error
  • Method Details

    • initialise

      public void initialise() throws uk.num.numlib.exc.NumInvalidParameterException
      Build 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.NumInvalidParameterException
      A 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.NumInvalidDNSQueryException
      Extract 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.NumInvalidDNSQueryException
      Extract 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

      public void redirectHostedPath​(java.lang.String path) throws NumInvalidRedirectException
      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

      public void redirectIndependentPath​(java.lang.String path) throws NumInvalidRedirectException
      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