Class ConversionParameters
- java.lang.Object
-
- de.hybris.platform.odata2services.converter.ConversionParameters
-
public class ConversionParameters extends java.lang.ObjectParameters providing context for converting an attribute value in the payload. Depending on the attribute type the value may be converted into a collection of primitives or ofIntegrationItems, or a primitive, anIntegrationItem, aMap, etc. value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConversionParameters.ConversionParametersBuilderA builder for creating instances ofConversionParameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAttributeName()Retrieves name of the attribute, whose value is being converted.java.lang.ObjectgetAttributeValue()Retrieves value to be converted.java.util.LocalegetContentLocale()Specifies the request content language.org.apache.olingo.odata2.api.processor.ODataContextgetContext()Retrieves OData request context.IntegrationItemgetIntegrationItem()RetrievesIntegrationItem, in which the converted attribute value will be set.TypeAttributeDescriptorgetTypeAttributeDescriptor()Retrieves type descriptor for the attribute to set in theIntegrationItemTypeDescriptorgetTypeDescriptor()Retrieves type descriptor for the type in the type system corresponding to the ODataEntry being converted.booleanisContentLanguagePresent()Determines whether Content-Language was explicitly specified for the request.booleanisMapAttributeValue()Determines whether the ODataEntry attribute being converted corresponds to a Map attribute in the platform.
-
-
-
Method Detail
-
getAttributeName
public java.lang.String getAttributeName()
Retrieves name of the attribute, whose value is being converted.- Returns:
- name of the attribute to convert value for.
-
getAttributeValue
public java.lang.Object getAttributeValue()
Retrieves value to be converted.- Returns:
- value the attribute has in ODataEntry and, which has to be converted to be acceptable by
OData independent
IntegrationItem.
-
getContext
public org.apache.olingo.odata2.api.processor.ODataContext getContext()
Retrieves OData request context.- Returns:
- OData context describing the request.
-
getIntegrationItem
public IntegrationItem getIntegrationItem()
RetrievesIntegrationItem, in which the converted attribute value will be set.- Returns:
- item to set converted value to.
-
getTypeAttributeDescriptor
public TypeAttributeDescriptor getTypeAttributeDescriptor()
Retrieves type descriptor for the attribute to set in theIntegrationItem- Returns:
- type descriptor for the attribute to set, if the ODataEntry attribute exists in the
corresponding type in the type system or
nullotherwise. - See Also:
getIntegrationItem()
-
getTypeDescriptor
public TypeDescriptor getTypeDescriptor()
Retrieves type descriptor for the type in the type system corresponding to the ODataEntry being converted.- Returns:
- IntegrationItem type.
- See Also:
getIntegrationItem()
-
getContentLocale
public java.util.Locale getContentLocale()
Specifies the request content language.- Returns:
- a locale corresponding to the value specified in the Content-Language header or the default system locale, if the content language was not specified explicitly.
- See Also:
isContentLanguagePresent()
-
isMapAttributeValue
public boolean isMapAttributeValue()
Determines whether the ODataEntry attribute being converted corresponds to a Map attribute in the platform.- Returns:
true, if the context attribute is a Map attribute in the type system;falseotherwise.
-
isContentLanguagePresent
public boolean isContentLanguagePresent()
Determines whether Content-Language was explicitly specified for the request.- Returns:
true, if the Content-Language is present in the request;false, otherwise.
-
-