Changeset 158


Ignore:
Timestamp:
06/28/11 10:17:40 (12 years ago)
Author:
merek
Message:

Code cleanup #2

Location:
trunk/src/com/bowman/cardserv
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/bowman/cardserv/rmi/RemoteHandler.java

    r155 r158  
    175175      } else {
    176176        String displayName = session.isTempUser()?session.getLoginName():um.getDisplayName(name);
    177           user = new UserStatus(name, displayName,um.getStartDate(name),um.getExpireDate(name), um.getMaxConnections(name), false);
     177        user = new UserStatus(name, displayName,um.getStartDate(name),um.getExpireDate(name), um.getMaxConnections(name), false);
    178178        user.addSession(session);
    179179        users.put(name, user);
  • trunk/src/com/bowman/cardserv/rmi/UserStatus.java

    r155 r158  
    4444    return admin;
    4545  }
    46     public String getStartDate() {
    47       return start;
    48     }
    49     public String getExpireDate()
    50     {
    51         return expire;
    52     }
     46
     47  public String getStartDate() {
     48    return start;
     49  }
     50
     51  public String getExpireDate() {
     52      return expire;
     53  }
    5354
    5455  public int getSessionCount(String profileName) {
  • trunk/src/com/bowman/cardserv/session/CspSession.java

    r155 r158  
    264264  }
    265265
    266    public String getstartMsg() {
    267       return startMsg;
    268     }
     266  public String getstartMsg() {
     267    return startMsg;
     268  }
    269269
    270270  public void close() {
  • trunk/src/com/bowman/cardserv/session/ExtNewcamdSession.java

    r155 r158  
    260260  }
    261261
    262     public String getstartMsg()
    263     {
    264         return startMsg;
    265     }
     262  public String getstartMsg() {
     263    return startMsg;
     264  }
    266265   
    267 
    268266  public void cwsConnectionFailed(CwsConnector cws, String message) {}
    269267  public void cwsEcmTimeout(CwsConnector cws, String message, int failureCount) {}
  • trunk/src/com/bowman/cardserv/session/NewcamdSession.java

    r157 r158  
    226226    try {
    227227      String startDateStr = um.getStartDate(user);
    228                 DateFormat df = new SimpleDateFormat("dd-MM-yyyy");
    229                 if (startDateStr == null) startDateDt = null;
    230                 else startDateDt = df.parse(startDateStr);
    231         }
    232         catch(ParseException ignored) {}
    233         long currDateMs = System.currentTimeMillis();
    234         long startDateMs = 0;
    235         if (startDateDt != null) startDateMs = startDateDt.getTime();
    236 
    237         return (startDateMs != 0) && (currDateMs < startDateMs);
     228      DateFormat df = new SimpleDateFormat("dd-MM-yyyy");
     229      if (startDateStr == null)
     230        startDateDt = null;
     231      else
     232        startDateDt = df.parse(startDateStr);
     233    }
     234    catch(ParseException ignored) {}
     235    long currDateMs = System.currentTimeMillis();
     236    long startDateMs = 0;
     237
     238    if (startDateDt != null)
     239      startDateMs = startDateDt.getTime();
     240
     241    return (startDateMs != 0) && (currDateMs < startDateMs);
    238242  }
    239243
     
    395399
    396400        fireCamdMessage(cardDataMsg, true);
    397         if (this.getstartMsg()!= null) {
    398         sendOsdMessage(this.getstartMsg());
    399         }        break;
     401
     402        if (this.getstartMsg() != null)
     403          sendOsdMessage(this.getstartMsg());
     404
     405        break;
    400406    }
    401407    return true;
Note: See TracChangeset for help on using the changeset viewer.