Class ReadService
java.lang.Object
de.hybris.platform.integrationbackoffice.widgets.modeling.services.ReadService
Handles the read requests from the extension's widgets
-
Constructor Summary
ConstructorsConstructorDescriptionReadService(@NotNull FlexibleSearchService flexibleSearchService, @NotNull TypeService typeService, @NotNull SchemaGenerator generator, @NotNull ReadOnlyAttributesConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the AtomicTypeModel present in the type system.Get the set of AttributeDescriptionModel for a given ComposedTypeModelGet ComposedTypedModels from type system.getComplexTypeForAttributeDescriptor(AttributeDescriptorModel attributeDescriptorModel) Gets a CollectionType's or MapType's element's ComposedTypeModel (if it is a collection of complex types)getComposedTypeModelFromTypeModel(TypeModel typeModel) Attempts to acquire the ComposedTypeModel from a TypeModel based on which inherited class it belongs to.getEDMX(IntegrationObjectModel integrationObject) Get an EDMX representation of a given integration objectRetrieves all InboundChannelConfigurationModelsRetrieves all IntegrationObjectModelsRetrieves all available IntegrationTypesRetrieves matching IntegrationObjectModels by code.Provides the read-only attributes as a set of the qualifiersProvides the read-only attributes as AttributeDescriptorModelsGet ScriptModels from type system.Get all IntegrationObjectVirtualAttributeDescriptorModels from type system.Get IntegrationObjectVirtualAttributeDescriptorModels from type system.booleanisAtomicType(String attributeType) Checks whether a TypeModel's attribute type is an atomic type or a flexible atomic typebooleanisCollectionType(String attributeType) Checks whether a TypeModel's attribute type is a collection type or a flexible collection typebooleanisComplexType(TypeModel typeModel) Checks whether a TypeModel is a ComposedType or an EnumerationMetaTypebooleanisComposedType(String attributeType) Checks whether a TypeModel's attribute type is a composed type or a flexible composed typebooleanisEnumerationMetaType(String attributeType) Checks whether a TypeModel's attribute type is an enumeration meta type or a flexible enumeration meta typebooleanChecks whether a TypeModel's attribute type is a map type or a flexible map typebooleanisProductType(String code) Determines if the given code is assignable as a ProductModel or one of its subtypesvoidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) voidsetODataDefaultSchemaGenerator(SchemaGenerator oDataDefaultSchemaGenerator) voidsetReadOnlyAttributesConfiguration(ReadOnlyAttributesConfiguration readOnlyAttributesConfiguration) voidsetTypeService(TypeService typeService)
-
Constructor Details
-
ReadService
public ReadService() -
ReadService
public ReadService(@NotNull @NotNull FlexibleSearchService flexibleSearchService, @NotNull @NotNull TypeService typeService, @NotNull @NotNull SchemaGenerator generator, @NotNull @NotNull ReadOnlyAttributesConfiguration configuration)
-
-
Method Details
-
setODataDefaultSchemaGenerator
-
setFlexibleSearchService
-
setTypeService
-
setReadOnlyAttributesConfiguration
public void setReadOnlyAttributesConfiguration(ReadOnlyAttributesConfiguration readOnlyAttributesConfiguration) -
isCollectionType
Checks whether a TypeModel's attribute type is a collection type or a flexible collection type- Parameters:
attributeType- the attribute type to evaluate- Returns:
- if the attribute type is of CollectionType
-
isComposedType
Checks whether a TypeModel's attribute type is a composed type or a flexible composed type- Parameters:
attributeType- the attribute type to evaluate- Returns:
- if the attribute type is of ComposedType
-
isEnumerationMetaType
Checks whether a TypeModel's attribute type is an enumeration meta type or a flexible enumeration meta type- Parameters:
attributeType- the attribute type to evaluate- Returns:
- if the attribute type is of EnumerationMetaType
-
isAtomicType
Checks whether a TypeModel's attribute type is an atomic type or a flexible atomic type- Parameters:
attributeType- the attribute type to evaluate- Returns:
- if the attribute type is of AtomicType
-
isMapType
Checks whether a TypeModel's attribute type is a map type or a flexible map type- Parameters:
attributeType- the attribute type to evaluate- Returns:
- if the attribute type is of MapType
-
isComplexType
Checks whether a TypeModel is a ComposedType or an EnumerationMetaType- Parameters:
typeModel- the type model to evaluate- Returns:
- if the attribute is a complex type
-
isProductType
Determines if the given code is assignable as a ProductModel or one of its subtypes- Parameters:
code- the code of the type model- Returns:
- if the model code is assignable as a Product type/subtype
-
getComplexTypeForAttributeDescriptor
public ComposedTypeModel getComplexTypeForAttributeDescriptor(AttributeDescriptorModel attributeDescriptorModel) Gets a CollectionType's or MapType's element's ComposedTypeModel (if it is a collection of complex types)- Parameters:
attributeDescriptorModel- the attribute descriptor of the collection- Returns:
- the collection's element's ComposedTypeModel
-
getComposedTypeModelFromTypeModel
Attempts to acquire the ComposedTypeModel from a TypeModel based on which inherited class it belongs to.- Parameters:
typeModel- the typeModel that will attempt to be casted- Returns:
- the element's ComposedTypeModel representation
-
getIntegrationObjectModels
Retrieves all IntegrationObjectModels- Returns:
- list of all IntegrationObjectModels
-
getInboundChannelConfigModels
Retrieves all InboundChannelConfigurationModels- Returns:
- list of all InboundChannelConfigurationModels
-
getIntgrationObjectModelByCode
Retrieves matching IntegrationObjectModels by code.- Parameters:
code- Code of the IO model- Returns:
- list of IntegrationObjectModels matching criteria
-
getIntegrationTypes
Retrieves all available IntegrationTypes- Returns:
- list of IntegrationTypes
-
getAvailableTypes
Get ComposedTypedModels from type system. The 'WHERE' clause filters relational and other non-basic ComposedType from being queried.- Returns:
- list of ComposedTypeModels
-
getScriptModels
Get ScriptModels from type system. The 'WHERE' clause filters relational and other non-basic ComposedType from being queried.- Returns:
- list of ComposedTypeModels
-
getVirtualAttributeDescriptorModelsByCode
public List<IntegrationObjectVirtualAttributeDescriptorModel> getVirtualAttributeDescriptorModelsByCode(String code) Get IntegrationObjectVirtualAttributeDescriptorModels from type system. The 'WHERE' clause filters relational and other non-basic ComposedType from being queried.- Parameters:
code- Code of an IntegrationObjectVirtualAttributeDescriptorModel- Returns:
- list of IntegrationObjectVirtualAttributeDescriptorModels
-
getVirtualAttributeDescriptorModels
Get all IntegrationObjectVirtualAttributeDescriptorModels from type system.- Returns:
- list of IntegrationObjectVirtualAttributeDescriptorModel
-
getAttributesForType
Get the set of AttributeDescriptionModel for a given ComposedTypeModel- Parameters:
type- a ComposedTypeModel object- Returns:
- the set of AttributeDescriptorModel of the ComposedTypeModel's attributes
-
getEDMX
Get an EDMX representation of a given integration object- Parameters:
integrationObject- an integration object to represent- Returns:
- an input stream containing the EDMX representation of the integration object
- Throws:
InvalidODataSchemaException- when schema generator fails
-
getReadOnlyAttributesAsAttributeDescriptorModels
public Set<AttributeDescriptorModel> getReadOnlyAttributesAsAttributeDescriptorModels(ComposedTypeModel type) Provides the read-only attributes as AttributeDescriptorModels- Parameters:
type- Parent type that encloses this attribute- Returns:
- set of read-only attributes
-
getReadOnlyAttributes
Provides the read-only attributes as a set of the qualifiers- Returns:
- set of read-only attributes
-
getAtomicTypeModelByCode
Retrieves the AtomicTypeModel present in the type system.- Parameters:
code- value for the AtomicTypeModel requested.- Returns:
- an AtomicTypeModel for the given type or null if the type isn't found.
-