if (name.equals(PortalConstants.SESSION_CONTEXT_NAME) && context == null) {
Request req = ObjectModelHelper.getRequest(objectModel);
Session session = req.getSession(false);
if (session != null) {
PortalManager portal = null;
try {
portal = (PortalManager)manager.lookup(PortalManager.ROLE);
// is this an external resource which wants access to a coplet?
String value = req.getParameter("portalcontext");
if (value != null) {
int sepOne, sepTwo;
sepOne = value.indexOf('_');
if (sepOne != -1) {
sepTwo = value.indexOf('_', sepOne+1);
if (sepTwo != -1) {
String copletIdentifier = value.substring(0, sepOne);
String copletID = value.substring(sepOne+1, sepTwo);
String copletNumber = value.substring(sepTwo+1);
if (copletIdentifier.equals("coplet")) {
Map info = new HashMap(3);
SessionContextImpl.copletInfo.set(info);
SourceParameters pars = new SourceParameters();
info.put(PortalConstants.COPLETINFO_PARAMETERS, pars);
pars.setSingleParameterValue(PortalConstants.PARAMETER_ID, copletID);
pars.setSingleParameterValue(PortalConstants.PARAMETER_NUMBER, copletNumber);
pars.setSingleParameterValue(PortalConstants.PARAMETER_MEDIA, portal.getMediaType());
info.put(PortalConstants.COPLETINFO_STATUSPROFILE, portal.getStatusProfile());
info.put(PortalConstants.COPLETINFO_PORTALURI, req.getRequestURI());
}
}
}
} else {