java.lang.Object
de.hybris.platform.integrationbackoffice.widgets.modeling.services.ReadService

public class ReadService extends Object
Handles the read requests from the extension's widgets
  • Constructor Details

  • Method Details

    • 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(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(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(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(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(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(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 List<IntegrationObjectModel> getIntegrationObjectModels()
      Retrieves all IntegrationObjectModels
      Returns:
      list of all IntegrationObjectModels
    • getInboundChannelConfigModels

      public List<InboundChannelConfigurationModel> getInboundChannelConfigModels()
      Retrieves all InboundChannelConfigurationModels
      Returns:
      list of all InboundChannelConfigurationModels
    • getIntgrationObjectModelByCode

      public List<IntegrationObjectModel> getIntgrationObjectModelByCode(String code)
      Retrieves matching IntegrationObjectModels by code.
      Parameters:
      code - Code of the IO model
      Returns:
      list of IntegrationObjectModels matching criteria
    • getIntegrationTypes

      public List<IntegrationType> getIntegrationTypes()
      Retrieves all available IntegrationTypes
      Returns:
      list of IntegrationTypes
    • getAvailableTypes

      public 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 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 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

      public List<IntegrationObjectVirtualAttributeDescriptorModel> getVirtualAttributeDescriptorModels()
      Get all IntegrationObjectVirtualAttributeDescriptorModels from type system.
      Returns:
      list of IntegrationObjectVirtualAttributeDescriptorModel
    • getAttributesForType

      public 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 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 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 Set<String> getReadOnlyAttributes()
      Provides the read-only attributes as a set of the qualifiers
      Returns:
      set of read-only attributes
    • getAtomicTypeModelByCode

      public AtomicTypeModel getAtomicTypeModelByCode(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.