nl.surfnet.coin.selfservice.control
Class BaseController
java.lang.Object
nl.surfnet.coin.selfservice.control.BaseController
- Direct Known Subclasses:
- ActionListController, HomeController, ServiceDetailController, ServiceListController, SpDetailController, SpLinkController, SpListController, SpUnlinkController, StatisticController
@Controller
public abstract class BaseController
- extends Object
Abstract controller used to set model attributes to the request
|
Field Summary |
protected org.springframework.web.servlet.LocaleResolver |
localeResolver
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
localeResolver
protected org.springframework.web.servlet.LocaleResolver localeResolver
BaseController
public BaseController()
getMyInstitutionIdps
@ModelAttribute(value="idps")
public List<IdentityProvider> getMyInstitutionIdps()
getLocale
@ModelAttribute(value="locale")
public Locale getLocale(javax.servlet.http.HttpServletRequest request)
getRequestedIdp
@ModelAttribute(value="selectedidp")
public IdentityProvider getRequestedIdp(@RequestParam(required=false)
String idpId,
javax.servlet.http.HttpServletRequest request)
- Exposes the requested IdP for use in RequestMapping methods.
- Parameters:
idpId - the idp selected in the viewrequest - HttpServletRequest, for storing/retrieving the selected idp in the http session.
- Returns:
- the IdentityProvider selected, or null in case of unknown/invalid idpId
getCurrentRole
@ModelAttribute(value="currentrole")
public String getCurrentRole(@RequestParam(required=false)
String role,
javax.servlet.http.HttpServletRequest request)
- Exposes the current role of the user for use in RequestMapping methods
- Parameters:
role - the name of the GrantedAuthorityrequest - HttpServletRequest, for storing/retrieving the selected role in the http session
- Returns:
- the name of the selected
GrantedAuthority
buildMenu
protected static Menu buildMenu(BaseController.MenuType type,
String selectedItem)
- Builds a
Menu based on BaseController.MenuType and the identifier of the selected menu item
- Parameters:
type - BaseController.MenuTypeselectedItem - identifier of the selected menu item, can be null or empty
- Returns:
- Menu
Copyright © 2012 SURFnet bv, The Netherlands. All Rights Reserved.