package compbio.controllers; import java.security.Principal; import java.util.Map; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; //import org.springframework.web.bind.annotation.RequestParam; /** * @author Alexander Sherstnev * @author Natasha Sherstneva */ @Controller public class DocumentationController { @RequestMapping(value = "/help/overview", method = RequestMethod.GET) public String formOverviewPage(Map model, Principal principal) { model.put("username", getPrincipleName(principal)); return "help/Overview"; } @RequestMapping(value = "/help/howto", method = RequestMethod.GET) public String formHowtoPage(Map model, Principal principal) { model.put("username", getPrincipleName(principal)); return "support/Notimplemented"; } @RequestMapping(value = "/help/doc", method = RequestMethod.GET) public String formDocPage(Map model, Principal principal) { model.put("username", getPrincipleName(principal)); return "support/Notimplemented"; } @RequestMapping(value = "/help/javadoc", method = RequestMethod.GET) public String formJavadoc(Map model, Principal principal) { model.put("username", getPrincipleName(principal)); return "support/Notimplemented"; } private String getPrincipleName(Principal principal) { if (null != principal.getName()) { return principal.getName(); } return "unknown"; } }