Package org.apache.juneau.httppart
Class BaseHttpPartSerializer
java.lang.Object
org.apache.juneau.Context
org.apache.juneau.BeanContextable
org.apache.juneau.httppart.BaseHttpPartSerializer
- All Implemented Interfaces:
- AnnotationProvider,- HttpPartSerializer
- Direct Known Subclasses:
- SimplePartSerializer
Base class for implementations of 
HttpPartSerializer
 Notes:
- This class is thread safe and reusable.
See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface org.apache.juneau.httppart.HttpPartSerializerHttpPartSerializer.Creator, HttpPartSerializer.Void
- 
Field SummaryFields inherited from class org.apache.juneau.ContextCONTEXT_APPLY_FILTERFields inherited from interface org.apache.juneau.AnnotationProviderDEFAULT, DISABLE_ANNOTATION_CACHING
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor.
- 
Method SummaryModifier and TypeMethodDescriptionserialize(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.Methods inherited from class org.apache.juneau.BeanContextablegetBeanContext, propertiesMethods inherited from class org.apache.juneau.Contextcopy, createBuilder, createSession, firstAnnotation, firstAnnotation, firstAnnotation, firstAnnotation, firstDeclaredAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachDeclaredAnnotation, getSession, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, init, isDebug, lastAnnotation, lastAnnotation, lastAnnotation, lastAnnotation, lastDeclaredAnnotation, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.juneau.httppart.HttpPartSerializergetPartSession
- 
Constructor Details- 
BaseHttpPartSerializerConstructor.- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
serializepublic String serialize(HttpPartType partType, HttpPartSchema schema, Object value) throws SchemaValidationException, SerializeException 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.Returned values should NOT be URL-encoded. - Parameters:
- partType- The category of value being serialized.
- schema- Schema information about the part.
 May be- null .
 Not all part serializers use the schema information.
- value- The value being serialized.
- Returns:
- The serialized value.
- Throws:
- SerializeException- If a problem occurred while trying to parse the input.
- SchemaValidationException- If the output fails schema validation.
 
 
-