001
014
015 package com.liferay.portal.kernel.poller.comet;
016
017 import com.liferay.portal.util.PortalUtil;
018
019 import javax.servlet.http.HttpServletRequest;
020
021
025 public abstract class BaseCometRequest implements CometRequest {
026
027 public long getCompanyId() {
028 return _companyId;
029 }
030
031 public String getPathInfo() {
032 return _pathInfo;
033 }
034
035 public HttpServletRequest getRequest() {
036 return _request;
037 }
038
039 public long getTimestamp() {
040 return _timestamp;
041 }
042
043 public long getUserId() {
044 return _userId;
045 }
046
047 public void setCompanyId(long companyId) {
048 _companyId = companyId;
049 }
050
051 public void setPathInfo(String pathInfo) {
052 _pathInfo = pathInfo;
053 }
054
055 public void setRequest(HttpServletRequest request) {
056 setCompanyId(PortalUtil.getCompanyId(request));
057 setPathInfo(request.getPathInfo());
058 setUserId(PortalUtil.getUserId(request));
059 }
060
061 public void setTimestamp(long timestamp) {
062 _timestamp = timestamp;
063 }
064
065 public void setUserId(long userId) {
066 _userId = userId;
067 }
068
069 private long _companyId;
070 private String _pathInfo;
071 private HttpServletRequest _request;
072 private long _timestamp = System.currentTimeMillis();
073 private long _userId;
074
075 }