@Override public void removeAttribute(String name) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } if (isContainerAttributeName(name)) { super.removeAttribute(name); } else { getAttributeMap().remove(name); String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); super.removeAttribute(prefix + name); } }
@Override public Enumeration getParameterNames() { return Collections.enumeration(this.getParameterMap().keySet()); }
public Map<String, Object> getAttributeMap(String referencePath) { String namespace = getReferenceNamespacePath(referencePath); String prefix = getFullNamespacePrefix(namespace); int prefixLen = prefix.length(); Map<String, Object> attributesMap = this.namespaceAttributesMap.get(prefix); if (attributesMap == null) { attributesMap = new HashMap<String, Object>(); for (Enumeration attributeNames = super.getAttributeNames(); attributeNames.hasMoreElements(); ) { String encodedAttributeName = (String) attributeNames.nextElement(); if (encodedAttributeName.startsWith(prefix)) { String attributeName = encodedAttributeName.substring(prefixLen); Object attributeValue = super.getAttribute(encodedAttributeName); attributesMap.put(attributeName, attributeValue); } } this.namespaceAttributesMap.put(prefix, attributesMap); } return attributesMap; }
@Override public void setAttribute(String name, Object value) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } if (value == null) { removeAttribute(name); } else if (isContainerAttributeName(name)) { super.setAttribute(name, value); } else { getAttributeMap().put(name, value); String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); super.setAttribute(prefix + name, value); } }
Map<String, String []> parameterMap; String namespace = getReferenceNamespacePath(referencePath); String prefix = getFullNamespacePrefix(namespace); String targetComponentReferencePrefix = (isRenderPhase ? "" : getFullNamespacePrefix(getReferenceNamespace())); boolean emptyTargetComponentReferencePrefix = "".equals(targetComponentReferencePrefix);
public void invokeRender(HstContainerConfig requestContainerConfig, ServletRequest servletRequest, ServletResponse servletResponse) throws ContainerException { HstRequest hstRequest = (HstRequest) servletRequest; HstResponse hstResponse = (HstResponse) servletResponse; HstComponentWindow window = ((HstRequestImpl) hstRequest).getComponentWindow(); HstComponent component = window.getComponent(); String dispatchUrl = ((HstResponseImpl) hstResponse).getRenderPath(); dispatchUrl = ((HstRequestImpl) hstRequest).getComponentWindow().getRenderPath(); ServletRequest wrappedRequest = ((HstRequestImpl) hstRequest).getRequest();
public void invokeAction(HstContainerConfig requestContainerConfig, ServletRequest servletRequest, ServletResponse servletResponse) throws ContainerException { HstRequest hstRequest = (HstRequest) servletRequest; HstResponse hstResponse = (HstResponse) servletResponse; HstComponentWindow window = ((HstRequestImpl) hstRequest).getComponentWindow(); HstComponent component = window.getComponent();
protected void createHstRequestResponseForWindows( final HstComponentWindow window, final HstRequestContext requestContext, final ServletRequest servletRequest, final ServletResponse servletResponse, final Map<HstComponentWindow, HstRequest> requestMap, final Map<HstComponentWindow, HstResponse> responseMap, HstResponse topComponentHstResponse) { HstRequest request = new HstRequestImpl((HttpServletRequest) servletRequest, requestContext, window, HstRequest.RENDER_PHASE); HstResponseState responseState = new HstServletResponseState((HttpServletRequest) servletRequest, (HttpServletResponse) servletResponse); HstResponse response = new HstResponseImpl((HttpServletRequest) servletRequest, (HttpServletResponse) servletResponse, requestContext, window, responseState, topComponentHstResponse); if (topComponentHstResponse == null) { topComponentHstResponse = response; } requestMap.put(window, request); responseMap.put(window, response); ((HstComponentWindowImpl) window).setResponseState(responseState); Map<String, HstComponentWindow> childWindowMap = window.getChildWindowMap(); if (childWindowMap != null) { for (Map.Entry<String, HstComponentWindow> entry : childWindowMap.entrySet()) { createHstRequestResponseForWindows(entry.getValue(), requestContext, servletRequest, response, requestMap, responseMap, topComponentHstResponse); } } }
public Map<String, Object> getAttributeMap() { String referenceNamespace = this.componentWindow.getReferenceNamespace(); return getAttributeMap(referenceNamespace); }
protected String getFullNamespacePrefix(String referenceNamespace) { return getFullNamespacePrefix(referenceNamespace, true); }
@Override public void removeModel(String name) { if (modelsMap.remove(name) != null) { removeAttribute(name); } }
@Override public void setAttribute(String name, Object value) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } if (value == null) { removeAttribute(name); } else if (isContainerAttributeName(name)) { super.setAttribute(name, value); } else { getAttributeMap().put(name, value); String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); super.setAttribute(prefix + name, value); } }
public Map<String, String []> getParameterMap(String referencePath) { Map<String, String []> parameterMap = null; String namespace = getReferenceNamespacePath(referencePath); String prefix = getFullNamespacePrefix(namespace); String targetComponentReferencePrefix = (isRenderPhase ? "" : getFullNamespacePrefix(getReferenceNamespace())); boolean emptyTargetComponentReferencePrefix = "".equals(targetComponentReferencePrefix); boolean namespacedParameter = false;
public void invokeServeResource(HstContainerConfig requestContainerConfig, ServletRequest servletRequest, ServletResponse servletResponse) throws ContainerException { HstRequest hstRequest = (HstRequest) servletRequest; HstResponse hstResponse = (HstResponse) servletResponse; HstComponentWindow window = ((HstRequestImpl) hstRequest).getComponentWindow(); HstComponent component = window.getComponent(); ServletRequest wrappedRequest = ((HstRequestImpl) hstRequest).getRequest();
public void invokePrepareBeforeRender(HstContainerConfig requestContainerConfig, ServletRequest servletRequest, ServletResponse servletResponse) throws ContainerException { HstRequest hstRequest = (HstRequest) servletRequest; HstResponse hstResponse = (HstResponse) servletResponse; HstComponentWindow window = ((HstRequestImpl) hstRequest).getComponentWindow(); HstComponent component = window.getComponent();
boolean isComponentWindowRendered) { HstRequest request = new HstRequestImpl((HttpServletRequest)servletRequest, requestContext, window, HstRequest.RENDER_PHASE); window.bindResponseState((HttpServletRequest)servletRequest, (HttpServletResponse)parentResponse);
public Map<String, Object> getAttributeMap() { String referenceNamespace = this.componentWindow.getReferenceNamespace(); return getAttributeMap(referenceNamespace); }
protected String getFullNamespacePrefix(String referenceNamespace) { return getFullNamespacePrefix(referenceNamespace, true); }
@Override public void removeAttribute(String name) { if (name == null) { throw new IllegalArgumentException("attribute name cannot be null."); } if (isContainerAttributeName(name)) { super.removeAttribute(name); } else { Object value = getAttributeMap().remove(name); String prefix = getFullNamespacePrefix(this.componentWindow.getReferenceNamespace(), false); super.removeAttribute(prefix + name); } }
public void invokeRender(HstContainerConfig requestContainerConfig, ServletRequest servletRequest, ServletResponse servletResponse) throws ContainerException { HstRequest hstRequest = (HstRequest) servletRequest; HstResponse hstResponse = (HstResponse) servletResponse; HstComponentWindow window = ((HstRequestImpl) hstRequest).getComponentWindow(); HstComponent component = window.getComponent(); boolean namedDispatching = false; ServletRequest wrappedRequest = ((HstRequestImpl) hstRequest).getRequest();