org.springframework.web.servlet.view.json.writer.sojo
Class JsonViewWalkerInterceptor

java.lang.Object
  extended by org.springframework.web.servlet.view.json.writer.sojo.JsonViewWalkerInterceptor
All Implemented Interfaces:
net.sf.sojo.common.WalkerInterceptor, net.sf.sojo.core.Constants

public class JsonViewWalkerInterceptor
extends Object
implements net.sf.sojo.common.WalkerInterceptor


Field Summary
 
Fields inherited from interface net.sf.sojo.core.Constants
INVALID_INDEX, ITERATOR_BEGIN, ITERATOR_END, TYPE_ITERATEABLE, TYPE_MAP, TYPE_NULL, TYPE_SIMPLE
 
Constructor Summary
JsonViewWalkerInterceptor()
           
 
Method Summary
 void endWalk()
           
 boolean getIgnoreNullValues()
           
 String getJsonString()
           
static Object handleControlCharacter(Object pvValue)
          Convert escape (control) character to a JSON representation.
static String handleControlCharacterBack(String pvValue)
          Convert escape (control) character from a JSON representation in a Java-String.
 String handleJsonValue(Object pvValue)
           
 String handleSimpleJsonValue(Object pvValue, String path)
           
 String object2StringWithDoubleQuote(Object pvObject)
           
 void setConvertAllMapValues(boolean convertAllMapValues)
           
 void setIgnoreNullValues(boolean ignoreNullValues)
           
 void setKeepValueTypesMode(String keepValueTypesMode)
           
 void setObjectName(String objectName)
           
 void setPropertyEditorRegistry(org.springframework.beans.PropertyEditorRegistry propertyEditorRegistry)
           
 void startWalk(Object pvStartObject)
           
 boolean visitElement(Object pvKey, int pvIndex, Object pvValue, int pvType, String pvPath, int pvNumberOfRecursion)
           
 void visitIterateableElement(Object pvValue, int pvType, String pvPath, int pvBeginEnd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonViewWalkerInterceptor

public JsonViewWalkerInterceptor()
Method Detail

getJsonString

public String getJsonString()

getIgnoreNullValues

public boolean getIgnoreNullValues()

setIgnoreNullValues

public void setIgnoreNullValues(boolean ignoreNullValues)

startWalk

public void startWalk(Object pvStartObject)
Specified by:
startWalk in interface net.sf.sojo.common.WalkerInterceptor

endWalk

public void endWalk()
Specified by:
endWalk in interface net.sf.sojo.common.WalkerInterceptor

handleControlCharacterBack

public static String handleControlCharacterBack(String pvValue)
Convert escape (control) character from a JSON representation in a Java-String. This means: \\b to \b

Parameters:
pvValue -
Returns:
converted String

handleControlCharacter

public static Object handleControlCharacter(Object pvValue)
Convert escape (control) character to a JSON representation. This means: \b to \\b

Parameters:
pvValue -
Returns:
converted String

handleSimpleJsonValue

public String handleSimpleJsonValue(Object pvValue,
                                    String path)

handleJsonValue

public String handleJsonValue(Object pvValue)

object2StringWithDoubleQuote

public String object2StringWithDoubleQuote(Object pvObject)

visitElement

public boolean visitElement(Object pvKey,
                            int pvIndex,
                            Object pvValue,
                            int pvType,
                            String pvPath,
                            int pvNumberOfRecursion)
Specified by:
visitElement in interface net.sf.sojo.common.WalkerInterceptor

visitIterateableElement

public void visitIterateableElement(Object pvValue,
                                    int pvType,
                                    String pvPath,
                                    int pvBeginEnd)
Specified by:
visitIterateableElement in interface net.sf.sojo.common.WalkerInterceptor

setPropertyEditorRegistry

public void setPropertyEditorRegistry(org.springframework.beans.PropertyEditorRegistry propertyEditorRegistry)

setObjectName

public void setObjectName(String objectName)

setConvertAllMapValues

public void setConvertAllMapValues(boolean convertAllMapValues)

setKeepValueTypesMode

public void setKeepValueTypesMode(String keepValueTypesMode)


Copyright © 2010. All Rights Reserved.