Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.contentview.json
Class JSONContentViewState

java.lang.Object
  extended by org.nuxeo.ecm.platform.contentview.json.JSONContentViewState

public class JSONContentViewState
extends Object

Exporter/importer in JSON format of a ContentViewState.

Since:
5.4.2

Field Summary
static String ENCODED_VALUES_ENCODING
           
 
Constructor Summary
JSONContentViewState()
           
 
Method Summary
static ContentViewState fromJSON(String json, boolean decode)
          Returns the content view state from its String serialization in JSON format.
static String toJSON(ContentViewState state, boolean encode)
          Returns the String serialization in JSON format of a content view state.
 
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

JSONContentViewState

public JSONContentViewState()
Method Detail

toJSON

public static String toJSON(ContentViewState state,
                            boolean encode)
                     throws ClientException,
                            UnsupportedEncodingException
Returns the String serialization in JSON format of a content view state.

Parameters:
state - the state to serialize
encode - if true, the resulting String will be zipped and encoded in Base-64 format.
Throws:
ClientException
UnsupportedEncodingException

fromJSON

public static ContentViewState fromJSON(String json,
                                        boolean decode)
                                 throws UnsupportedEncodingException,
                                        ClientException
Returns the content view state from its String serialization in JSON format.

Parameters:
json - the state to de-serialize
decode - if true, the input String is decoded from Base-64 format and unzipped.
Throws:
ClientException
UnsupportedEncodingException

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.