Package com.sap.cds.services.request
Interface ParameterInfo
- All Known Subinterfaces:
ModifiableParameterInfo
public interface ParameterInfo
Interface to access request-specific information.
For example, if the request is processed by a HTTP-based protocol adapter these methods provide access to the HTTP request.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ModifiableParameterInfocopy()Creates aModifiableParameterInfobased on thisParameterInfo.static ModifiableParameterInfocreate()Creates aModifiableUserInfobased on default values of a clearParameterInfo.default Stringdefault StringReturns the value of a header with the given identifier.Returns the header values asMap.default Localedefault StringgetQueryParameter(String key) Returns the value of a query parameter with the given keyReturns the query parameter values asMap.default Instantdefault Instant
-
Method Details
-
create
Creates aModifiableUserInfobased on default values of a clearParameterInfo.- Returns:
- The created
ModifiableUserInfoinstance.
-
getCorrelationId
- Returns:
- the correlation id
-
getHeader
Returns the value of a header with the given identifier. In case the header withidhas several values, the result contains the values comma-separated.- Parameters:
id- the header identifier- Returns:
- the value of the header
-
getHeaders
Returns the header values asMap. Note that this might be an expensive operation.- Returns:
- the header values as
Map.
-
getQueryParameter
Returns the value of a query parameter with the given key- Parameters:
key- the query parameter key- Returns:
- the value of the query parameter
-
getQueryParams
Returns the query parameter values asMap. Note that this might be an expensive operation.- Returns:
- the query parameter values as
Map.
-
getLocale
- Returns:
- the preferred
Localeset by the request
-
getValidFrom
- Returns:
- parsed
Instantvalue of request parameter "valid-from" or constructed fromLong.MIN_VALUEif not available or parsing failed.
-
getValidTo
- Returns:
- parsed
Instantvalue of request parameter "valid-to" or constructed fromLong.MAX_VALUEif not available or parsing failed.
-
copy
Creates aModifiableParameterInfobased on thisParameterInfo.- Returns:
- The created
ModifiableParameterInfoinstance.
-