org.nhindirect.config.ui
Class DNSController

java.lang.Object
  extended by org.nhindirect.config.ui.DNSController

@Controller
@RequestMapping(value="/dns")
public class DNSController
extends Object

Controller (MVC) for "Manage DNS Entries" pages.


Nested Class Summary
static class DNSController.CertContainer
           
 
Constructor Summary
DNSController()
           
 
Method Summary
 org.springframework.web.servlet.ModelAndView addA4Setting(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm AAdnsForm, org.springframework.ui.Model model, String actionPath)
           
 org.springframework.web.servlet.ModelAndView addCertSetting(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm CertdnsForm, org.springframework.ui.Model model, String actionPath)
           
 org.springframework.web.servlet.ModelAndView addCNAMESetting(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm CdnsForm, org.springframework.ui.Model model, String actionPath)
           
 org.springframework.web.servlet.ModelAndView addMXSetting(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm MXdnsForm, org.springframework.ui.Model model, String actionPath)
           
 org.springframework.web.servlet.ModelAndView addNSSetting(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm NSdnsForm, org.springframework.ui.Model model, String actionPath)
           
 org.springframework.web.servlet.ModelAndView addSetting(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm AdnsForm, DNSEntryForm AAdnsForm, DNSEntryForm CdnsForm, DNSEntryForm CertdnsForm, DNSEntryForm SrvdnsForm, DNSEntryForm MXdnsForm, org.springframework.ui.Model model, String actionPath)
           
 org.springframework.web.servlet.ModelAndView addSetting(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm AdnsForm, org.springframework.ui.Model model, String actionPath)
           
 org.springframework.web.servlet.ModelAndView addSOASetting(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm SoadnsForm, org.springframework.ui.Model model, String actionPath)
           
 org.springframework.web.servlet.ModelAndView addSRVSetting(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm SrvdnsForm, org.springframework.ui.Model model, String actionPath)
           
static String getThumbPrint(X509Certificate cert)
           
 String handleIOException(IOException ex, javax.servlet.http.HttpServletRequest request)
          Handle exceptions as gracefully as possible
static String hexify(byte[] bytes)
           
 org.springframework.web.servlet.ModelAndView navigate(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm entryForm, org.springframework.ui.Model model, String actionPath)
           
 void refreshModelFromService(org.springframework.ui.Model model)
           
 org.springframework.web.servlet.ModelAndView removeAnchors(String requestedWith, DNSEntryForm AdnsForm, DNSEntryForm NSdnsForm, DNSEntryForm AAdnsForm, DNSEntryForm CdnsForm, DNSEntryForm CertdnsForm, DNSEntryForm SrvdnsForm, DNSEntryForm SoadnsForm, DNSEntryForm MXdnsForm, javax.servlet.http.HttpSession session, org.springframework.ui.Model model, String actionPath)
           
 void setConfigurationService(org.nhindirect.config.service.ConfigurationService service)
           
 org.springframework.web.servlet.ModelAndView showDNSEntries(String requestedWith, javax.servlet.http.HttpSession session, DNSEntryForm entryForm, org.springframework.ui.Model model, String actionPath)
           
 DNSController.CertContainer toCertContainer(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DNSController

public DNSController()
Method Detail

setConfigurationService

@Inject
public void setConfigurationService(org.nhindirect.config.service.ConfigurationService service)

navigate

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/navigate",
                method=GET)
public org.springframework.web.servlet.ModelAndView navigate(@RequestHeader(value="X-Requested-With",required=false)
                                                                                         String requestedWith,
                                                                                         javax.servlet.http.HttpSession session,
                                                                                         @ModelAttribute
                                                                                         DNSEntryForm entryForm,
                                                                                         org.springframework.ui.Model model,
                                                                                         @RequestParam(value="submitType")
                                                                                         String actionPath)

showDNSEntries

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(method=GET)
public org.springframework.web.servlet.ModelAndView showDNSEntries(@RequestHeader(value="X-Requested-With",required=false)
                                                                                               String requestedWith,
                                                                                               javax.servlet.http.HttpSession session,
                                                                                               @ModelAttribute
                                                                                               DNSEntryForm entryForm,
                                                                                               org.springframework.ui.Model model,
                                                                                               @RequestParam(value="submitType")
                                                                                               String actionPath)

addSetting

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/addDNSRecord",
                method=POST)
public org.springframework.web.servlet.ModelAndView addSetting(@RequestHeader(value="X-Requested-With",required=false)
                                                                                           String requestedWith,
                                                                                           javax.servlet.http.HttpSession session,
                                                                                           @ModelAttribute(value="AdnsForm")
                                                                                           DNSEntryForm AdnsForm,
                                                                                           @ModelAttribute(value="AAdnsForm")
                                                                                           DNSEntryForm AAdnsForm,
                                                                                           @ModelAttribute(value="CdnsForm")
                                                                                           DNSEntryForm CdnsForm,
                                                                                           @ModelAttribute(value="CertdnsForm")
                                                                                           DNSEntryForm CertdnsForm,
                                                                                           @ModelAttribute(value="SrvdnsForm")
                                                                                           DNSEntryForm SrvdnsForm,
                                                                                           @ModelAttribute(value="MXdnsForm")
                                                                                           DNSEntryForm MXdnsForm,
                                                                                           org.springframework.ui.Model model,
                                                                                           @RequestParam(value="submitType")
                                                                                           String actionPath)

addSetting

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/addADNSRecord",
                method=POST)
public org.springframework.web.servlet.ModelAndView addSetting(@RequestHeader(value="X-Requested-With",required=false)
                                                                                           String requestedWith,
                                                                                           javax.servlet.http.HttpSession session,
                                                                                           @ModelAttribute(value="AdnsForm")
                                                                                           DNSEntryForm AdnsForm,
                                                                                           org.springframework.ui.Model model,
                                                                                           @RequestParam(value="submitType")
                                                                                           String actionPath)

addNSSetting

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/addNSDNSRecord",
                method=POST)
public org.springframework.web.servlet.ModelAndView addNSSetting(@RequestHeader(value="X-Requested-With",required=false)
                                                                                             String requestedWith,
                                                                                             javax.servlet.http.HttpSession session,
                                                                                             @ModelAttribute(value="NSdnsForm")
                                                                                             DNSEntryForm NSdnsForm,
                                                                                             org.springframework.ui.Model model,
                                                                                             @RequestParam(value="submitType")
                                                                                             String actionPath)

addA4Setting

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/addA4DNSRecord",
                method=POST)
public org.springframework.web.servlet.ModelAndView addA4Setting(@RequestHeader(value="X-Requested-With",required=false)
                                                                                             String requestedWith,
                                                                                             javax.servlet.http.HttpSession session,
                                                                                             @ModelAttribute(value="AAdnsForm")
                                                                                             DNSEntryForm AAdnsForm,
                                                                                             org.springframework.ui.Model model,
                                                                                             @RequestParam(value="submitType")
                                                                                             String actionPath)

addMXSetting

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/addMXDNSRecord",
                method=POST)
public org.springframework.web.servlet.ModelAndView addMXSetting(@RequestHeader(value="X-Requested-With",required=false)
                                                                                             String requestedWith,
                                                                                             javax.servlet.http.HttpSession session,
                                                                                             @ModelAttribute(value="MXdnsForm")
                                                                                             DNSEntryForm MXdnsForm,
                                                                                             org.springframework.ui.Model model,
                                                                                             @RequestParam(value="submitType")
                                                                                             String actionPath)

addCNAMESetting

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/addCNAMEDNSRecord",
                method=POST)
public org.springframework.web.servlet.ModelAndView addCNAMESetting(@RequestHeader(value="X-Requested-With",required=false)
                                                                                                String requestedWith,
                                                                                                javax.servlet.http.HttpSession session,
                                                                                                @ModelAttribute(value="CdnsForm")
                                                                                                DNSEntryForm CdnsForm,
                                                                                                org.springframework.ui.Model model,
                                                                                                @RequestParam(value="submitType")
                                                                                                String actionPath)

addSRVSetting

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/addSRVDNSRecord",
                method=POST)
public org.springframework.web.servlet.ModelAndView addSRVSetting(@RequestHeader(value="X-Requested-With",required=false)
                                                                                              String requestedWith,
                                                                                              javax.servlet.http.HttpSession session,
                                                                                              @ModelAttribute(value="SrvdnsForm")
                                                                                              DNSEntryForm SrvdnsForm,
                                                                                              org.springframework.ui.Model model,
                                                                                              @RequestParam(value="submitType")
                                                                                              String actionPath)

addCertSetting

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/addCertDNSRecord",
                method=POST)
public org.springframework.web.servlet.ModelAndView addCertSetting(@RequestHeader(value="X-Requested-With",required=false)
                                                                                               String requestedWith,
                                                                                               javax.servlet.http.HttpSession session,
                                                                                               @ModelAttribute(value="CertdnsForm")
                                                                                               DNSEntryForm CertdnsForm,
                                                                                               org.springframework.ui.Model model,
                                                                                               @RequestParam(value="submitType")
                                                                                               String actionPath)

addSOASetting

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/addSOADNSRecord",
                method=POST)
public org.springframework.web.servlet.ModelAndView addSOASetting(@RequestHeader(value="X-Requested-With",required=false)
                                                                                              String requestedWith,
                                                                                              javax.servlet.http.HttpSession session,
                                                                                              @ModelAttribute(value="SoadnsForm")
                                                                                              DNSEntryForm SoadnsForm,
                                                                                              org.springframework.ui.Model model,
                                                                                              @RequestParam(value="submitType")
                                                                                              String actionPath)

removeAnchors

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/removesettings",
                method=POST)
public org.springframework.web.servlet.ModelAndView removeAnchors(@RequestHeader(value="X-Requested-With",required=false)
                                                                                              String requestedWith,
                                                                                              @ModelAttribute(value="AdnsForm")
                                                                                              DNSEntryForm AdnsForm,
                                                                                              @ModelAttribute(value="NSdnsForm")
                                                                                              DNSEntryForm NSdnsForm,
                                                                                              @ModelAttribute(value="AAdnsForm")
                                                                                              DNSEntryForm AAdnsForm,
                                                                                              @ModelAttribute(value="CdnsForm")
                                                                                              DNSEntryForm CdnsForm,
                                                                                              @ModelAttribute(value="CertdnsForm")
                                                                                              DNSEntryForm CertdnsForm,
                                                                                              @ModelAttribute(value="SrvdnsForm")
                                                                                              DNSEntryForm SrvdnsForm,
                                                                                              @ModelAttribute(value="SoadnsForm")
                                                                                              DNSEntryForm SoadnsForm,
                                                                                              @ModelAttribute(value="MXdnsForm")
                                                                                              DNSEntryForm MXdnsForm,
                                                                                              javax.servlet.http.HttpSession session,
                                                                                              org.springframework.ui.Model model,
                                                                                              @RequestParam(value="submitType")
                                                                                              String actionPath)

refreshModelFromService

public void refreshModelFromService(org.springframework.ui.Model model)

handleIOException

@ExceptionHandler(value=java.io.IOException.class)
public String handleIOException(IOException ex,
                                                                          javax.servlet.http.HttpServletRequest request)
Handle exceptions as gracefully as possible

Parameters:
ex -
request -
Returns:

toCertContainer

public DNSController.CertContainer toCertContainer(byte[] data)
                                            throws Exception
Throws:
Exception

getThumbPrint

public static String getThumbPrint(X509Certificate cert)
                            throws NoSuchAlgorithmException,
                                   CertificateEncodingException
Throws:
NoSuchAlgorithmException
CertificateEncodingException

hexify

public static String hexify(byte[] bytes)


Copyright © 2011. All Rights Reserved.