public interface ContentType extends TopLevelTypeAccessor, MediaTypeAccessor, org.refcodes.configuration.Properties.PropertiesBuilder, HttpMediaType
ContentType
represents a MediaType
and its according
TopLevelType
with additional (optional) suffixed parameters (as of
the according HTTP Header-Fields). In other words, it is a concrete
occurrence of a MediaType
in an HTTP header including the particular
parameters. A ContentType
with the particular parameters may look as
follows: "application/json;charset=UTF-8" in case of
MediaType.APPLICATION_JSON
and the parameter'
MediaTypeParameter.CHARSET
name set to the Encoding.UTF_8
code.TopLevelTypeAccessor.TopLevelTypeBuilder<B extends TopLevelTypeAccessor.TopLevelTypeBuilder<B>>, TopLevelTypeAccessor.TopLevelTypeMutator, TopLevelTypeAccessor.TopLevelTypeProperty
MediaTypeAccessor.MediaTypeBuilder<B extends MediaTypeAccessor.MediaTypeBuilder<B>>, MediaTypeAccessor.MediaTypeMutator, MediaTypeAccessor.MediaTypeProperty
org.refcodes.configuration.Properties.MutableProperties, org.refcodes.configuration.Properties.PropertiesBuilder
org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
org.refcodes.structure.PathMap.MutablePathMap<T>, org.refcodes.structure.PathMap.PathMapBuilder<T>
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
org.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>
Modifier and Type | Method and Description |
---|---|
default String |
getCharsetParametrer()
Retrieves the charset parameter from the properties of this
ContentType instance. |
default TopLevelType |
getTopLevelType()
Retrieves the Media-Top-Level-Type from the Media-Top-Level-Type
property.
|
default String |
put(MediaTypeParameter aParameter,
String aValue)
Put.
|
default String |
putCharsetParametrer(String aCharsetCode)
Sets the charset parameter's charset-code.
|
default String |
toHttpMediaType()
Returns the HTTP media type: It consists of the Media-Top-Level-Type (
getTopLevelType() and the Media-Subtype (
MediaTypeAccessor.getMediaType() ) as well as some (optional) suffixed parameters
(as of Keys.keySet() and Keys.get(Object) , mutable via
Keys.MutableValues.put(Object, Object) ) all being concatenated in an HTTP valid
manner, such as: "application/json;charset=UTF-8". |
default ContentType |
withCharsetParametrer(String aValue)
Sets the charset parameter's charset-code.
|
default ContentType |
withPut(MediaTypeParameter aParameter,
String aValue)
With put.
|
default ContentType |
withPut(org.refcodes.structure.Relation<String,String> aProperty) |
default ContentType |
withPut(String aKey,
String aValue) |
getMediaType
withInsert, withInsert, withInsert, withInsert, withInsertFrom, withInsertFrom, withInsertTo, withInsertTo, withPutBoolean, withPutByte, withPutDouble, withPutFloat, withPutInteger, withPutLong, withPutShort, withRemoveFrom
withInsert, withInsert, withInsertFrom, withInsertTo
withInsert, withInsert, withInsertFrom, withInsertTo
withPut
put, put, putBoolean, putBoolean, putByte, putByte, putDouble, putDouble, putFloat, putFloat, putInteger, putInteger, putLong, putLong, putShort, putShort
containsValue, delete, delete, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll
getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPath
insert, insert, insertFrom, insertTo, putAll, toDump, toSourceCode
toInstance, toInstance, toType, toType
containsKey, get, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getInteger, getInteger, getLong, getLong, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShort
insert, insert, insert, insert, insertFrom, insertFrom, insertTo, insertTo, put, putArray, putArray, removeAll
directories, directories, entries, entries, fromExternalKey, getArray, getArray, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toRootPath
default TopLevelType getTopLevelType()
getTopLevelType
in interface TopLevelTypeAccessor
default ContentType withPut(String aKey, String aValue)
withPut
in interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
withPut
in interface org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<String,String,org.refcodes.structure.PathMap.PathMapBuilder<String>>
withPut
in interface org.refcodes.structure.PathMap.PathMapBuilder<String>
withPut
in interface org.refcodes.configuration.Properties.PropertiesBuilder
withPut
in interface org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder>
default ContentType withPut(org.refcodes.structure.Relation<String,String> aProperty)
withPut
in interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
withPut
in interface org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<String,String,org.refcodes.structure.PathMap.PathMapBuilder<String>>
withPut
in interface org.refcodes.structure.PathMap.PathMapBuilder<String>
withPut
in interface org.refcodes.configuration.Properties.PropertiesBuilder
default String put(MediaTypeParameter aParameter, String aValue)
aParameter
- the parameteraValue
- the valuedefault ContentType withPut(MediaTypeParameter aParameter, String aValue)
aParameter
- the aarameteraValue
- the valuedefault String getCharsetParametrer()
ContentType
instance.default String putCharsetParametrer(String aCharsetCode)
aCharsetCode
- The code of the charset to be set (e.g. "UTF-8"), see
Encoding
for some common codes.default ContentType withCharsetParametrer(String aValue)
aValue
- the a valueContentType
instance as of the Builder-Pattern.default String toHttpMediaType()
getTopLevelType()
and the Media-Subtype (
MediaTypeAccessor.getMediaType()
) as well as some (optional) suffixed parameters
(as of Keys.keySet()
and Keys.get(Object)
, mutable via
Keys.MutableValues.put(Object, Object)
) all being concatenated in an HTTP valid
manner, such as: "application/json;charset=UTF-8".toHttpMediaType
in interface HttpMediaType
toHttpMediaType
in interface HttpMediaTypeAccessor.HttpMediaTypeProvider<RuntimeException>
Copyright © 2017. All rights reserved.