nl.surfnet.coin.csa.control
Class BaseController

java.lang.Object
  extended by nl.surfnet.coin.csa.control.BaseController
Direct Known Subclasses:
CspStatusController, IdpLnmgListController, SpLmngDataBindingController, SpLnmgListController, TaxonomyController

@Controller
public abstract class BaseController
extends Object

Abstract controller used to set model attributes to the request


Field Summary
static String ALL_IDPS
          The name of the key under which all identityproviders are stored
static String COMPOUND_SP
          The name of the key under which a compoundSps (e.g.
static String COMPOUND_SPS
          The name of the key under which all compoundSps (e.g.
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 FILTER_APP_GRID_ALLOWED
          The name of the key under which we store the info if a logged user is allowed to filter in the app grid
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.
static String IS_ADMIN_USER
          The name of the key under which we store the info if a logged user is a kind of admin
static String IS_GOD
          The name of the key under which we store the info if the logged in user is Distribution Channel Admin (aka God)
protected  org.springframework.web.servlet.LocaleResolver localeResolver
           
static String RAW_ARP_ATTRIBUTES_VISIBLE
          Key in which we store whether a user should see the technical attribute names of an ARP.
protected static String SELECTED_IDP
          Key in which we store the currently selected IdP
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 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<IdentityProvider> getMyInstitutionIdps()
           
protected  IdentityProvider getSelectedIdp(javax.servlet.http.HttpServletRequest request)
           
 Object handleAjaxResponseException(AjaxResponseException e)
          Handler for AjaxResponseException.
protected  IdentityProvider 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

COMPOUND_SPS

public static final String COMPOUND_SPS
The name of the key under which all compoundSps (e.g. the services) are stored

See Also:
Constant Field Values

ALL_IDPS

public static final String ALL_IDPS
The name of the key under which all identityproviders are stored

See Also:
Constant Field Values

COMPOUND_SP

public static final String COMPOUND_SP
The name of the key under which a compoundSps (e.g. the 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

FILTER_APP_GRID_ALLOWED

public static final String FILTER_APP_GRID_ALLOWED
The name of the key under which we store the info if a logged user is allowed to filter in the app grid

See Also:
Constant Field Values

IS_ADMIN_USER

public static final String IS_ADMIN_USER
The name of the key under which we store the info if a logged user is a kind of admin

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

IS_GOD

public static final String IS_GOD
The name of the key under which we store the info if the logged in user is Distribution Channel Admin (aka God)

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

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

RAW_ARP_ATTRIBUTES_VISIBLE

public static final String RAW_ARP_ATTRIBUTES_VISIBLE
Key in which we store whether a user should see the technical attribute names of an ARP.

See Also:
Constant Field Values

SELECTED_IDP

protected static final String SELECTED_IDP
Key in which we store the currently selected IdP

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<IdentityProvider> getMyInstitutionIdps()

getLocale

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

getSelectedIdp

protected IdentityProvider getSelectedIdp(javax.servlet.http.HttpServletRequest request)

switchIdp

protected IdentityProvider switchIdp(javax.servlet.http.HttpServletRequest request,
                                     String switchIdpId)

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 © 2013 SURFnet bv, The Netherlands. All Rights Reserved.