public class JSONLayoutExporter extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ENCODED_VALUES_ENCODING |
Constructor and Description |
---|
JSONLayoutExporter() |
Modifier and Type | Method and Description |
---|---|
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(String category,
LayoutDefinition layoutDef,
LayoutConversionContext ctx,
List<WidgetDefinitionConverter> widgetConverters,
OutputStream out) |
static void |
export(WidgetTypeDefinition def,
OutputStream out) |
static void |
exportLayoutType(LayoutTypeDefinition def,
OutputStream out) |
static void |
exportLayoutTypes(List<LayoutTypeDefinition> defs,
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 |
exportRenderingInfosByModeToJson(Map<String,List<RenderingInfo>> infosByMode) |
static net.sf.json.JSONArray |
exportRenderingInfosToJson(List<RenderingInfo> infos) |
static net.sf.json.JSONObject |
exportStringPropsToJson(Map<String,String> defProps) |
static net.sf.json.JSONObject |
exportToJson(FieldDefinition fieldDef) |
static net.sf.json.JSONObject |
exportToJson(Layout layout) |
static net.sf.json.JSONObject |
exportToJson(LayoutRow layoutRow) |
static net.sf.json.JSONObject |
exportToJson(LayoutRowDefinition layoutRowDef) |
static net.sf.json.JSONObject |
exportToJson(LayoutRowDefinition layoutRowDef,
String defaultRowName) |
static net.sf.json.JSONObject |
exportToJson(LayoutTypeConfiguration conf) |
static net.sf.json.JSONObject |
exportToJson(LayoutTypeDefinition def) |
static net.sf.json.JSONObject |
exportToJson(RenderingInfo info) |
static net.sf.json.JSONObject |
exportToJson(String category,
LayoutDefinition layoutDef) |
static net.sf.json.JSONObject |
exportToJson(String category,
LayoutDefinition layoutDef,
LayoutConversionContext ctx,
List<WidgetDefinitionConverter> widgetConverters)
Returns the JSON export of this layout definition
|
static net.sf.json.JSONObject |
exportToJson(Widget widget) |
static net.sf.json.JSONObject |
exportToJson(WidgetDefinition widgetDef,
LayoutConversionContext ctx,
List<WidgetDefinitionConverter> widgetConverters) |
static net.sf.json.JSONObject |
exportToJson(WidgetReference widgetRef) |
static net.sf.json.JSONObject |
exportToJson(WidgetSelectOption selectOption) |
static net.sf.json.JSONObject |
exportToJson(WidgetTypeConfiguration conf) |
static net.sf.json.JSONObject |
exportToJson(WidgetTypeDefinition def) |
protected static WidgetDefinition |
exportWidgetReference(WidgetReference widgetRef,
String category,
LayoutDefinition layoutDef,
LayoutConversionContext ctx,
LayoutStore webLayoutManager,
List<WidgetDefinitionConverter> widgetConverters) |
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 LayoutTypeConfiguration |
importLayoutTypeConfiguration(net.sf.json.JSONObject conf) |
static LayoutTypeDefinition |
importLayoutTypeDefinition(net.sf.json.JSONObject jsonDef) |
static Map<String,Serializable> |
importProps(net.sf.json.JSONObject defProps) |
static Map<String,Map<String,Serializable>> |
importPropsByMode(net.sf.json.JSONObject propsByMode) |
static RenderingInfo |
importRenderingInfo(net.sf.json.JSONObject fieldDef) |
static List<RenderingInfo> |
importRenderingInfos(net.sf.json.JSONArray jinfos) |
static Map<String,List<RenderingInfo>> |
importRenderingInfosByMode(net.sf.json.JSONObject infosByMode) |
static Map<String,String> |
importStringProps(net.sf.json.JSONObject defProps) |
static WidgetDefinition |
importWidgetDefinition(net.sf.json.JSONObject widgetDef) |
static WidgetReference |
importWidgetReference(net.sf.json.JSONObject widgetRef) |
static WidgetSelectOption |
importWidgetSelectionOption(net.sf.json.JSONObject selectOption) |
static WidgetTypeConfiguration |
importWidgetTypeConfiguration(net.sf.json.JSONObject conf) |
static WidgetTypeDefinition |
importWidgetTypeDefinition(net.sf.json.JSONObject jsonDef) |
public static final String ENCODED_VALUES_ENCODING
public JSONLayoutExporter()
public static String encode(net.sf.json.JSONObject jsonObject) throws UnsupportedEncodingException
UnsupportedEncodingException
public static net.sf.json.JSONObject decode(String json) throws UnsupportedEncodingException
UnsupportedEncodingException
public static void export(String category, LayoutDefinition layoutDef, LayoutConversionContext ctx, List<WidgetDefinitionConverter> widgetConverters, OutputStream out) throws IOException
IOException
public static void export(WidgetTypeDefinition def, OutputStream out) throws IOException
IOException
public static void export(List<WidgetTypeDefinition> defs, OutputStream out) throws IOException
IOException
public static void exportLayoutType(LayoutTypeDefinition def, OutputStream out) throws IOException
IOException
public static void exportLayoutTypes(List<LayoutTypeDefinition> defs, OutputStream out) throws IOException
IOException
public static net.sf.json.JSONObject exportToJson(WidgetTypeDefinition def)
public static WidgetTypeDefinition importWidgetTypeDefinition(net.sf.json.JSONObject jsonDef)
public static net.sf.json.JSONObject exportToJson(WidgetTypeConfiguration conf)
public static WidgetTypeConfiguration importWidgetTypeConfiguration(net.sf.json.JSONObject conf)
public static net.sf.json.JSONObject exportToJson(LayoutTypeDefinition def)
public static LayoutTypeDefinition importLayoutTypeDefinition(net.sf.json.JSONObject jsonDef)
public static net.sf.json.JSONObject exportToJson(LayoutTypeConfiguration conf)
public static LayoutTypeConfiguration importLayoutTypeConfiguration(net.sf.json.JSONObject conf)
public static net.sf.json.JSONObject exportToJson(String category, LayoutDefinition layoutDef)
public static net.sf.json.JSONObject exportToJson(String category, LayoutDefinition layoutDef, LayoutConversionContext ctx, List<WidgetDefinitionConverter> widgetConverters)
category
- the category of the layout, needed for retrieval of referenced global widgets.layoutDef
- the layout definitionctx
- the widget conversion contextwidgetConverters
- the list of ordered widget converters to use before exportprotected static WidgetDefinition exportWidgetReference(WidgetReference widgetRef, String category, LayoutDefinition layoutDef, LayoutConversionContext ctx, LayoutStore webLayoutManager, List<WidgetDefinitionConverter> widgetConverters)
public static LayoutDefinition importLayoutDefinition(net.sf.json.JSONObject layoutDef)
public static net.sf.json.JSONObject exportToJson(LayoutRowDefinition layoutRowDef, String defaultRowName)
public static net.sf.json.JSONObject exportToJson(LayoutRowDefinition layoutRowDef)
public static LayoutRowDefinition importLayoutRowDefinition(net.sf.json.JSONObject layoutRowDef)
public static net.sf.json.JSONObject exportToJson(WidgetDefinition widgetDef, LayoutConversionContext ctx, List<WidgetDefinitionConverter> widgetConverters)
widgetDef
- ctx
- widgetConverters
- public static WidgetDefinition importWidgetDefinition(net.sf.json.JSONObject widgetDef)
public static net.sf.json.JSONObject exportToJson(FieldDefinition fieldDef)
public static FieldDefinition importFieldDefinition(net.sf.json.JSONObject fieldDef)
public static net.sf.json.JSONObject exportToJson(WidgetReference widgetRef)
public static WidgetReference importWidgetReference(net.sf.json.JSONObject widgetRef)
public static net.sf.json.JSONObject exportToJson(Layout layout)
public static net.sf.json.JSONObject exportToJson(LayoutRow layoutRow)
public static net.sf.json.JSONObject exportToJson(Widget widget)
public static net.sf.json.JSONObject exportToJson(WidgetSelectOption selectOption)
public static WidgetSelectOption importWidgetSelectionOption(net.sf.json.JSONObject selectOption)
public static net.sf.json.JSONObject exportPropsByModeToJson(Map<String,Map<String,Serializable>> propsByMode)
public static Map<String,Map<String,Serializable>> importPropsByMode(net.sf.json.JSONObject propsByMode)
public static net.sf.json.JSONObject exportPropsToJson(Map<String,Serializable> defProps)
public static Map<String,Serializable> importProps(net.sf.json.JSONObject defProps)
public static net.sf.json.JSONObject exportStringPropsToJson(Map<String,String> defProps)
public static Map<String,String> importStringProps(net.sf.json.JSONObject defProps)
public static net.sf.json.JSONObject exportRenderingInfosByModeToJson(Map<String,List<RenderingInfo>> infosByMode)
public static Map<String,List<RenderingInfo>> importRenderingInfosByMode(net.sf.json.JSONObject infosByMode)
public static net.sf.json.JSONArray exportRenderingInfosToJson(List<RenderingInfo> infos)
public static List<RenderingInfo> importRenderingInfos(net.sf.json.JSONArray jinfos)
public static net.sf.json.JSONObject exportToJson(RenderingInfo info)
public static RenderingInfo importRenderingInfo(net.sf.json.JSONObject fieldDef)
Copyright © 2015 Nuxeo SA. All rights reserved.