Search in sources :

Example 1 with CurrentUserAware

use of org.onebusaway.presentation.services.CurrentUserAware 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

CurrentUserAware (org.onebusaway.presentation.services.CurrentUserAware)1 UserBean (org.onebusaway.users.client.model.UserBean)1