Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.forms.layout.io
Class JSONLayoutExporter

java.lang.Object
  extended by org.nuxeo.ecm.platform.forms.layout.io.JSONLayoutExporter

public class JSONLayoutExporter
extends Object

JSON exporter for layout objects

Since:
5.4.2
Author:
Anahide Tchertchian

Field Summary
static String ENCODED_VALUES_ENCODING
           
 
Constructor Summary
JSONLayoutExporter()
           
 
Method Summary
static net.sf.json.JSONObject decode(String json)
           
static String encode(net.sf.json.JSONObject jsonObject)
           
static void export(List<WidgetTypeDefinition> defs, OutputStream out)
           
static void export(WidgetTypeDefinition def, OutputStream out)
           
static net.sf.json.JSONObject exportPropsByModeToJson(Map<String,Map<String,Serializable>> propsByMode)
           
static net.sf.json.JSONObject exportPropsToJson(Map<String,Serializable> defProps)
           
static net.sf.json.JSONObject exportStringPropsToJson(Map<String,String> defProps)
           
static net.sf.json.JSONObject exportToJson(FieldDefinition fieldDef)
           
static net.sf.json.JSONObject exportToJson(LayoutDefinition layoutDef)
           
static net.sf.json.JSONObject exportToJson(LayoutDefinition layoutDef, String lang)
           
static net.sf.json.JSONObject exportToJson(LayoutRowDefinition layoutRowDef)
           
static net.sf.json.JSONObject exportToJson(WidgetDefinition widgetDef)
           
static net.sf.json.JSONObject exportToJson(WidgetDefinition widgetDef, String lang)
           
static net.sf.json.JSONObject exportToJson(WidgetTypeConfiguration conf)
           
static net.sf.json.JSONObject exportToJson(WidgetTypeDefinition def)
           
static FieldDefinition importFieldDefinition(net.sf.json.JSONObject fieldDef)
           
static LayoutDefinition importLayoutDefinition(net.sf.json.JSONObject layoutDef)
           
static LayoutRowDefinition importLayoutRowDefinition(net.sf.json.JSONObject layoutRowDef)
           
static Map<String,Serializable> importProps(net.sf.json.JSONObject defProps)
           
static Map<String,Map<String,Serializable>> importPropsByMode(net.sf.json.JSONObject propsByMode)
           
static Map<String,String> importStringProps(net.sf.json.JSONObject defProps)
           
static WidgetDefinition importWidgetDefinition(net.sf.json.JSONObject widgetDef)
           
static WidgetSelectOption importWidgetSelectionOption(net.sf.json.JSONObject selectOption)
           
static WidgetTypeConfiguration importWidgetTypeConfiguration(net.sf.json.JSONObject conf)
           
static WidgetTypeDefinition importWidgetTypeDefinition(net.sf.json.JSONObject jsonDef)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODED_VALUES_ENCODING

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

JSONLayoutExporter

public JSONLayoutExporter()
Method Detail

encode

public static String encode(net.sf.json.JSONObject jsonObject)
                     throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

decode

public static net.sf.json.JSONObject decode(String json)
                                     throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

export

public static void export(WidgetTypeDefinition def,
                          OutputStream out)
                   throws IOException
Throws:
IOException

export

public static void export(List<WidgetTypeDefinition> defs,
                          OutputStream out)
                   throws IOException
Throws:
IOException

exportToJson

public static net.sf.json.JSONObject exportToJson(WidgetTypeDefinition def)

importWidgetTypeDefinition

public static WidgetTypeDefinition importWidgetTypeDefinition(net.sf.json.JSONObject jsonDef)

exportToJson

public static net.sf.json.JSONObject exportToJson(WidgetTypeConfiguration conf)

importWidgetTypeConfiguration

public static WidgetTypeConfiguration importWidgetTypeConfiguration(net.sf.json.JSONObject conf)

exportToJson

public static net.sf.json.JSONObject exportToJson(LayoutDefinition layoutDef)

exportToJson

public static net.sf.json.JSONObject exportToJson(LayoutDefinition layoutDef,
                                                  String lang)

importLayoutDefinition

public static LayoutDefinition importLayoutDefinition(net.sf.json.JSONObject layoutDef)

exportToJson

public static net.sf.json.JSONObject exportToJson(LayoutRowDefinition layoutRowDef)

importLayoutRowDefinition

public static LayoutRowDefinition importLayoutRowDefinition(net.sf.json.JSONObject layoutRowDef)

exportToJson

public static net.sf.json.JSONObject exportToJson(WidgetDefinition widgetDef)

exportToJson

public static net.sf.json.JSONObject exportToJson(WidgetDefinition widgetDef,
                                                  String lang)

importWidgetDefinition

public static WidgetDefinition importWidgetDefinition(net.sf.json.JSONObject widgetDef)

exportToJson

public static net.sf.json.JSONObject exportToJson(FieldDefinition fieldDef)

importFieldDefinition

public static FieldDefinition importFieldDefinition(net.sf.json.JSONObject fieldDef)

importWidgetSelectionOption

public static WidgetSelectOption importWidgetSelectionOption(net.sf.json.JSONObject selectOption)

exportPropsByModeToJson

public static net.sf.json.JSONObject exportPropsByModeToJson(Map<String,Map<String,Serializable>> propsByMode)

importPropsByMode

public static Map<String,Map<String,Serializable>> importPropsByMode(net.sf.json.JSONObject propsByMode)

exportPropsToJson

public static net.sf.json.JSONObject exportPropsToJson(Map<String,Serializable> defProps)

importProps

public static Map<String,Serializable> importProps(net.sf.json.JSONObject defProps)

exportStringPropsToJson

public static net.sf.json.JSONObject exportStringPropsToJson(Map<String,String> defProps)

importStringProps

public static Map<String,String> importStringProps(net.sf.json.JSONObject defProps)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.