*/
public class UserPrefsInterceptor extends AroundInterceptor {
public static final String USER_PREFS_SESSION_KEY = "_USER_PREFS_SESSION_KEY_";
protected void before(ActionInvocation invocation) {
Action action = invocation.getAction();
if (action instanceof UserPrefsAware) {
UserPrefs userPrefs = (UserPrefs) invocation.getInvocationContext().getSession().get(USER_PREFS_SESSION_KEY);
if (userPrefs == null) {
UserPrefsService service = (UserPrefsService) Application.getInstance().getContainer().getComponent(UserPrefsService.class);
userPrefs = service.loadUserPrefs(RemoteUser.get().getName());