Examples of IOrionUserProfileNode


Examples of org.eclipse.orion.server.user.profile.IOrionUserProfileNode

      String actualLogin = user.getUid();
      if (logger.isInfoEnabled())
        logger.info("Login success: " + actualLogin); //$NON-NLS-1$
      req.getSession().setAttribute("user", actualLogin); //$NON-NLS-1$

      IOrionUserProfileNode userProfileNode = getUserProfileService().getUserProfileNode(actualLogin, IOrionUserProfileConstants.GENERAL_PROFILE_PART);
      try {
        // try to store the login timestamp in the user profile
        userProfileNode.put(IOrionUserProfileConstants.LAST_LOGIN_TIMESTAMP, new Long(System.currentTimeMillis()).toString(), false);
        userProfileNode.flush();
      } catch (CoreException e) {
        // just log that the login timestamp was not stored
        LogHelper.log(e);
      }
      return LoginResult.OK;
View Full Code Here

Examples of org.eclipse.orion.server.user.profile.IOrionUserProfileNode

      User user = userAdmin.getUser(UserConstants.KEY_UID, uid);
      if (user == null) {
        return null;
      }
      // try to add the login timestamp to the user info
      IOrionUserProfileNode generalUserProfile = LdapAuthenticationService.getUserProfileService().getUserProfileNode(uid, IOrionUserProfileConstants.GENERAL_PROFILE_PART);
      obj.put(UserConstants.KEY_UID, uid);
      obj.put(UserConstants.KEY_LOGIN, user.getLogin());
      obj.put("Location", contextPath + user.getLocation());
      obj.put("Name", user.getName());
      if (generalUserProfile.get(IOrionUserProfileConstants.LAST_LOGIN_TIMESTAMP, null) != null) {
        Long lastLogin = Long.parseLong(generalUserProfile.get(IOrionUserProfileConstants.LAST_LOGIN_TIMESTAMP, ""));

        obj.put(IOrionUserProfileConstants.LAST_LOGIN_TIMESTAMP, lastLogin);
      }
    } catch (IllegalArgumentException e) {
      LogHelper.log(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.