/** * Serves the exposed bean in the specified flavor. * * <p> * This method performs the complete output from the header to the response body. * If the flavor is JSON, this method also supports JSONP via the {@code jsonp} query parameter. * * <p>The {@code depth} parameter may be used to specify a recursion depth * as in {@link Model#writeTo(Object,int,DataWriter)} * * <p>As of 1.146, the {@code tree} parameter may be used to control the output * in detail; see {@link NamedPathPruner#NamedPathPruner(String)} for details. * * <p> {@link ExportConfig} is passed by the caller to control serialization behavior * @since 1.251 */ default void serveExposedBean(StaplerRequest req, Object exposedBean, ExportConfig exportConfig) throws ServletException,IOException { serveExposedBean(req, exposedBean, exportConfig.getFlavor()); }
/** * Serves the exposed bean in the specified flavor. * * <p> * This method performs the complete output from the header to the response body. * If the flavor is JSON, this method also supports JSONP via the {@code jsonp} query parameter. * * <p>The {@code depth} parameter may be used to specify a recursion depth * as in {@link Model#writeTo(Object,int,DataWriter)} * * <p>As of 1.146, the {@code tree} parameter may be used to control the output * in detail; see {@link NamedPathPruner#NamedPathPruner(String)} for details. * * <p> {@link ExportConfig} is passed by the caller to control serialization behavior * @since 1.251 */ default void serveExposedBean(StaplerRequest req, Object exposedBean, ExportConfig exportConfig) throws ServletException,IOException { serveExposedBean(req, exposedBean, exportConfig.getFlavor()); }
@Override public void serveExposedBean(StaplerRequest req, Object exposedBean, ExportConfig config) throws ServletException, IOException { String pad=null; Flavor flavor = config.getFlavor(); setContentType(flavor.contentType); Writer w = getCompressedWriter(req);
@Override public void serveExposedBean(StaplerRequest req, Object exposedBean, ExportConfig config) throws ServletException, IOException { String pad=null; Flavor flavor = config.getFlavor(); setContentType(flavor.contentType); Writer w = getCompressedWriter(req);