Package org.projectforge.user

Examples of org.projectforge.user.UserXmlPreferencesCache


    if (UserRights.getAccessChecker().isDemoUser(userId) == true && value instanceof Serializable) {
      // Store user pref for demo user only in user's session.
      MySession.get().setAttribute(key, (Serializable) value);
      return;
    }
    final UserXmlPreferencesCache userXmlPreferencesCache = UserXmlPreferencesCache.getDefaultInstance();
    userXmlPreferencesCache.putEntry(userId, key, value, persistent);
  }
View Full Code Here


    final PFUserDO user = PFUserContext.getUser();
    if (user == null) {
      // Should only occur, if user is not logged in.
      return null;
    }
    final UserXmlPreferencesCache userXmlPreferencesCache = UserXmlPreferencesCache.getDefaultInstance();
    final Integer userId = user.getId();
    if (UserRights.getAccessChecker().isDemoUser(userId) == true) {
      // Store user pref for demo user only in user's session.
      Object value = MySession.get().getAttribute(key);
      if (value != null) {
        return value;
      }
      value = userXmlPreferencesCache.getEntry(userId, key);
      if (value == null || value instanceof Serializable == false) {
        return null;
      }
      value = CloneHelper.cloneBySerialization(value);
      MySession.get().setAttribute(key, (Serializable) value);
      return value;
    }
    return userXmlPreferencesCache.getEntry(userId, key);
  }
View Full Code Here

    }
    final Integer userId = user.getId();
    if (UserRights.getAccessChecker().isDemoUser(userId) == true) {
      MySession.get().removeAttribute(key);
    }
    final UserXmlPreferencesCache userXmlPreferencesCache = UserXmlPreferencesCache.getDefaultInstance();
    return userXmlPreferencesCache.removeEntry(userId, key);
  }
View Full Code Here

TOP

Related Classes of org.projectforge.user.UserXmlPreferencesCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.