/** * Returns the OpenCms user session info for the given http session, * or <code>null</code> if no user session is available.<p> * * @param session the current http session * * @return the OpenCms user session info for the given http session, or <code>null</code> if no user session is available */ public CmsSessionInfo getSessionInfo(HttpSession session) { if (session == null) { return null; } CmsUUID sessionId = (CmsUUID)session.getAttribute(CmsSessionInfo.ATTRIBUTE_SESSION_ID); return (sessionId == null) ? null : getSessionInfo(sessionId); }
CmsSessionInfo sessionInfo = getSessionInfo(event.getSession()); CmsUUID userId = null; if (sessionInfo != null) {
/** * Returns the OpenCms user session info for the given http session, * or <code>null</code> if no user session is available.<p> * * @param session the current http session * * @return the OpenCms user session info for the given http session, or <code>null</code> if no user session is available */ public CmsSessionInfo getSessionInfo(HttpSession session) { if (session == null) { return null; } CmsUUID sessionId = (CmsUUID)session.getAttribute(CmsSessionInfo.ATTRIBUTE_SESSION_ID); return (sessionId == null) ? null : getSessionInfo(sessionId); }
CmsSessionInfo sessionInfo = getSessionInfo(event.getSession()); CmsUUID userId = null; if (sessionInfo != null) {
/** * Returns the OpenCms user session info for the given request, * or <code>null</code> if no user session is available.<p> * * @param req the current request * * @return the OpenCms user session info for the given request, or <code>null</code> if no user session is available */ public CmsSessionInfo getSessionInfo(HttpServletRequest req) { HttpSession session = req.getSession(false); if (session == null) { // special case for accessing a session from "outside" requests (e.g. upload applet) String sessionId = req.getHeader(CmsRequestUtil.HEADER_JSESSIONID); return sessionId == null ? null : getSessionInfo(sessionId); } return getSessionInfo(session); }
/** * Returns the OpenCms user session info for the given request, * or <code>null</code> if no user session is available.<p> * * @param req the current request * * @return the OpenCms user session info for the given request, or <code>null</code> if no user session is available */ public CmsSessionInfo getSessionInfo(HttpServletRequest req) { HttpSession session = req.getSession(false); if (session == null) { // special case for accessing a session from "outside" requests (e.g. upload applet) String sessionId = req.getHeader(CmsRequestUtil.HEADER_JSESSIONID); return sessionId == null ? null : getSessionInfo(sessionId); } return getSessionInfo(session); }
/** * Returns the complete user session info of a user from the session storage, * or <code>null</code> if this session id has no session info attached.<p> * * @param sessionId the OpenCms session id to return the session info for, * this must be a String representation of a {@link CmsUUID} * * @return the complete user session info of a user from the session storage * * @see #getSessionInfo(CmsUUID) */ public CmsSessionInfo getSessionInfo(String sessionId) { return getSessionInfo(getSessionUUID(sessionId)); }
/** * Returns the complete user session info of a user from the session storage, * or <code>null</code> if this session id has no session info attached.<p> * * @param sessionId the OpenCms session id to return the session info for, * this must be a String representation of a {@link CmsUUID} * * @return the complete user session info of a user from the session storage * * @see #getSessionInfo(CmsUUID) */ public CmsSessionInfo getSessionInfo(String sessionId) { return getSessionInfo(getSessionUUID(sessionId)); }
while (itIds.hasNext()) { String id = itIds.next(); CmsSessionInfo session = OpenCms.getSessionManager().getSessionInfo(id); if (session != null) { try {
while (itIds.hasNext()) { String id = itIds.next(); CmsSessionInfo session = OpenCms.getSessionManager().getSessionInfo(id); if (session != null) { try {
/** * Returns the broadcast queue for the given OpenCms session id.<p> * * @param sessionId the OpenCms session id to get the broadcast queue for * * @return the broadcast queue for the given OpenCms session id */ public Buffer getBroadcastQueue(String sessionId) { CmsSessionInfo sessionInfo = getSessionInfo(getSessionUUID(sessionId)); if (sessionInfo == null) { // return empty message buffer if the session is gone or not available return BufferUtils.synchronizedBuffer(new CircularFifoBuffer(CmsSessionInfo.QUEUE_SIZE)); } return sessionInfo.getBroadcastQueue(); }
/** * Returns the broadcast queue for the given OpenCms session id.<p> * * @param sessionId the OpenCms session id to get the broadcast queue for * * @return the broadcast queue for the given OpenCms session id */ public Buffer getBroadcastQueue(String sessionId) { CmsSessionInfo sessionInfo = getSessionInfo(getSessionUUID(sessionId)); if (sessionInfo == null) { // return empty message buffer if the session is gone or not available return BufferUtils.synchronizedBuffer(new CircularFifoBuffer(CmsSessionInfo.QUEUE_SIZE)); } return sessionInfo.getBroadcastQueue(); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#fillDetails(java.lang.String) */ @Override protected void fillDetails(String detailId) { // get content List<CmsListItem> sessions = getList().getAllContent(); Iterator<CmsListItem> i = sessions.iterator(); while (i.hasNext()) { CmsListItem item = i.next(); CmsSessionInfo session = OpenCms.getSessionManager().getSessionInfo(new CmsUUID(item.getId())); StringBuffer html = new StringBuffer(32); if (detailId.equals(LIST_DETAIL_EMAIL)) { // email try { CmsUser user = getCms().readUser(session.getUserId()); html.append(user.getEmail()); } catch (CmsException e) { // should never happen } } else { continue; } item.set(detailId, html.toString()); } }
CmsSessionInfo sessionInfo = OpenCms.getSessionManager().getSessionInfo(getSession()); if (sessionInfo == null) { return null;
CmsSessionInfo info = OpenCms.getSessionManager().getSessionInfo(getHttpSession()); Buffer queue = info.getBroadcastQueue(); if (!queue.isEmpty()) {
CmsSessionInfo sessionInfo = OpenCms.getSessionManager().getSessionInfo(getSession()); if (sessionInfo == null) { return null;
CmsSessionInfo sessionInfo = m_sessionManager.getSessionInfo(req);
CmsSessionInfo sessionInfo = getSessionInfo(req); if (sessionInfo != null) {
CmsSessionInfo sessionInfo = OpenCms.getSessionManager().getSessionInfo(getRequest().getSession()); if (sessionInfo == null) { return null;
CmsSessionInfo sessionInfo = getSessionInfo(session); if (sessionInfo != null) {