public interface HttpBodyMap
extends org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
HttpBodyMap
type is a "dynamic" type in terms of it's structure
being represented by paths'. When a data structure is parsed e.g. from JSON
or XML, then the data structure's internal structure and values are reflected
by according paths's and values in the HttpBodyMap
.
The HttpBodyMap
is actually a specialization of the PathMap
using String
objects as values and a slash ("/") as path delimiter.
Using the HttpBodyMap
it is convenient to navigate or address
elements from unknown or dynamic data structures. The other way round the
HttpBodyMap
may be used to construct dynamic data types by adding the
according paths's and values for marshaling into e.g. JSON or XML.
Think of an HttpBodyMap
as a flattened JSON or XML structure.
The HttpClientResponseImpl
, HttpServerRequestImpl
,
HttpServerResponseImpl
as well as the HttpClientResponseImpl
implementations directly support the HttpBodyMap
, given that the
MediaTypeFactory
being used supports marshaling and unmarshaling from
and to nested Map
instances. The HttpBodyMap
acts as a view
of the nested Map
structures, which are somehow inconvenient to
navigate through.
The HttpClientRequest.setRequest(Object)
implementation supports the
HttpBodyMap
to marshal an HttpBodyMap
into an HTTP
Request-Body.
The HttpClientResponse.getResponse(Class)
implementation supports the
HttpBodyMap
to unmarshal an HTTP Response-Body into an
HttpBodyMap
.
The HttpServerRequest.getRequest(Class)
implementation supports the
HttpBodyMap
to unmarshal an HTTP Request-Body into an
HttpBodyMap
.
The HttpServerResponse.setResponse(Object)
implementation supports
the HttpBodyMap
to marshal an HttpBodyMap
into an HTTP
Request-Body.org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
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>
org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K,V,B extends org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>>
org.refcodes.structure.Dictionary.MutableDictionary<K,V>
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
Modifier and Type | Method and Description |
---|---|
HttpBodyMap |
childrenOf(String aParentPath) |
default String |
delete(String aKey) |
HttpBodyMap |
retrieve(String aFromPath,
String aToPath) |
HttpBodyMap |
retrieveFrom(String aFromPath) |
HttpBodyMap |
retrieveTo(String aToPath) |
default HttpBodyMap |
withInsert(Object aObj) |
default HttpBodyMap |
withInsert(String aToPath,
Object aFrom,
String aFromPath) |
default HttpBodyMap |
withInsertFrom(Object aFrom,
String aFromPath) |
default HttpBodyMap |
withInsertTo(String aToPath,
Object aFrom) |
default HttpBodyMap |
withPut(org.refcodes.structure.Relation<String,String> aRelation) |
default HttpBodyMap |
withPut(String aKey,
String aValue) |
withInsert, withInsert, withInsertFrom, withInsertTo, withPutBoolean, withPutByte, withPutDouble, withPutFloat, withPutInteger, withPutLong, withPutShort, withRemoveFrom
withInsert, withInsert, withInsertFrom, withInsertTo
containsValue, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll, toDump, toSourceCode, toSourceCode
toInstance, toInstance, toType, toType
insert, insert, insert, insert, insertFrom, insertFrom, insertTo, insertTo, put, putArray, putArray, removeAll
directories, directories, entries, entries, fromExternalKey, getArray, getArray, getRootPath, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath
clear, compute, computeIfAbsent, computeIfPresent, containsKey, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
withPut
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
default HttpBodyMap 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.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<org.refcodes.structure.CanonicalMap.CanonicalMapBuilder>
default HttpBodyMap withPut(org.refcodes.structure.Relation<String,String> aRelation)
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>
default HttpBodyMap withInsert(Object aObj)
withInsert
in interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
withInsert
in interface org.refcodes.structure.PathMap.PathMapBuilder<String>
default HttpBodyMap withInsertFrom(Object aFrom, String aFromPath)
withInsertFrom
in interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
withInsertFrom
in interface org.refcodes.structure.PathMap.PathMapBuilder<String>
default HttpBodyMap withInsertTo(String aToPath, Object aFrom)
withInsertTo
in interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
withInsertTo
in interface org.refcodes.structure.PathMap.PathMapBuilder<String>
default HttpBodyMap withInsert(String aToPath, Object aFrom, String aFromPath)
withInsert
in interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
withInsert
in interface org.refcodes.structure.PathMap.PathMapBuilder<String>
HttpBodyMap retrieveFrom(String aFromPath)
retrieveFrom
in interface org.refcodes.structure.CanonicalMap
retrieveFrom
in interface org.refcodes.structure.PathMap<String>
HttpBodyMap retrieveTo(String aToPath)
retrieveTo
in interface org.refcodes.structure.CanonicalMap
retrieveTo
in interface org.refcodes.structure.PathMap<String>
HttpBodyMap retrieve(String aFromPath, String aToPath)
retrieve
in interface org.refcodes.structure.CanonicalMap
retrieve
in interface org.refcodes.structure.PathMap<String>
HttpBodyMap childrenOf(String aParentPath)
childrenOf
in interface org.refcodes.structure.CanonicalMap
childrenOf
in interface org.refcodes.structure.PathMap<String>
Copyright © 2018. All rights reserved.