nl.surfnet.coin.selfservice.control
Class BaseController

java.lang.Object
  extended by nl.surfnet.coin.selfservice.control.BaseController
Direct Known Subclasses:
HistoryController, HomeController, LinkrequestController, NotificationController, ServiceDetailController, StatisticsController

@Controller
public abstract class BaseController
extends Object

Abstract controller used to set model attributes to the request


Field Summary
static String DEEPLINK_TO_SURFMARKET_ALLOWED
          The name of the key that defines whether a deeplink to SURFMarket should be shown.
static String FACET_CONNECTION_VISIBLE
          The name of the key under which we store the info if the connection facet is visible to the current user.
static String GROUPS_WITH_MEMBERS
          The name of the key under which we store the information from Api regarding group memberships and actual members for auto-completion in the recommendation modal popup.
protected  org.springframework.web.servlet.LocaleResolver localeResolver
           
static String NOTIFICATION_POPUP_CLOSED
          The name of the key under which we store the info if the notifications for licenses/linked services were generated already
static String NOTIFICATIONS
          The name of the key under which we store the notifications
protected static String SELECTED_IDP
          Key for the selectedIdp in the session
static String SERVICE
          The name of the key under which a service is stored for the detail view
static String SERVICE_APPLY_ALLOWED
          The name of the key under which we store the info if a logged user is allowed to request connections / disconnects
static String SERVICE_CONNECTION_VISIBLE
          The name of the key under which we store the info if the status of a technical connection is visible to the current user.
static String SERVICE_QUESTION_ALLOWED
          The name of the key under which we store the info if a logged user is allowed to ask questions
static String SERVICES
          The name of the key under which all services are stored
static String SHOW_ARP_MATCHES_PROVIDED_ATTRS
           
static String TOKEN_CHECK
          The name of the key under which we store the token used to prevent session hijacking
 
Constructor Summary
BaseController()
           
 
Method Summary
 Locale getLocale(javax.servlet.http.HttpServletRequest request)
           
 List<nl.surfnet.coin.csa.model.InstitutionIdentityProvider> getMyInstitutionIdps()
           
 NotificationMessage getNotifications(javax.servlet.http.HttpServletRequest request)
          Get notifications from the session (if available) and place as model attribute.
protected  nl.surfnet.coin.csa.model.InstitutionIdentityProvider getSelectedIdp(javax.servlet.http.HttpServletRequest request)
           
 Object handleAjaxResponseException(AjaxResponseException e)
          Handler for AjaxResponseException.
protected  void notificationPopupClosed(javax.servlet.http.HttpServletRequest request)
           
protected  nl.surfnet.coin.csa.model.InstitutionIdentityProvider switchIdp(javax.servlet.http.HttpServletRequest request, String switchIdpId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICES

public static final String SERVICES
The name of the key under which all services are stored

See Also:
Constant Field Values

SERVICE

public static final String SERVICE
The name of the key under which a service is stored for the detail view

See Also:
Constant Field Values

SERVICE_APPLY_ALLOWED

public static final String SERVICE_APPLY_ALLOWED
The name of the key under which we store the info if a logged user is allowed to request connections / disconnects

See Also:
Constant Field Values

SERVICE_QUESTION_ALLOWED

public static final String SERVICE_QUESTION_ALLOWED
The name of the key under which we store the info if a logged user is allowed to ask questions

See Also:
Constant Field Values

SERVICE_CONNECTION_VISIBLE

public static final String SERVICE_CONNECTION_VISIBLE
The name of the key under which we store the info if the status of a technical connection is visible to the current user.

See Also:
Constant Field Values

FACET_CONNECTION_VISIBLE

public static final String FACET_CONNECTION_VISIBLE
The name of the key under which we store the info if the connection facet is visible to the current user.

See Also:
Constant Field Values

DEEPLINK_TO_SURFMARKET_ALLOWED

public static final String DEEPLINK_TO_SURFMARKET_ALLOWED
The name of the key that defines whether a deeplink to SURFMarket should be shown.

See Also:
Constant Field Values

TOKEN_CHECK

public static final String TOKEN_CHECK
The name of the key under which we store the token used to prevent session hijacking

See Also:
Constant Field Values

NOTIFICATIONS

public static final String NOTIFICATIONS
The name of the key under which we store the notifications

See Also:
Constant Field Values

NOTIFICATION_POPUP_CLOSED

public static final String NOTIFICATION_POPUP_CLOSED
The name of the key under which we store the info if the notifications for licenses/linked services were generated already

See Also:
Constant Field Values

GROUPS_WITH_MEMBERS

public static final String GROUPS_WITH_MEMBERS
The name of the key under which we store the information from Api regarding group memberships and actual members for auto-completion in the recommendation modal popup.

See Also:
Constant Field Values

SHOW_ARP_MATCHES_PROVIDED_ATTRS

public static final String SHOW_ARP_MATCHES_PROVIDED_ATTRS
See Also:
Constant Field Values

SELECTED_IDP

protected static final String SELECTED_IDP
Key for the selectedIdp in the session

See Also:
Constant Field Values

localeResolver

protected org.springframework.web.servlet.LocaleResolver localeResolver
Constructor Detail

BaseController

public BaseController()
Method Detail

getMyInstitutionIdps

@ModelAttribute(value="idps")
public List<nl.surfnet.coin.csa.model.InstitutionIdentityProvider> getMyInstitutionIdps()

getLocale

@ModelAttribute(value="locale")
public Locale getLocale(javax.servlet.http.HttpServletRequest request)

getSelectedIdp

protected nl.surfnet.coin.csa.model.InstitutionIdentityProvider getSelectedIdp(javax.servlet.http.HttpServletRequest request)

switchIdp

protected nl.surfnet.coin.csa.model.InstitutionIdentityProvider switchIdp(javax.servlet.http.HttpServletRequest request,
                                                                          String switchIdpId)

getNotifications

@ModelAttribute(value="notifications")
public NotificationMessage getNotifications(javax.servlet.http.HttpServletRequest request)
Get notifications from the session (if available) and place as model attribute. Create/generate possible notifications if not found on session and add to session.


notificationPopupClosed

protected void notificationPopupClosed(javax.servlet.http.HttpServletRequest request)

handleAjaxResponseException

@ResponseStatus(value=BAD_REQUEST)
@ResponseBody
@ExceptionHandler(value=AjaxResponseException.class)
public Object handleAjaxResponseException(AjaxResponseException e)
Handler for AjaxResponseException. We don't want a 500, but a 400 and we want to stream the error message direct to the javaScript

Parameters:
e - the exception
Returns:
the response body


Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.