@Override public void setContentType(String type) { ((MimeResponse)response).setContentType(type); }
@Override public void setContentType(String type) { if (response instanceof MimeResponse) { ((MimeResponse) response).setContentType(type); } else { throw new RuntimeException( "Content type cannot be set for response of type " + response.getClass().getName()); } }
public static void writeJSON( PortletRequest portletRequest, MimeResponse mimeResponse, Object jsonObj) throws IOException { mimeResponse.setContentType(_getContentType(portletRequest)); PortletResponseUtil.write(mimeResponse, jsonObj.toString()); mimeResponse.flushBuffer(); }
protected void writeJSON( PortletRequest portletRequest, MimeResponse mimeResponse, Object jsonObj) throws IOException { mimeResponse.setContentType(getJSONContentType(portletRequest)); PortletResponseUtil.write(mimeResponse, jsonObj.toString()); mimeResponse.flushBuffer(); }
/** {@inheritDoc} */ public void setContentType(String contentType) { response.setContentType(contentType); } }
public void setContentType(String contentType) { mresp.setContentType(contentType); } }
@Override public void setContentType(String type) { if (!included && (portletResponse instanceof MimeResponse)) { ((MimeResponse) portletResponse).setContentType(type); } }
protected void setResponseContentType(String type) { if (isMimeResponse) { ((MimeResponse) this.response).setContentType(type); } }
@Override public void setContentType(String contentType) { mimeResponse.setContentType(contentType); }
@Override public void setContentType(String contentType) { mimeResponse.setContentType(contentType); }
public void setContentType(String type) { PortletResponse portletResponse = getWrapped(); if (portletResponse instanceof MimeResponse) { MimeResponse mimeResponse = (MimeResponse) portletResponse; mimeResponse.setContentType(type); } else { throw new UnsupportedOperationException(); } }
public void setContentType(String type) { PortletResponse portletResponse = getWrapped(); if (portletResponse instanceof MimeResponse) { MimeResponse mimeResponse = (MimeResponse) portletResponse; mimeResponse.setContentType(type); } else { throw new UnsupportedOperationException(); } }
public void setContentType(String type) { getResponse().setContentType(type); }
public void setContentType(String type) { getResponse().setContentType(type); }
mimeResponse.setContentType(contentType);
/** * @see {@link ExternalContext#setResponseContentType(String)} * @since JSF 2.0 */ @Override public void setResponseContentType(String contentType) { if (portletResponse instanceof MimeResponse) { MimeResponse mimeResponse = (MimeResponse) portletResponse; mimeResponse.setContentType(contentType); } else { if (manageIncongruities) { incongruityContext.setResponseContentType(contentType); } else { throw new IllegalStateException(); } } }
/** * @see {@link ExternalContext#setResponseContentType(String)} * @since JSF 2.0 */ @Override public void setResponseContentType(String contentType) { if (portletResponse instanceof MimeResponse) { MimeResponse mimeResponse = (MimeResponse) portletResponse; mimeResponse.setContentType(contentType); } else { if (manageIncongruities) { incongruityContext.setResponseContentType(contentType); } else { throw new IllegalStateException(); } } }
public static void ensureContentTypeHeader(final MimeResponse response, final String contentType) { final String responseContentType = response.getContentType(); if (!StringUtils.equalsIgnoreCaseAndWhitespace(responseContentType, contentType)) { response.setContentType(contentType); if (LOG.isDebugEnabled()) { LOG.debug("Response already contains Header Content-Type '" + responseContentType + "'. Overwriting with '" + contentType + "'"); } } }
logger.debug("Setting portlet response content type to view-determined type [" + contentType + "]"); response.setContentType(contentType);
logger.debug("Setting portlet response content type to view-determined type [" + contentType + "]"); response.setContentType(contentType);