Package de.xima.fc.form.common
Class XItemUtil
- java.lang.Object
- 
- de.xima.fc.form.common.XItemUtil
 
- 
 public class XItemUtil extends Object 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static org.slf4j.LoggerLOG
 - 
Constructor SummaryConstructors Constructor Description XItemUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddItem(XItem item, XForm form)static voidfillXFormData(com.alibaba.fastjson.JSONObject persist, XForm form)static XItemfindPage(Map<String,XItem> items, XItem item)static Map<String,List<XItem>>getItemsByClassName(com.alibaba.fastjson.JSONObject persist, String... classNames)Finds form items by their class name.static Map<String,XItem>getItemsByIdMap(com.alibaba.fastjson.JSONObject persist)static HashMap<String,XItem>getItemsMap(com.alibaba.fastjson.JSONObject persist)static XItemgetXItem(com.alibaba.fastjson.JSONObject jsonObject, com.alibaba.fastjson.JSONObject version)static XItemgetXItem(com.alibaba.fastjson.JSONObject jsonObject, IXFormRenderConfig xRenderConfig)Deprecated.static XItemgetXItem(com.alibaba.fastjson.JSONObject jsonObject, IXFormRenderConfig xRenderConfig, com.alibaba.fastjson.JSONObject version)Deprecated.ThexRenderConfigis not needed.
 
- 
- 
- 
Method Detail- 
getXItem@Deprecated public static XItem getXItem(com.alibaba.fastjson.JSONObject jsonObject, IXFormRenderConfig xRenderConfig) Deprecated.- Parameters:
- jsonObject- JSON object with the properties of the item.
- xRenderConfig- Current render configuration of the form.
- Returns:
- The item descriptor for the given parameters.
 
 - 
getXItem@Deprecated public static XItem getXItem(com.alibaba.fastjson.JSONObject jsonObject, IXFormRenderConfig xRenderConfig, com.alibaba.fastjson.JSONObject version) Deprecated.ThexRenderConfigis not needed. UsegetXItem(JSONObject, JSONObject).- Parameters:
- jsonObject- JSON object with the properties of the item.
- xRenderConfig- Current render configuration of the form.
- version- Version of the form.
- Returns:
- The item descriptor for the given parameters.
 
 - 
getXItempublic static XItem getXItem(com.alibaba.fastjson.JSONObject jsonObject, com.alibaba.fastjson.JSONObject version) - Parameters:
- jsonObject- JSON object with the properties of the item.
- version- Version of the form.
- Returns:
- The item descriptor for the given parameters.
 
 - 
findPagepublic static XItem findPage(Map<String,XItem> items, XItem item) - Parameters:
- items- Map between the ID of an item and the item itself.
- item- Item for which to get the page.
- Returns:
- The item representing the XPagewhich contains the given item.
 
 - 
fillXFormDatapublic static void fillXFormData(com.alibaba.fastjson.JSONObject persist, XForm form) throws com.alibaba.fastjson.JSONException- Throws:
- com.alibaba.fastjson.JSONException
 
 - 
getItemsMappublic static HashMap<String,XItem> getItemsMap(com.alibaba.fastjson.JSONObject persist) throws com.alibaba.fastjson.JSONException - Throws:
- com.alibaba.fastjson.JSONException
 
 - 
getItemsByIdMappublic static Map<String,XItem> getItemsByIdMap(com.alibaba.fastjson.JSONObject persist) throws com.alibaba.fastjson.JSONException - Throws:
- com.alibaba.fastjson.JSONException
 
 - 
getItemsByClassNamepublic static Map<String,List<XItem>> getItemsByClassName(com.alibaba.fastjson.JSONObject persist, String... classNames) throws com.alibaba.fastjson.JSONException Finds form items by their class name. Only parses those items that match the given class names.- Parameters:
- persist- Persist JSON of the form.
- classNames- All form item class names that should be returned. When null or empty, all types are returned.
- Returns:
- A map between the item type (class name) and all form items of that type.
- Throws:
- com.alibaba.fastjson.JSONException- When the persist is invalid.
 
 
- 
 
-