public class OpenApiSerializerSession extends UonSerializerSession
OpenApiSerializer.
This class is NOT thread safe. It is typically discarded after one-time use although it can be reused within the same thread.
indent| Modifier | Constructor and Description |
|---|---|
protected |
OpenApiSerializerSession(OpenApiSerializer ctx,
SerializerSessionArgs args)
Create a new session using properties specified in the context.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doSerialize(SerializerPipe out,
Object o)
Serializes a POJO to the specified output stream or writer.
|
String |
serialize(HttpPartSchema schema,
Object value)
Same as
HttpPartSerializerSession.serialize(HttpPartType, HttpPartSchema, Object) but defaults to a |
String |
serialize(HttpPartType partType,
HttpPartSchema schema,
Object value)
Converts the specified value to a string that can be used as an HTTP header value, query parameter value,
form-data parameter, or URI path variable.
|
ObjectMap |
toMap()
Returns the properties defined on this bean context as a simple map for debugging purposes.
|
getParamFormat, getUonWriter, isAddBeanTypes, isEncoding, serializeAnythingcreatePipe, getMaxIndent, getQuoteChar, isUseWhitespace, isWriterSerializer, serialize, serializeToStringcanIgnoreValue, createBeanTypeNameProperty, createDefaultVarResolverSession, generalize, getBeanTypeName, getExpectedRootType, getJavaMethod, getListener, getListener, getResponseHeaders, getUriContext, getUriRelativity, getUriResolution, getUriResolver, getVarResolver, isAddRootType, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimNullProperties, isTrimStrings, onBeanGetterException, onError, push2, relativizeUri, resolve, resolveUri, serialize, sort, sort, swap, toList, toString, trim, varSessionObjectgetInitialDepth, getLastLocation, getMaxDepth, getOptionalType, getOptionalValue, getStack, isDetectRecursions, isIgnoreRecursions, isOptional, pop, push, setCurrentClass, setCurrentProperty, willRecurse_class, checkForWarnings, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionaryClasses, getBeanFieldVisibility, getBeanFilters, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getBpi, getBpro, getBpwo, getBpx, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getExamples, getImplClasses, getLocale, getMediaType, getNotBeanClasses, getNotBeanPackagesNames, getNotBeanPackagesPrefixes, getPojoSwaps, getPropertyNamer, getSchema, getStringBuilder, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isDebug, isFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnorePropertiesWithoutSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isSortProperties, isUseEnumNames, isUseInterfaceProxies, isUseJavaBeanIntrospector, newBean, newBean, newBeanMap, newBeanMap, object, returnStringBuilder, string, toArray, toBeanMap, toBeanMapaddToCache, addToCache, addWarning, getClassProperty, getFromCache, getInstanceArrayProperty, getInstanceProperty, getLogger, getProperties, getProperty, getProperty, getProperty, getPropertyKeys, getWarnings, hasProperty, hasWarnings, toStringprotected OpenApiSerializerSession(OpenApiSerializer ctx, SerializerSessionArgs args)
ctx - The context creating this session object.
The context contains all the configuration settings for this object.args - Runtime session arguments.protected void doSerialize(SerializerPipe out, Object o) throws IOException, SerializeException
SerializerSessionThis method should NOT close the context object.
doSerialize in class UonSerializerSessionout - Where to send the output from the serializer.o - The object to serialize.IOException - Thrown by underlying stream.SerializeException - Problem occurred trying to serialize object.public String serialize(HttpPartSchema schema, Object value) throws SerializeException, SchemaValidationException
HttpPartSerializerSessionHttpPartSerializerSession.serialize(HttpPartType, HttpPartSchema, Object) but defaults to a serialize in interface HttpPartSerializerSessionserialize in class UonSerializerSessionschema - Schema information about the part.
value - The value being serialized.SerializeException - If a problem occurred while trying to parse the input.SchemaValidationException - If the output fails schema validation.public String serialize(HttpPartType partType, HttpPartSchema schema, Object value) throws SerializeException, SchemaValidationException
HttpPartSerializerSessionReturned values should NOT be URL-encoded.
serialize in interface HttpPartSerializerSessionserialize in class UonSerializerSessionpartType - The category of value being serialized.schema - Schema information about the part.
value - The value being serialized.SerializeException - If a problem occurred while trying to parse the input.SchemaValidationException - If the output fails schema validation.public ObjectMap toMap()
SessiontoMap in class UonSerializerSessionCopyright © 2016–2019 The Apache Software Foundation. All rights reserved.