org.refcodes.structure.CanonicalMap
, org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
, org.refcodes.structure.Clearable
, org.refcodes.structure.Containable
, org.refcodes.mixin.DelimiterAccessor
, org.refcodes.structure.Dictionary<String,T>
, org.refcodes.structure.Dictionary.MutableDictionary<String,T>
, org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<String,T,org.refcodes.structure.PathMap.PathMapBuilder<T>>
, org.refcodes.mixin.Dumpable
, org.refcodes.structure.Keys<String,T>
, org.refcodes.structure.Keys.MutableKeys<String,T>
, org.refcodes.structure.Keys.MutableValues<String,T>
, Map<String,T>
, org.refcodes.structure.PathMap<String>
, org.refcodes.structure.PathMap.MutablePathMap<String>
, org.refcodes.structure.PathMap.PathMapBuilder<String>
, org.refcodes.structure.PropertiesAccessorMixin
, org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<String>
, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin
, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
, org.refcodes.mixin.TypeAccessor<String>
HttpBodyMapImpl
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.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
org.refcodes.structure.Dictionary.MutableDictionary<K extends Object,V extends Object>
org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K extends Object,V extends Object,B extends org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>>
Map.Entry<K extends Object,V extends Object>
org.refcodes.structure.PathMap.MutablePathMap<T extends Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends Object>
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
Modifier and Type | Field | Description |
---|---|---|
static String |
STATUS_ALIAS_PATH |
|
static String |
STATUS_CODE_PATH |
|
static String |
STATUS_EXCEPTION_PATH |
|
static String |
STATUS_MESSAGE_PATH |
|
static String |
STATUS_TIMESTAMP_PATH |
Modifier and Type | Method | Description |
---|---|---|
HttpBodyMap |
childrenOf(String aParentPath) |
|
default String |
delete(String aKey) |
|
default String |
getStatusAlias() |
Retrieves the default path's ("status/alias") status alias.
|
default HttpStatusCode |
getStatusCode() |
Retrieves the default path's ("status/code") status code.
|
default Class<?> |
getStatusException() |
Retrieves the default path's ("status/exception") status exception.
|
default String |
getStatusMessage() |
Retrieves the default path's ("status/message") status message.
|
default Long |
getStatusTimeStamp() |
Retrieves the default path's ("status/Time-Stamp") status Time-Stamp.
|
default boolean |
hasStatusAlias() |
Determines whether a default path's ("status/alias") status alias exists.
|
default boolean |
hasStatusCode() |
Determines whether a default path's ("status/code") status code exists.
|
default boolean |
hasStatusException() |
Determines whether a default path's ("status/exception") status exception
exists.
|
default boolean |
hasStatusMessage() |
Determines whether a default path's ("status/message") status message
exists.
|
default boolean |
hasStatusTimeStamp() |
Determines whether a default path's ("status/Time-Stamp") status
Time-Stamp in milliseconds exists.
|
default String |
putStatusAlias(String aStatusAlias) |
Puts a default path's ("status/alias") status alias.
|
default String |
putStatusAlias(HttpStatusCode aStatusCode) |
Puts a default path's ("status/alias") status alias.
|
default String |
putStatusCode(int aStatusCode) |
Puts a default path's ("status/code") status code.
|
default String |
putStatusCode(HttpStatusCode aStatusCode) |
Puts a default path's ("status/code") status code.
|
default String |
putStatusException(Class<Exception> aStatusException) |
Puts a default path's ("status/exception") status exception.
|
default String |
putStatusException(Exception aStatusException) |
Puts a default path's ("status/exception") status exception.
|
default String |
putStatusMessage(String aStatusMessage) |
Puts a default path's ("status/message") status message.
|
default String |
putStatusTimeStamp() |
Puts a default path's ("status/Time-Stamp") status Time-Stamp to the
current time in milliseconds as of
System.currentTimeMillis() |
default String |
putStatusTimeStamp(long aStatusTimeStamp) |
Puts a default path's ("status/Time-Stamp") status Time-Stamp in
milliseconds.
|
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(String aKey,
String aValue) |
|
default HttpBodyMap |
withPut(org.refcodes.structure.Relation<String,String> aRelation) |
|
default HttpBodyMap |
withPutStatusAlias(String aStatusAlias) |
Puts a default path's ("status/alias") status alias.
|
default HttpBodyMap |
withPutStatusAlias(HttpStatusCode aStatusCode) |
Puts a default path's ("status/alias") status alias.
|
default HttpBodyMap |
withPutStatusCode(int aStatusCode) |
Puts a default path's ("status/code") status code.
|
default HttpBodyMap |
withPutStatusCode(HttpStatusCode aStatusCode) |
Puts a default path's ("status/code") status code.
|
toInstance, toInstance, toType, toType
withInsert, withInsert, withInsertFrom, withInsertTo, withPutBoolean, withPutByte, withPutDouble, withPutFloat, withPutInteger, withPutLong, withPutShort, withRemoveFrom
containsValue, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll, toDump, toSourceCode, toSourceCode
clear, compute, computeIfAbsent, computeIfPresent, containsKey, entry, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, of, of, of, of, of, of, of, of, of, of, of, ofEntries, put, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
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
insert, insert, insert, insert, insertFrom, insertFrom, insertTo, insertTo, put, putArray, putArray, removeAll
withInsert, withInsert, withInsertFrom, withInsertTo
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
withPut
static final String STATUS_CODE_PATH
static final String STATUS_ALIAS_PATH
static final String STATUS_MESSAGE_PATH
static final String STATUS_EXCEPTION_PATH
static final String STATUS_TIMESTAMP_PATH
default boolean hasStatusCode()
default String putStatusCode(int aStatusCode)
aStatusCode
- The status code value to be set.default HttpBodyMap withPutStatusCode(int aStatusCode)
aStatusCode
- The status code value to be set.default String putStatusCode(HttpStatusCode aStatusCode)
aStatusCode
- The HttpStatusCode
to be set.default HttpBodyMap withPutStatusCode(HttpStatusCode aStatusCode)
aStatusCode
- The HttpStatusCode
to be set.default HttpStatusCode getStatusCode()
default boolean hasStatusAlias()
default String putStatusAlias(String aStatusAlias)
aStatusAlias
- The status alias value to be set.default HttpBodyMap withPutStatusAlias(String aStatusAlias)
aStatusAlias
- The status alias value to be set.default String putStatusAlias(HttpStatusCode aStatusCode)
aStatusCode
- The HttpStatusCode
, which's verbose alias is
to be set.default HttpBodyMap withPutStatusAlias(HttpStatusCode aStatusCode)
aStatusCode
- The HttpStatusCode
, which's verbose alias is
to be set.default String getStatusAlias()
default boolean hasStatusMessage()
default String putStatusMessage(String aStatusMessage)
aStatusMessage
- The status message value to be set.default String getStatusMessage()
default boolean hasStatusTimeStamp()
default String putStatusTimeStamp(long aStatusTimeStamp)
aStatusTimeStamp
- The status Time-Stamp value to be set.default String putStatusTimeStamp()
System.currentTimeMillis()
default Long getStatusTimeStamp()
default boolean hasStatusException()
default String putStatusException(Class<Exception> aStatusException)
aStatusException
- The status exception value to be set.default String putStatusException(Exception aStatusException)
aStatusException
- The status exception value to be set.default Class<?> getStatusException()
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,T extends Object,org.refcodes.structure.PathMap.PathMapBuilder<T extends Object>>
withPut
in interface org.refcodes.structure.PathMap.PathMapBuilder<String>
withPut
in interface org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<String>
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,T extends Object,org.refcodes.structure.PathMap.PathMapBuilder<T extends Object>>
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.