Package org.dashbuilder.dataset.json
Class DataSetDefJSONMarshaller
- java.lang.Object
-
- org.dashbuilder.dataset.json.DataSetDefJSONMarshaller
-
public class DataSetDefJSONMarshaller extends Object
DataSetDef from/to JSON utilities
-
-
Field Summary
Fields Modifier and Type Field Description static StringALL_COLUMNSstatic StringCACHE_ENABLEDstatic StringCACHE_MAXROWSstatic StringCOLUMN_IDstatic StringCOLUMN_PATTERNstatic StringCOLUMN_TYPEstatic StringCOLUMNSprotected DataSetLookupJSONMarshallerdataSetLookupJSONMarshallerprotected DataSetProviderRegistrydataSetProviderRegistrystatic StringFILTERSstatic StringISPUBLICstatic StringNAMEstatic StringPROVIDERstatic StringPUSH_ENABLEDstatic StringPUSH_MAXSIZEstatic StringREFRESH_ALWAYSstatic StringREFRESH_TIMEstatic List<String>ROOT_KEYSstatic StringUUID
-
Constructor Summary
Constructors Constructor Description DataSetDefJSONMarshaller(DataSetProviderRegistry dataSetProviderRegistry)DataSetDefJSONMarshaller(DataSetProviderRegistry dataSetProviderRegistry, DataSetLookupJSONMarshaller dataSetLookupJSONMarshaller)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSetDeffromJson(String jsonString)DataSetDeffromJsonObj(org.dashbuilder.json.JsonObject json)static booleanisBlank(String str)DataSetDefreadGeneralSettings(DataSetDef def, org.dashbuilder.json.JsonObject json)DataSetProviderTypereadProviderType(org.dashbuilder.json.JsonObject json)protected org.dashbuilder.json.JsonArraytoJsonObject(Collection<DataColumnDef> columnList, DataSetDef dataSetDef)org.dashbuilder.json.JsonObjecttoJsonObject(DataSetDef dataSetDef)StringtoJsonString(DataSetDef dataSetDef)static voidtransferStringValue(String key, org.dashbuilder.json.JsonObject jsonObject, Consumer<String> setter)
-
-
-
Field Detail
-
UUID
public static final String UUID
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
PROVIDER
public static final String PROVIDER
- See Also:
- Constant Field Values
-
ISPUBLIC
public static final String ISPUBLIC
- See Also:
- Constant Field Values
-
PUSH_ENABLED
public static final String PUSH_ENABLED
- See Also:
- Constant Field Values
-
PUSH_MAXSIZE
public static final String PUSH_MAXSIZE
- See Also:
- Constant Field Values
-
COLUMNS
public static final String COLUMNS
- See Also:
- Constant Field Values
-
COLUMN_ID
public static final String COLUMN_ID
- See Also:
- Constant Field Values
-
COLUMN_TYPE
public static final String COLUMN_TYPE
- See Also:
- Constant Field Values
-
COLUMN_PATTERN
public static final String COLUMN_PATTERN
- See Also:
- Constant Field Values
-
FILTERS
public static final String FILTERS
- See Also:
- Constant Field Values
-
ALL_COLUMNS
public static final String ALL_COLUMNS
- See Also:
- Constant Field Values
-
CACHE_ENABLED
public static final String CACHE_ENABLED
- See Also:
- Constant Field Values
-
CACHE_MAXROWS
public static final String CACHE_MAXROWS
- See Also:
- Constant Field Values
-
REFRESH_TIME
public static final String REFRESH_TIME
- See Also:
- Constant Field Values
-
REFRESH_ALWAYS
public static final String REFRESH_ALWAYS
- See Also:
- Constant Field Values
-
dataSetProviderRegistry
protected DataSetProviderRegistry dataSetProviderRegistry
-
dataSetLookupJSONMarshaller
protected DataSetLookupJSONMarshaller dataSetLookupJSONMarshaller
-
-
Constructor Detail
-
DataSetDefJSONMarshaller
public DataSetDefJSONMarshaller(DataSetProviderRegistry dataSetProviderRegistry)
-
DataSetDefJSONMarshaller
public DataSetDefJSONMarshaller(DataSetProviderRegistry dataSetProviderRegistry, DataSetLookupJSONMarshaller dataSetLookupJSONMarshaller)
-
-
Method Detail
-
fromJson
public DataSetDef fromJson(String jsonString) throws Exception
- Throws:
Exception
-
fromJsonObj
public DataSetDef fromJsonObj(org.dashbuilder.json.JsonObject json) throws Exception
- Throws:
Exception
-
readProviderType
public DataSetProviderType readProviderType(org.dashbuilder.json.JsonObject json) throws Exception
- Throws:
Exception
-
readGeneralSettings
public DataSetDef readGeneralSettings(DataSetDef def, org.dashbuilder.json.JsonObject json) throws Exception
- Throws:
Exception
-
toJsonString
public String toJsonString(DataSetDef dataSetDef) throws org.dashbuilder.json.JsonException
- Throws:
org.dashbuilder.json.JsonException
-
toJsonObject
public org.dashbuilder.json.JsonObject toJsonObject(DataSetDef dataSetDef) throws org.dashbuilder.json.JsonException
- Throws:
org.dashbuilder.json.JsonException
-
toJsonObject
protected org.dashbuilder.json.JsonArray toJsonObject(Collection<DataColumnDef> columnList, DataSetDef dataSetDef) throws org.dashbuilder.json.JsonException
- Throws:
org.dashbuilder.json.JsonException
-
transferStringValue
public static void transferStringValue(String key, org.dashbuilder.json.JsonObject jsonObject, Consumer<String> setter)
-
isBlank
public static boolean isBlank(String str)
-
-