Package com.liferay.portal.model

Examples of com.liferay.portal.model.UserTracker


  public UserTrackerModifiedDateComparator(boolean asc) {
    _asc = asc;
  }

  public int compare(Object obj1, Object obj2) {
    UserTracker userTracker1 = (UserTracker)obj1;
    UserTracker userTracker2 = (UserTracker)obj2;

    int value = userTracker1.getModifiedDate().compareTo(
      userTracker2.getModifiedDate());

    if (_asc) {
      return value;
    }
    else {
View Full Code Here


    }
    else if (userTrackerId == null) {
      return null;
    }
    else {
      UserTracker obj = null;
      String key = userTrackerId.toString();

      if (Validator.isNull(key)) {
        return null;
      }
View Full Code Here

    }
    else if (userTrackerId == null) {
      return null;
    }
    else {
      UserTracker obj = null;
      String key = userTrackerId.toString();

      if (Validator.isNull(key)) {
        return null;
      }
View Full Code Here

            new Map.Entry[0]);

        for (int i = 0; i < currentUsersArray.length; i++) {
          Map.Entry mapEntry = currentUsersArray[i];

          UserTracker userTracker = (UserTracker)mapEntry.getValue();

          if (userTracker.getUserId().equals(user.getUserId())) {

            // Disable old login

            userTracker.getHttpSession().setAttribute(
              WebKeys.STALE_SESSION, new Boolean(true));
          }
        }
      }

      UserTracker userTracker =
        (UserTracker)currentUsers.get(ses.getId());

      if (userTracker == null) {
        userTracker = new UserTracker(
          ses.getId(), companyId, PortalUtil.getUser(req).getUserId(), new Date(),
          req.getRemoteAddr(), req.getRemoteHost(),
          req.getHeader("USER-AGENT"));

        userTracker.setHttpSession(ses);

        currentUsers.put(ses.getId(), userTracker);
      }

//      if (!GetterUtil.getBoolean(PropsUtil.get(
View Full Code Here

        PropsUtil.LOG_USER_PATHS), false)) {

      String userTrackerId = Long.toString(CounterManagerUtil.increment(
        UserTracker.class.getName()));

      UserTracker userTracker = UserTrackerUtil.create(userTrackerId);

      userTracker.setCompanyId(companyId);
      userTracker.setUserId(userId);
      userTracker.setModifiedDate(modifiedDate);
      userTracker.setRemoteAddr(remoteAddr);
      userTracker.setRemoteHost(remoteHost);
      userTracker.setUserAgent(userAgent);

      UserTrackerUtil.update(userTracker);

      Iterator itr = userTrackerPaths.iterator();
View Full Code Here

    String companyId = PortalUtil.getCompanyId(req);

    Map currentUsers = (Map)WebAppPool.get(
      companyId, WebKeys.CURRENT_USERS);

    UserTracker userTracker = (UserTracker)currentUsers.get(ses.getId());

    if ((userTracker != null) &&
      ((path != null) &&
        (!path.equals(_PATH_C)) &&
        (path.indexOf(_PATH_J_SECURITY_CHECK) == -1) &&
        (path.indexOf(_PATH_PORTAL_PROTECTED) == -1))) {

      /*Map parameterMap = null;

      if (req instanceof UploadServletRequest) {
        UploadServletRequest uploadServletReq =
          (UploadServletRequest)req;

        parameterMap = uploadServletReq.getRequest().getParameterMap();
      }
      else {
        parameterMap = req.getParameterMap();
      }*/

      StringBuffer fullPathSB = new StringBuffer();

      fullPathSB.append(path);
      //fullPathSB.append(Http.parameterMapToString(parameterMap));
      fullPathSB.append(StringPool.QUESTION);
      fullPathSB.append(req.getQueryString());

      userTracker.addPath(
        new UserTrackerPath(
          userTracker.getUserTrackerId(),
          userTracker.getUserTrackerId(), fullPathSB.toString(),
          new Date()));
    }

    String userId = req.getRemoteUser();

View Full Code Here

  // Business methods

  public List getUserTrackerPaths(String userTrackerId, int begin, int end)
    throws PortalException, SystemException {

    UserTracker userTracker =
      UserTrackerUtil.findByPrimaryKey(userTrackerId);

    if (!hasAdministrator(userTracker.getCompanyId())) {
      throw new PrincipalException();
    }

    return UserTrackerPathLocalManagerUtil.getUserTrackerPaths(
      userTrackerId, begin, end);
View Full Code Here

TOP

Related Classes of com.liferay.portal.model.UserTracker

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.