|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.moxy.json.MoxyJsonConfig
public final class MoxyJsonConfig
Configuration class for MOXy JSON provider.
| Constructor Summary | |
|---|---|
MoxyJsonConfig()
Create a new configuration for MOXyJsonProvider and initialize default properties. |
|
MoxyJsonConfig(boolean initDefaultProperties)
Create a new configuration for MOXyJsonProvider. |
|
| Method Summary | |
|---|---|
String |
getAttributePrefix()
|
Map<String,Object> |
getMarshallerProperties()
Get marshaller properties. |
Map<String,String> |
getNamespacePrefixMapper()
|
char |
getNamespaceSeparator()
|
Map<String,Object> |
getUnmarshallerProperties()
Get unmarshaller properties. |
String |
getValueWrapper()
|
boolean |
isFormattedOutput()
|
boolean |
isIncludeRoot()
|
boolean |
isMarshalEmptyCollections()
|
MoxyJsonConfig |
marshallerProperty(String name,
Object value)
Set the value of the property for used Marshaller. |
MoxyJsonConfig |
property(String name,
Object value)
Set the value of the property for both Marshaller / Unmarshaller. |
javax.ws.rs.ext.ContextResolver<MoxyJsonConfig> |
resolver()
Create a context resolver for a current state of this MoxyJsonConfig. |
MoxyJsonConfig |
setAttributePrefix(String attributePrefix)
|
MoxyJsonConfig |
setFormattedOutput(boolean formattedOutput)
|
MoxyJsonConfig |
setIncludeRoot(boolean includeRoot)
|
MoxyJsonConfig |
setMarshalEmptyCollections(boolean marshalEmptyCollections)
|
MoxyJsonConfig |
setMarshallerProperties(Map<String,Object> marshallerProperties)
Add properties from the given map to the existing marshaller properties. |
MoxyJsonConfig |
setNamespacePrefixMapper(Map<String,String> namespacePrefixMapper)
|
MoxyJsonConfig |
setNamespaceSeparator(char namespaceSeparator)
|
MoxyJsonConfig |
setUnmarshallerProperties(Map<String,Object> unmarshallerProperties)
Add properties from the given map to the existing unmarshaller properties. |
MoxyJsonConfig |
setValueWrapper(String valueWrapper)
|
MoxyJsonConfig |
unmarshallerProperty(String name,
Object value)
Set the value of the property for used Unmarshaller. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MoxyJsonConfig()
MOXyJsonProvider and initialize default properties.
MoxyJsonConfig(boolean)public MoxyJsonConfig(boolean initDefaultProperties)
MOXyJsonProvider. If the
initDefaultProperties is set to true then the following values are set:
Marshaller.JAXB_FORMATTED_OUTPUT - falseJAXBContextProperties.JSON_INCLUDE_ROOT - falseMarshallerProperties.JSON_MARSHAL_EMPTY_COLLECTIONS - trueJAXBContextProperties.JSON_NAMESPACE_SEPARATOR - Constants.DOT
initDefaultProperties - flag to determine whether the default values of properties mentioned above should be set or
not.| Method Detail |
|---|
public MoxyJsonConfig property(String name,
Object value)
Marshaller / Unmarshaller.
name - name of the property.value - value of the property.
MoxyJsonConfig instance.
public MoxyJsonConfig marshallerProperty(String name,
Object value)
Marshaller.
name - name of the property.value - value of the property.
MoxyJsonConfig instance.
public MoxyJsonConfig unmarshallerProperty(String name,
Object value)
Unmarshaller.
name - name of the property.value - value of the property.
MoxyJsonConfig instance.public MoxyJsonConfig setMarshallerProperties(Map<String,Object> marshallerProperties)
marshallerProperties - map of marshaller properties.
MoxyJsonConfig instance.public MoxyJsonConfig setUnmarshallerProperties(Map<String,Object> unmarshallerProperties)
unmarshallerProperties - map of unmarshaller properties.
MoxyJsonConfig instance.public Map<String,Object> getMarshallerProperties()
public Map<String,Object> getUnmarshallerProperties()
public String getAttributePrefix()
MOXyJsonProvider.getAttributePrefix()public MoxyJsonConfig setAttributePrefix(String attributePrefix)
MOXyJsonProvider.setAttributePrefix(String)public boolean isFormattedOutput()
MOXyJsonProvider.isFormattedOutput()public MoxyJsonConfig setFormattedOutput(boolean formattedOutput)
MOXyJsonProvider.setFormattedOutput(boolean)public boolean isIncludeRoot()
MOXyJsonProvider.isIncludeRoot()public MoxyJsonConfig setIncludeRoot(boolean includeRoot)
MOXyJsonProvider.setIncludeRoot(boolean)public boolean isMarshalEmptyCollections()
MOXyJsonProvider.isMarshalEmptyCollections()public MoxyJsonConfig setMarshalEmptyCollections(boolean marshalEmptyCollections)
MOXyJsonProvider.setMarshalEmptyCollections(boolean)public Map<String,String> getNamespacePrefixMapper()
MOXyJsonProvider.getNamespacePrefixMapper()public MoxyJsonConfig setNamespacePrefixMapper(Map<String,String> namespacePrefixMapper)
MOXyJsonProvider.setNamespacePrefixMapper(java.util.Map)public char getNamespaceSeparator()
MOXyJsonProvider.getNamespaceSeparator()public MoxyJsonConfig setNamespaceSeparator(char namespaceSeparator)
MOXyJsonProvider.setNamespaceSeparator(char)public String getValueWrapper()
MOXyJsonProvider.getValueWrapper()public MoxyJsonConfig setValueWrapper(String valueWrapper)
MOXyJsonProvider.setValueWrapper(String)public javax.ws.rs.ext.ContextResolver<MoxyJsonConfig> resolver()
context resolver for a current state of this MoxyJsonConfig.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||