Search in sources :

Example 16 with UserBean

use of org.onebusaway.users.client.model.UserBean in project onebusaway-application-modules by camsys.

the class CurrentUserInterceptor method intercept.

@Override
public String intercept(ActionInvocation invocation) throws Exception {
    final Object action = invocation.getAction();
    if (action instanceof CurrentUserAware) {
        CurrentUserAware currentUserAware = (CurrentUserAware) action;
        UserBean currentUser = _currentUserService.getCurrentUser();
        if (currentUser != null)
            currentUserAware.setCurrentUser(currentUser);
    }
    return invocation.invoke();
}
Also used : UserBean(org.onebusaway.users.client.model.UserBean) CurrentUserAware(org.onebusaway.presentation.services.CurrentUserAware)

Aggregations

UserBean (org.onebusaway.users.client.model.UserBean)16 User (org.onebusaway.users.model.User)8 UserIndex (org.onebusaway.users.model.UserIndex)8 UserIndexKey (org.onebusaway.users.model.UserIndexKey)6 ArrayList (java.util.ArrayList)3 UserDetail (org.onebusaway.admin.model.ui.UserDetail)3 IOException (java.io.IOException)2 SQLException (java.sql.SQLException)2 List (java.util.List)2 WebApplicationException (javax.ws.rs.WebApplicationException)2 JsonGenerationException (org.codehaus.jackson.JsonGenerationException)2 JsonMappingException (org.codehaus.jackson.map.JsonMappingException)2 Criteria (org.hibernate.Criteria)2 HibernateException (org.hibernate.HibernateException)2 Session (org.hibernate.Session)2 UserRole (org.onebusaway.users.model.UserRole)2 ValueStack (com.opensymphony.xwork2.util.ValueStack)1 HashMap (java.util.HashMap)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1