}
}
}
protected void checkInitCookie(String userID) throws WSRPException {
UserSessionMgr userSession =
this.consumerEnv.getSessionHandler().getUserSession(
getPortlet().getPortletKey().getProducerId(),
userID);
if (initCookie.getValue().equalsIgnoreCase(CookieProtocol._perUser)) {
this.markupPort = userSession.getWSRPBaseService();
if (!userSession.isInitCookieDone()) {
userSession.setInitCookieRequired(true);
initCookie();
userSession.setInitCookieDone(true);
}
} else if (initCookie.getValue().equalsIgnoreCase(CookieProtocol._perGroup)) {
PortletDescription portletDescription = producer.getPortletDescription(getPortlet().getParent());
String groupID = null;
if (portletDescription != null) {
groupID = portletDescription.getGroupID();
}
if (groupID != null) {
GroupSessionMgr groupSession = userSession.getGroupSession(groupID);
this.markupPort = groupSession.getWSRPBaseService();
if (!groupSession.isInitCookieDone()) {
groupSession.setInitCookieRequired(true);
initCookie();
groupSession.setInitCookieDone(true);
}
} else {
// means either we have no service description from the producer containg the portlet
// or the producer specified initCookieRequired perGroup but didn't provide
// a groupID in the portlet description
}
} else {
this.markupPort = userSession.getWSRPBaseService();
}
}