public String getNamespace() { if (namespace == null) { namespace = getPortletContainer().getContainerServices().getNamespaceMapper().encode(getPortletWindow().getId(), ""); StringBuffer validNamespace = new StringBuffer(); for (int i = 0; i < namespace.length(); i++) { char ch = namespace.charAt(i); if (Character.isJavaIdentifierPart(ch)) { validNamespace.append(ch); } else { validNamespace.append('_'); } } namespace = validNamespace.toString(); } return namespace; }
protected String encodeAttributeName(String name) { if (isReservedAttributeName(name)) { return name; } return container.getContainerServices().getNamespaceMapper().encode(window.getId(), name); }
protected String decodeAttributeName(String name) { if (isReservedAttributeName(name)) { return name; } String result = container.getContainerServices().getNamespaceMapper().decode(window.getId(), name); return result != null ? result : name; }
public HttpServletPortletRequestWrapper(HttpServletRequest hreq, HttpSession session, PortletRequest preq) { super(hreq); this.preq = preq; this.session = session; reqctx = (PortletRequestContext) preq.getAttribute(PortletInvokerService.REQUEST_CONTEXT); this.mapper = reqctx.getContainer().getContainerServices().getNamespaceMapper(); this.winId = reqctx.getPortletWindow().getId(); this.phase = (String) preq.getAttribute(PortletRequest.LIFECYCLE_PHASE); }