Class ReadService
- java.lang.Object
-
- de.hybris.platform.integrationbackoffice.services.ReadService
-
public class ReadService extends java.lang.ObjectHandles the read requests from the extension's widgets
-
-
Constructor Summary
Constructors Constructor Description ReadService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AtomicTypeModelgetAtomicTypeModelByCode(java.lang.String code)Retrieves the AtomicTypeModel present in the type system.java.util.Set<AttributeDescriptorModel>getAttributesForType(ComposedTypeModel type)Get the set of AttributeDescriptionModel for a given ComposedTypeModeljava.util.List<ComposedTypeModel>getAvailableTypes()Get ComposedTypedModels from type system.ComposedTypeModelgetComplexTypeForAttributeDescriptor(AttributeDescriptorModel attributeDescriptorModel)Gets a CollectionType's or MapType's element's ComposedTypeModel (if it is a collection of complex types)ComposedTypeModelgetComposedTypeModelFromTypeModel(TypeModel typeModel)Attempts to acquire the ComposedTypeModel from a TypeModel based on which inherited class it belongs to.java.io.InputStreamgetEDMX(IntegrationObjectModel integrationObject)Get an EDMX representation of a given integration objectjava.util.List<InboundChannelConfigurationModel>getInboundChannelConfigModels()Retrieves all InboundChannelConfigurationModelsjava.util.List<IntegrationObjectModel>getIntegrationObjectModels()Retrieves all IntegrationObjectModelsjava.util.List<IntegrationType>getIntegrationTypes()Retrieves all available IntegrationTypesjava.util.List<IntegrationObjectModel>getIntgrationObjectModelByCode(java.lang.String code)Retrieves matching IntegrationObjectModels by code.java.util.Set<java.lang.String>getReadOnlyAttributes()Provides the read-only attributes as a set of the qualifiersjava.util.Set<AttributeDescriptorModel>getReadOnlyAttributesAsAttributeDescriptorModels(ComposedTypeModel type)Provides the read-only attributes as AttributeDescriptorModelsjava.util.List<ScriptModel>getScriptModels()Get ScriptModels from type system.java.util.List<IntegrationObjectVirtualAttributeDescriptorModel>getVirtualAttributeDescriptorModels()Get all IntegrationObjectVirtualAttributeDescriptorModels from type system.java.util.List<IntegrationObjectVirtualAttributeDescriptorModel>getVirtualAttributeDescriptorModelsByCode(java.lang.String code)Get IntegrationObjectVirtualAttributeDescriptorModels from type system.booleanisAtomicType(java.lang.String attributeType)Checks whether a TypeModel's attribute type is an atomic type or a flexible atomic typebooleanisCollectionType(java.lang.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(java.lang.String attributeType)Checks whether a TypeModel's attribute type is a composed type or a flexible composed typebooleanisEnumerationMetaType(java.lang.String attributeType)Checks whether a TypeModel's attribute type is an enumeration meta type or a flexible enumeration meta typebooleanisMapType(java.lang.String attributeType)Checks whether a TypeModel's attribute type is a map type or a flexible map typebooleanisProductType(java.lang.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)
-
-
-
Method Detail
-
setODataDefaultSchemaGenerator
public void setODataDefaultSchemaGenerator(SchemaGenerator oDataDefaultSchemaGenerator)
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
setTypeService
public void setTypeService(TypeService typeService)
-
setReadOnlyAttributesConfiguration
public void setReadOnlyAttributesConfiguration(ReadOnlyAttributesConfiguration readOnlyAttributesConfiguration)
-
isCollectionType
public boolean isCollectionType(java.lang.String attributeType)
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
public boolean isComposedType(java.lang.String attributeType)
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
public boolean isEnumerationMetaType(java.lang.String attributeType)
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
public boolean isAtomicType(java.lang.String attributeType)
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
public boolean isMapType(java.lang.String attributeType)
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
public boolean isComplexType(TypeModel typeModel)
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
public boolean isProductType(java.lang.String code)
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
public ComposedTypeModel getComposedTypeModelFromTypeModel(TypeModel typeModel)
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
public java.util.List<IntegrationObjectModel> getIntegrationObjectModels()
Retrieves all IntegrationObjectModels- Returns:
- list of all IntegrationObjectModels
-
getInboundChannelConfigModels
public java.util.List<InboundChannelConfigurationModel> getInboundChannelConfigModels()
Retrieves all InboundChannelConfigurationModels- Returns:
- list of all InboundChannelConfigurationModels
-
getIntgrationObjectModelByCode
public java.util.List<IntegrationObjectModel> getIntgrationObjectModelByCode(java.lang.String code)
Retrieves matching IntegrationObjectModels by code.- Parameters:
code- Code of the IO model- Returns:
- list of IntegrationObjectModels matching criteria
-
getIntegrationTypes
public java.util.List<IntegrationType> getIntegrationTypes()
Retrieves all available IntegrationTypes- Returns:
- list of IntegrationTypes
-
getAvailableTypes
public java.util.List<ComposedTypeModel> getAvailableTypes()
Get ComposedTypedModels from type system. The 'WHERE' clause filters relational and other non-basic ComposedType from being queried.- Returns:
- list of ComposedTypeModels
-
getScriptModels
public java.util.List<ScriptModel> 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 java.util.List<IntegrationObjectVirtualAttributeDescriptorModel> getVirtualAttributeDescriptorModelsByCode(java.lang.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
public java.util.List<IntegrationObjectVirtualAttributeDescriptorModel> getVirtualAttributeDescriptorModels()
Get all IntegrationObjectVirtualAttributeDescriptorModels from type system.- Returns:
- list of IntegrationObjectVirtualAttributeDescriptorModel
-
getAttributesForType
public java.util.Set<AttributeDescriptorModel> getAttributesForType(ComposedTypeModel type)
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
public java.io.InputStream getEDMX(IntegrationObjectModel integrationObject)
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 java.util.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
public java.util.Set<java.lang.String> getReadOnlyAttributes()
Provides the read-only attributes as a set of the qualifiers- Returns:
- set of read-only attributes
-
getAtomicTypeModelByCode
public AtomicTypeModel getAtomicTypeModelByCode(java.lang.String code)
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.
-
-