org.nhindirect.config.ui
Class MainController

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

@Controller
@RequestMapping(value="/main")
public class MainController
extends Object


Nested Class Summary
static class MainController.CertContainer
           
 
Constructor Summary
MainController()
           
 
Method Summary
 org.springframework.web.servlet.ModelAndView display(String requestedWith, javax.servlet.http.HttpSession session, org.springframework.ui.Model model)
          Return the login page when requested
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 newDomain(String requestedWith, javax.servlet.http.HttpSession session, org.springframework.ui.Model model)
          Set up to display a new Domain page
 void refreshModelFromService(org.springframework.ui.Model model)
           
 org.springframework.web.servlet.ModelAndView search(String requestedWith, javax.servlet.http.HttpSession session, SimpleForm simpleForm, org.springframework.ui.Model model, String actionPath)
          Execute the search and return the results
 void setConfigSvc(org.nhindirect.config.service.ConfigurationService service)
           
 void setConfigurationService(org.nhindirect.config.service.ConfigurationService service)
           
 MainController.CertContainer toCertContainer(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainController

public MainController()
Method Detail

setConfigurationService

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

search

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/search",
                method=GET)
public org.springframework.web.servlet.ModelAndView search(@RequestHeader(value="X-Requested-With",required=false)
                                                                                       String requestedWith,
                                                                                       javax.servlet.http.HttpSession session,
                                                                                       @ModelAttribute
                                                                                       SimpleForm simpleForm,
                                                                                       org.springframework.ui.Model model,
                                                                                       @RequestParam(value="submitType")
                                                                                       String actionPath)
Execute the search and return the results


display

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(method=GET)
public org.springframework.web.servlet.ModelAndView display(@RequestHeader(value="X-Requested-With",required=false)
                                                                                        String requestedWith,
                                                                                        javax.servlet.http.HttpSession session,
                                                                                        org.springframework.ui.Model model)
Return the login page when requested

Returns:

newDomain

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
@RequestMapping(value="/new",
                method=GET)
public org.springframework.web.servlet.ModelAndView newDomain(@RequestHeader(value="X-Requested-With",required=false)
                                                                                          String requestedWith,
                                                                                          javax.servlet.http.HttpSession session,
                                                                                          org.springframework.ui.Model model)
Set up to display a new Domain page

Parameters:
requestedWith -
session -
model -
Returns:

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:

setConfigSvc

public void setConfigSvc(org.nhindirect.config.service.ConfigurationService service)

getThumbPrint

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

hexify

public static String hexify(byte[] bytes)

toCertContainer

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


Copyright © 2011. All Rights Reserved.