org.silverpeas.web.util
Class IFrameAjaxTransportUtil

java.lang.Object
  extended by org.silverpeas.web.util.IFrameAjaxTransportUtil

public class IFrameAjaxTransportUtil
extends Object

This class provides some tools to more effectively use the technique of ajax iframe transport. User: Yohann Chastagnier Date: 16/07/13


Field Summary
static String AJAX_IFRAME_TRANSPORT
           
static String X_REQUESTED_WITH
           
 
Constructor Summary
IFrameAjaxTransportUtil()
           
 
Method Summary
static javax.ws.rs.WebApplicationException createWebApplicationExceptionWithJSonErrorInHtmlContainer(javax.ws.rs.WebApplicationException wae)
          Packaging an Web Application Exception as JSon String and then as HTML to be performed by IFrame Ajax Transport Javascript Plugin.
static String packJSonDataWithHtmlContainer(org.json.JSONObject jsonObject)
          Packaging a JSon object as HTML to be performed by IFrame Ajax Transport Javascript Plugin.
static String packJSonDataWithHtmlContainer(List<org.json.JSONObject> jsonObjects)
          Packaging a JSon object list as HTML to be performed by IFrame Ajax Transport Javascript Plugin.
protected static String packJSonDataWithHtmlContainer(String jsonString)
          Packaging a JSon string as HTML to be performed by IFrame Ajax Transport Javascript Plugin.
static String packObjectToJSonDataWithHtmlContainer(List<Object> objects)
          Packaging an object list as JSon String and then as HTML to be performed by IFrame Ajax Transport Javascript Plugin.
static String packObjectToJSonDataWithHtmlContainer(Object object)
          Packaging an object as JSon String and then as HTML to be performed by IFrame Ajax Transport Javascript Plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

X_REQUESTED_WITH

public static final String X_REQUESTED_WITH
See Also:
Constant Field Values

AJAX_IFRAME_TRANSPORT

public static final String AJAX_IFRAME_TRANSPORT
See Also:
Constant Field Values
Constructor Detail

IFrameAjaxTransportUtil

public IFrameAjaxTransportUtil()
Method Detail

createWebApplicationExceptionWithJSonErrorInHtmlContainer

public static javax.ws.rs.WebApplicationException createWebApplicationExceptionWithJSonErrorInHtmlContainer(javax.ws.rs.WebApplicationException wae)
                                                                                                     throws IOException
Packaging an Web Application Exception as JSon String and then as HTML to be performed by IFrame Ajax Transport Javascript Plugin.

Parameters:
wae -
Returns:
Throws:
IOException

packObjectToJSonDataWithHtmlContainer

public static String packObjectToJSonDataWithHtmlContainer(Object object)
                                                    throws IOException
Packaging an object as JSon String and then as HTML to be performed by IFrame Ajax Transport Javascript Plugin.

Parameters:
object -
Returns:
Throws:
IOException

packObjectToJSonDataWithHtmlContainer

public static String packObjectToJSonDataWithHtmlContainer(List<Object> objects)
                                                    throws IOException
Packaging an object list as JSon String and then as HTML to be performed by IFrame Ajax Transport Javascript Plugin.

Parameters:
objects -
Returns:
Throws:
IOException

packJSonDataWithHtmlContainer

public static String packJSonDataWithHtmlContainer(org.json.JSONObject jsonObject)
Packaging a JSon object as HTML to be performed by IFrame Ajax Transport Javascript Plugin.

Parameters:
jsonObject -
Returns:

packJSonDataWithHtmlContainer

public static String packJSonDataWithHtmlContainer(List<org.json.JSONObject> jsonObjects)
Packaging a JSon object list as HTML to be performed by IFrame Ajax Transport Javascript Plugin.

Parameters:
jsonObjects -
Returns:

packJSonDataWithHtmlContainer

protected static String packJSonDataWithHtmlContainer(String jsonString)
Packaging a JSon string as HTML to be performed by IFrame Ajax Transport Javascript Plugin.

Parameters:
jsonString -
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.