/** * @param searchCriteria * @return */ public VXAuthSessionList searchAuthSessions(SearchCriteria searchCriteria) { if (searchCriteria != null && searchCriteria.getParamList() != null && searchCriteria.getParamList().size() > 0) { int clientTimeOffsetInMinute = RestUtil.getClientTimeOffset(); java.util.Date temp = null; DateUtil dateUtil = new DateUtil(); if (searchCriteria.getParamList().containsKey("startDate")) { temp = (java.util.Date) searchCriteria.getParamList().get("startDate"); temp = dateUtil.getDateFromGivenDate(temp, 0, 0, 0, 0); temp = dateUtil.addTimeOffset(temp, clientTimeOffsetInMinute); searchCriteria.getParamList().put("startDate", temp); } if (searchCriteria.getParamList().containsKey("endDate")) { temp = (java.util.Date) searchCriteria.getParamList().get("endDate"); temp = dateUtil.getDateFromGivenDate(temp, 0, 23, 59, 59); temp = dateUtil.addTimeOffset(temp, clientTimeOffsetInMinute); searchCriteria.getParamList().put("endDate", temp); } } return authSessionService.search(searchCriteria); }
public VXAuthSession getAuthSessionBySessionId(String authSessionId) { if (stringUtil.isEmpty(authSessionId)) { throw restErrorUtil.createRESTException( "Please provide the auth session id.", MessageEnums.INVALID_INPUT_DATA); } XXAuthSession xXAuthSession = daoManager.getXXAuthSession().getAuthSessionBySessionId(authSessionId); if (xXAuthSession == null) { throw restErrorUtil.createRESTException( "Please provide a valid " + "session id.", MessageEnums.INVALID_INPUT_DATA); } VXAuthSession vXAuthSession = authSessionService.populateViewBean(xXAuthSession); return vXAuthSession; }
public VXAuthSession getAuthSession(Long id) { return authSessionService.readResource(id); }
public VXLong countAuthSessions(SearchCriteria searchCriteria) { return authSessionService.getSearchCount( searchCriteria, AuthSessionService.AUTH_SESSION_SEARCH_FLDS); }