Class DefaultIntegrationObjectService
- java.lang.Object
-
- de.hybris.platform.integrationservices.service.impl.DefaultIntegrationObjectService
-
- All Implemented Interfaces:
IntegrationObjectService
public class DefaultIntegrationObjectService extends java.lang.Object implements IntegrationObjectService
The default implementation of the IntegrationObjectService
-
-
Constructor Summary
Constructors Constructor Description DefaultIntegrationObjectService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaccumulateAllDependencyTypes(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode, java.util.Set<IntegrationObjectItemModel> dependencyTypes)protected voidaccumulateDependencyTypesFromAttributeDefinitions(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode, java.util.Set<IntegrationObjectItemAttributeModel> attributeDefinitionModels, java.util.Set<IntegrationObjectItemModel> dependencyTypes)protected java.util.function.Predicate<IntegrationObjectItemAttributeModel>byName(java.lang.String attributeName)java.util.Set<IntegrationObjectItemModel>findAllDependencyTypes(java.lang.String integrationObjectItemCode, java.lang.String integrationObjectCode)Find all the dependency types, which include dependencies of dependencies, for the given integration object item code.java.util.Set<IntegrationObjectItemModel>findAllIntegrationObjectItems(java.lang.String integrationObjectCode)Find all integration object item modelsjava.util.Set<IntegrationObjectModel>findAllIntegrationObjects(java.lang.String itemTypeCode)Find all IntegrationObjectModel associated with IntegrationObjectItemModel, which associates with the given itemTypeCode.AttributeDescriptorModelfindAttributeDescriptor(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode, java.lang.String integrationObjectItemAttributeName)Find an AttributeDescriptor if it exists for the given integrationObjectItemCode and integrationObjectItemAttributeNameIntegrationObjectModelfindIntegrationObject(java.lang.String integrationObjectCode)Find an integration object with the given code.java.util.Optional<IntegrationObjectItemModel>findIntegrationObjectItem(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode)Searches the integration object definitions for an item with the matching characteristics.IntegrationObjectItemModelfindIntegrationObjectItemByParentTypeCode(java.lang.String integrationObjectCode, java.lang.String typeCode)Find the integration object item's code referenced by the given integrationObjectCode and item type code also searching by the parent of the type code.IntegrationObjectItemModelfindIntegrationObjectItemByTypeCode(java.lang.String integrationObjectCode, java.lang.String typeCode)Find the integration object item's code referenced by the given integrationObjectCode and item type code.java.lang.StringfindItemAttributeName(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode, java.lang.String integrationObjectItemAttributeName)Find the attribute name if it exists for the given integrationObjectCode, integrationObjectItemCode, and integrationObjectItemAttributeNamejava.lang.StringfindItemTypeCode(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode)Find the type system type code referenced by the given integrationObjectCode and integrationObjectItemCode.protected FlexibleSearchServicegetFlexibleSearchService()protected IntegrationObjectItemModelgetIntegrationObjectItemModel(java.lang.String integrationObjectCode, java.lang.String queryString, java.util.Map<java.lang.String,java.lang.Object> params)TypeServicegetTypeService()protected booleanisValidAttributeDescriptor(AttributeDescriptorModel attributeDescriptor)protected booleanisValidIntegrationObjectItemCode(java.lang.String integrationObjectItemCode)protected booleanisValidReturnIntegrationObjectItem(java.lang.String returnIntegrationObjectItemCode, java.lang.String integrationObjectItemCode)voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)voidsetTypeService(TypeService typeService)protected java.util.function.Function<IntegrationObjectItemAttributeModel,AttributeDescriptorModel>toAttributeDescriptor()
-
-
-
Method Detail
-
findIntegrationObject
public IntegrationObjectModel findIntegrationObject(java.lang.String integrationObjectCode)
Description copied from interface:IntegrationObjectServiceFind an integration object with the given code.- Specified by:
findIntegrationObjectin interfaceIntegrationObjectService- Parameters:
integrationObjectCode- Integration object's code- Returns:
- integration object with the given code
-
findAllIntegrationObjectItems
public java.util.Set<IntegrationObjectItemModel> findAllIntegrationObjectItems(java.lang.String integrationObjectCode)
Description copied from interface:IntegrationObjectServiceFind all integration object item models- Specified by:
findAllIntegrationObjectItemsin interfaceIntegrationObjectService- Parameters:
integrationObjectCode- Integration object's code- Returns:
- Set of integration object items, or empty set if none is found
-
findAllDependencyTypes
public java.util.Set<IntegrationObjectItemModel> findAllDependencyTypes(java.lang.String integrationObjectItemCode, java.lang.String integrationObjectCode)
Description copied from interface:IntegrationObjectServiceFind all the dependency types, which include dependencies of dependencies, for the given integration object item code.- Specified by:
findAllDependencyTypesin interfaceIntegrationObjectService- Parameters:
integrationObjectItemCode- Integration object item's codeintegrationObjectCode- Integration object's code- Returns:
- Set of integration object items, or empty set if none is found
-
findAllIntegrationObjects
public java.util.Set<IntegrationObjectModel> findAllIntegrationObjects(java.lang.String itemTypeCode)
Description copied from interface:IntegrationObjectServiceFind all IntegrationObjectModel associated with IntegrationObjectItemModel, which associates with the given itemTypeCode.- Specified by:
findAllIntegrationObjectsin interfaceIntegrationObjectService- Parameters:
itemTypeCode- ComposedType associated with IntegrationObjectItemModel- Returns:
- Set of integration objects, or empty set if none is found
-
findAttributeDescriptor
public AttributeDescriptorModel findAttributeDescriptor(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode, java.lang.String integrationObjectItemAttributeName)
Description copied from interface:IntegrationObjectServiceFind an AttributeDescriptor if it exists for the given integrationObjectItemCode and integrationObjectItemAttributeName- Specified by:
findAttributeDescriptorin interfaceIntegrationObjectService- Parameters:
integrationObjectCode- Integration object's codeintegrationObjectItemCode- Integration object item's codeintegrationObjectItemAttributeName- Integration object item attribute Name- Returns:
- the AttributeDescriptorModel for the attribute.
-
findItemAttributeName
public java.lang.String findItemAttributeName(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode, java.lang.String integrationObjectItemAttributeName)Description copied from interface:IntegrationObjectServiceFind the attribute name if it exists for the given integrationObjectCode, integrationObjectItemCode, and integrationObjectItemAttributeName- Specified by:
findItemAttributeNamein interfaceIntegrationObjectService- Parameters:
integrationObjectCode- Integration object's codeintegrationObjectItemCode- Integration object item's codeintegrationObjectItemAttributeName- Integration object item attribute Name- Returns:
- the name (qualifier) for the attribute as it is called in the Type System.
-
findItemTypeCode
public java.lang.String findItemTypeCode(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode)Description copied from interface:IntegrationObjectServiceFind the type system type code referenced by the given integrationObjectCode and integrationObjectItemCode.- Specified by:
findItemTypeCodein interfaceIntegrationObjectService- Parameters:
integrationObjectCode- Integration object's codeintegrationObjectItemCode- Integration object item's code- Returns:
- typeCode of the integrationObjectItem or empty String if not found.
-
findIntegrationObjectItemByTypeCode
public IntegrationObjectItemModel findIntegrationObjectItemByTypeCode(java.lang.String integrationObjectCode, java.lang.String typeCode)
Description copied from interface:IntegrationObjectServiceFind the integration object item's code referenced by the given integrationObjectCode and item type code.- Specified by:
findIntegrationObjectItemByTypeCodein interfaceIntegrationObjectService- Parameters:
integrationObjectCode- Integration object's codetypeCode- typeCode of the itemModel the IntegrationObjectItem refers to.- Returns:
- the integrationObjectItem
-
findIntegrationObjectItemByParentTypeCode
public IntegrationObjectItemModel findIntegrationObjectItemByParentTypeCode(java.lang.String integrationObjectCode, java.lang.String typeCode)
Description copied from interface:IntegrationObjectServiceFind the integration object item's code referenced by the given integrationObjectCode and item type code also searching by the parent of the type code.- Specified by:
findIntegrationObjectItemByParentTypeCodein interfaceIntegrationObjectService- Parameters:
integrationObjectCode- Integration object's codetypeCode- typeCode of the itemModel the IntegrationObjectItem refers to.- Returns:
- the integrationObjectItem
-
getIntegrationObjectItemModel
protected IntegrationObjectItemModel getIntegrationObjectItemModel(java.lang.String integrationObjectCode, java.lang.String queryString, java.util.Map<java.lang.String,java.lang.Object> params)
-
toAttributeDescriptor
protected java.util.function.Function<IntegrationObjectItemAttributeModel,AttributeDescriptorModel> toAttributeDescriptor()
-
byName
protected java.util.function.Predicate<IntegrationObjectItemAttributeModel> byName(java.lang.String attributeName)
-
findIntegrationObjectItem
public java.util.Optional<IntegrationObjectItemModel> findIntegrationObjectItem(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode)
Description copied from interface:IntegrationObjectServiceSearches the integration object definitions for an item with the matching characteristics.- Specified by:
findIntegrationObjectItemin interfaceIntegrationObjectService- Parameters:
integrationObjectCode- code of the integration object that should contain the item.integrationObjectItemCode- code for an item withing the the specified integration object.- Returns:
- an
Optionalcontaining the matching integration object item or anOptional.empty(), if the specified integration object does not exist or it exists but does not contain an item with the specified item code.
-
accumulateDependencyTypesFromAttributeDefinitions
protected void accumulateDependencyTypesFromAttributeDefinitions(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode, java.util.Set<IntegrationObjectItemAttributeModel> attributeDefinitionModels, java.util.Set<IntegrationObjectItemModel> dependencyTypes)
-
accumulateAllDependencyTypes
protected void accumulateAllDependencyTypes(java.lang.String integrationObjectCode, java.lang.String integrationObjectItemCode, java.util.Set<IntegrationObjectItemModel> dependencyTypes)
-
isValidAttributeDescriptor
protected boolean isValidAttributeDescriptor(AttributeDescriptorModel attributeDescriptor)
-
isValidReturnIntegrationObjectItem
protected boolean isValidReturnIntegrationObjectItem(java.lang.String returnIntegrationObjectItemCode, java.lang.String integrationObjectItemCode)
-
isValidIntegrationObjectItemCode
protected boolean isValidIntegrationObjectItemCode(java.lang.String integrationObjectItemCode)
-
getFlexibleSearchService
protected FlexibleSearchService getFlexibleSearchService()
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
getTypeService
public TypeService getTypeService()
-
setTypeService
public void setTypeService(TypeService typeService)
-
-