`
xiaoyezi1128
  • 浏览: 133557 次
  • 性别: Icon_minigender_2
  • 来自: 天津
社区版块
存档分类
最新评论

pipeline session

 
阅读更多
orderCollection = (OrderCollection)pipelineSession.getAttribute("ORDER_COLLECTION_KEY");
orderCollection = OrderCollectionManager.load(getPipelineSession());
pipelineSession = PipelineSessionManager.load(request, response);
getPipelineSession();
getOrderCollection()

map往list里放
Set ordersMapKeys = ordersMap.keySet();
for (Iterator iterator = ordersMapKeys.iterator(); iterator.hasNext();) {
ordersList.add(ordersMap.get(iterator.next()));
}

ProductVariantManager.getProductVariant(productVariantId)
site = SiteManager.findSite(request);


// get the cookie
Cookie userCookie = RequestUtil.findCookie(request, "PIPELINE_SESSION_ID");

if (userCookie != null) {

int expirationDate = site.getInt("SESSION_RETENTION");

/**
* If expiration date is different than the current
* cookie max age then set it
*/
if(userCookie.getMaxAge() != expirationDate) {
// set the cookie expire date
userCookie.setMaxAge(expirationDate * 24 * 60 * 60);

if (StringUtil.isEmpty(request.getContextPath()))
userCookie.setPath("/");
else
userCookie.setPath(request.getContextPath());

response.addCookie(userCookie);
}
}
分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

Global site tag (gtag.js) - Google Analytics