Class OpenApiSerializer.Builder
- Enclosing class:
- OpenApiSerializer
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder()Constructor, default settings.protectedBuilder(OpenApiSerializer copyFrom) Copy constructor.protectedBuilder(OpenApiSerializer.Builder copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the object.OpenApiCommon configuration property: Default collection format for HTTP parts.copy()Copy creator.format(HttpPartFormat value) OpenApiCommon configuration property: Default format for HTTP parts.hashKey()Returns the hashkey of this builder.Methods inherited from class org.apache.juneau.marshall.uon.UonSerializer.Builder
addBeanTypesUon, addBeanTypesUon, encoding, encoding, paramFormat, paramFormatPlain, quoteCharUonMethods inherited from class org.apache.juneau.marshall.serializer.WriterSerializer.Builder
maxIndent, quoteChar, quoteCharOverride, sq, streamCharset, useWhitespace, useWhitespace, wsMethods inherited from class org.apache.juneau.marshall.serializer.Serializer.Builder
accept, addBeanTypes, addBeanTypes, addRootType, addRootType, getAccept, getProduces, keepNullProperties, keepNullProperties, listener, nonDefault, nonDefault, produces, sortCollections, sortCollections, sortMaps, sortMaps, trimEmptyCollections, trimEmptyCollections, trimEmptyMaps, trimEmptyMaps, trimStrings, trimStrings, uriContext, uriRelativity, uriResolutionMethods inherited from class org.apache.juneau.marshall.MarshallingTraverseContext.Builder
detectRecursions, detectRecursions, ignoreRecursions, ignoreRecursions, initialDepth, maxDepthMethods inherited from class org.apache.juneau.marshall.MarshallingContextable.Builder
activeView, annotations, beanClassVisibility, beanConstructorVisibility, beanDictionary, beanFieldVisibility, beanInterceptor, beanMapPutReturnsOldValue, beanMethodVisibility, beanProperties, beanProperties, beanProperties, beanPropertiesExcludes, beanPropertiesExcludes, beanPropertiesExcludes, beanPropertiesReadOnly, beanPropertiesReadOnly, beanPropertiesReadOnly, beanPropertiesWriteOnly, beanPropertiesWriteOnly, beanPropertiesWriteOnly, beansRequireDefaultConstructor, beansRequireSerializable, beansRequireSettersForGetters, bigNumberFormat, binaryFormat, bitSetFormat, booleanFormat, calendarFormat, classFormat, classLoader, currencyFormat, dateFormat, debug, dictionaryOn, disableBeansRequireSomeProperties, disableDefaultViewInclusion, disableIgnoreMissingSetters, disableIgnoreTransientFields, disableIgnoreUnknownNullBeanProperties, disableInterfaceProxies, durationFormat, enumFormat, example, example, findFluentSetters, findFluentSetters, floatFormat, ignoreInvocationExceptionsOnGetters, ignoreInvocationExceptionsOnSetters, ignoreUnknownBeanProperties, ignoreUnknownEnumValues, implClass, implClasses, interfaceClass, interfaces, locale, localeFormat, marshallingContext, marshallingContext, marshallingContext, marshallingContext, mediaType, notBeanClasses, notBeanPackages, periodFormat, propertyNamer, propertyNamer, recordComponentOrder, stopClass, swap, swap, swaps, swaps, temporalFormat, timeZone, timeZoneFormat, typeName, typePropertyName, typePropertyName, unsortedProperties, unsortedProperties, useJavaBeanIntrospector, uuidFormat, validateSchema, validateSchemaMethods inherited from class org.apache.juneau.marshall.Context.Builder
annotations, apply, applyAnnotations, applyAnnotations, asSubtype, build, cache, canApply, copyOrNull, debug, getApplied, getType, impl, isDebug, registerBuilders, self, type
-
Constructor Details
-
Builder
protected Builder()Constructor, default settings. -
Builder
Copy constructor.- Parameters:
copyFrom- The builder to copy from.
-
Builder
Copy constructor.- Parameters:
copyFrom- The bean to copy from.
-
-
Method Details
-
build
Description copied from class:Context.BuilderBuild the object.- Overrides:
buildin classUonSerializer.Builder<OpenApiSerializer.Builder>- Returns:
- The built object.
-
collectionFormat
OpenApiCommon configuration property: Default collection format for HTTP parts.Specifies the collection format to use for HTTP parts when not otherwise specified via
Schema.collectionFormat().Example:
// Create a serializer using CSV for collections. OpenApiSerializerserializer1 = OpenApiSerializer .create () .collectionFormat(CSV ) .build();// Create a serializer using UON for collections. OpenApiSerializerserializer2 = OpenApiSerializer .create () .collectionFormat(UON ) .build();// An arbitrary data structure. JsonListlist = JsonList.of ("foo" ,"bar" , JsonMap.of ("baz" , JsonList.of ("qux" ,"true" ,"123" ) ) );// Produces: "foo=bar,baz=qux\,true\,123" Stringvalue1 =serializer1 .write(list )// Produces: "(foo=bar,baz=@(qux,'true','123'))" Stringvalue2 =serializer2 .write(list )HttpPartFormatCSV- (default) Comma-separated values (e.g."foo,bar" ).SSV- Space-separated values (e.g."foo bar" ).TSV- Tab-separated values (e.g."foo\tbar" ).PIPES- Pipe-separated values (e.g."foo|bar" ).MULTI- Corresponds to multiple parameter instances instead of multiple values for a single instance (e.g."foo=bar&foo=baz" ).UONC- UON collection notation (e.g."@(foo,bar)" ).
- Parameters:
value- The new value for this property.- Returns:
- This object.
-
copy
Description copied from class:Context.BuilderCopy creator.- Specified by:
copyin classUonSerializer.Builder<OpenApiSerializer.Builder>- Returns:
- A new mutable copy of this builder.
-
format
OpenApiCommon configuration property: Default format for HTTP parts.Specifies the format to use for HTTP parts when not otherwise specified via
Schema.format().Example:
// Create a plain-text serializer. OpenApiSerializerserializer1 = OpenApiSerializer .create () .build();// Create a UON serializer. OpenApiSerializerserializer2 = OpenApiSerializer .create () .format(UON ) .build(); Stringstring ="foo bar" ;// Produces: "foo bar" Stringvalue1 =serializer1 .write(string );// Produces: "'foo bar'" Stringvalue2 =serializer2 .write(string );HttpPartFormatUON- UON notation (e.g."'foo bar'" ).INT32- Signed 32 bits.INT64- Signed 64 bits.FLOAT- 32-bit floating point number.DOUBLE- 64-bit floating point number.BYTE- BASE-64 encoded characters.BINARY- Hexadecimal encoded octets (e.g."00FF" ).BINARY_SPACED- Spaced-separated hexadecimal encoded octets (e.g."00 FF" ).DATE- An RFC3339 full-date.DATE_TIME- An RFC3339 date-time.PASSWORD- Used to hint UIs the input needs to be obscured.NO_FORMAT- (default) Not specified.
- Parameters:
value- The new value for this property.- Returns:
- This object.
-
hashKey
Description copied from class:Context.BuilderReturns the hashkey of this builder.Used to return previously instantiated context beans that have matching hashkeys. The
HashKeyobject is suitable for use as a hashmap key of a map of context beans. A context bean is considered equivalent if theHashKey.equals(Object)method is the same.- Overrides:
hashKeyin classUonSerializer.Builder<OpenApiSerializer.Builder>- Returns:
- The hashkey of this builder.
-