1. Move query jsps into a separate directory
[proteocache.git] / server / compbio / controllers / DocumentationController.java
index 9e7de42..07c72b9 100644 (file)
@@ -1,6 +1,5 @@
 package compbio.controllers;
 
-import java.security.Principal;
 import java.util.Map;
 
 import org.springframework.stereotype.Controller;
@@ -14,36 +13,30 @@ import org.springframework.web.bind.annotation.RequestMethod;
  * @author Natasha Sherstneva
  */
 @Controller
-public class DocumentationController {
+public class DocumentationController extends BasicController {
 
        @RequestMapping(value = "/help/overview", method = RequestMethod.GET)
-       public String formOverviewPage(Map<String, Object> model, Principal principal) {
-               model.put("username", getPrincipleName(principal));
+       public String formOverviewPage(Map<String, Object> model) {
+               model.put("username", getPrincipalName());
                return "help/Overview";
        }
 
        @RequestMapping(value = "/help/howto", method = RequestMethod.GET)
-       public String formHowtoPage(Map<String, Object> model, Principal principal) {
-               model.put("username", getPrincipleName(principal));
+       public String formHowtoPage(Map<String, Object> model) {
+               model.put("username", getPrincipalName());
                return "support/Notimplemented";
        }
 
        @RequestMapping(value = "/help/doc", method = RequestMethod.GET)
-       public String formDocPage(Map<String, Object> model, Principal principal) {
-               model.put("username", getPrincipleName(principal));
+       public String formDocPage(Map<String, Object> model) {
+               model.put("username", getPrincipalName());
                return "support/Notimplemented";
        }
 
        @RequestMapping(value = "/help/javadoc", method = RequestMethod.GET)
-       public String formJavadoc(Map<String, Object> model, Principal principal) {
-               model.put("username", getPrincipleName(principal));
+       public String formJavadoc(Map<String, Object> model) {
+               model.put("username", getPrincipalName());
                return "support/Notimplemented";
        }
 
-       private String getPrincipleName(Principal principal) {
-               if (null != principal.getName()) {
-                       return principal.getName();
-               }
-               return "unknown";
-       }
 }