|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ParamConfig
Method's argument configuration holder object.
Implementors must respect the following contract :
- No method return null except for the ones documented or when used as an override template (see Configs.override(ParamConfig, ParamConfig)
)
- Defaults values must either be taken from interface's defaults constant or from InterfaceContext.getProperties()
's defaults overrides.
MethodConfig
,
ParamConfig
,
InterfaceConfigFactory
Field Summary | |
---|---|
static Destination |
DEFAULT_DESTINATION
Default destination applied when non specified. |
static Class<? extends Injector> |
DEFAULT_INJECTOR
Default injector applied when non specified. |
static String |
DEFAULT_NAME
Default name applied when non specified. |
static Class<? extends Serializer> |
DEFAULT_SERIALIZER
Default serializer applied when non specified. |
Method Summary | |
---|---|
Destination |
getDestination()
Defines where the parameter value should used, either in the query string or in the request body. |
Injector |
getInjector()
Should be used when the user wish to inject a parameter that is not serializable to a single String or when user specific rules applies (eg: parameter must be exploded in multiple values accross the request queryString and/or body content). |
String |
getName()
For parameters with Destination.URL destination : |
Serializer |
getSerializer()
The serializer used to transform this argument value in a string. |
Field Detail |
---|
static final Destination DEFAULT_DESTINATION
getDestination()
static final Class<? extends Injector> DEFAULT_INJECTOR
getInjector()
static final Class<? extends Serializer> DEFAULT_SERIALIZER
getSerializer()
static final String DEFAULT_NAME
getName()
,
Constant Field ValuesMethod Detail |
---|
Serializer getSerializer()
This serializer is meant to be used by the Injector
set for this parameter.
DefaultInjector
will merge the serialized value in the URL or Body.
If the object could not be serialized to a String, then a custom Injector
can be specified.
Serializer
,
Injector
Destination getDestination()
Defines where the parameter value should used, either in the query string or in the request body.
String getName()
For parameters with Destination.URL
destination :
- if not blank, is used to add a new queryString parameter not specified in the MethodConfig.getPath()
.
- otherwise ignored and the parameter will be merged in the relative MethodConfig.getPath()
placeholders.
For parameters with Destination.BODY
destination :
- as a body key, if empty the body will just contains the parameter value.
Injector getInjector()
Should be used when the user wish to inject a parameter that is not serializable to a single String or when user specific rules applies (eg: parameter must be exploded in multiple values accross the request queryString and/or body content).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |