Class DefaultMappingLineService
- java.lang.Object
-
- de.hybris.platform.importcockpit.services.mapping.impl.DefaultMappingLineService
-
- All Implemented Interfaces:
MappingLineService
public class DefaultMappingLineService extends java.lang.Object implements MappingLineService
-
-
Constructor Summary
Constructors Constructor Description DefaultMappingLineService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MappingLineModeladdCollectionEntry(CollectionMappingLine mappingLineModel)Adds an additional entry mappingLineModel to a collection mapping mappingLineModel.MappingLineModelgenerateAtomicMappingLine(ItemAttributePropertyDescriptor propertyDescriptor)Generates an Atomic type mapping line model based on the attribute property descriptorMappingLineModelgenerateComposedMappingLine(ItemAttributePropertyDescriptor propertyDescriptor, boolean generateSubLines)Generates a composed mapping mappingLineModel based on the property descriptorbooleangenerateMappedSubMappingLines(MappingLineModel mappingLineModel, java.util.Collection<ItemModel> items)Generates new sub mapping lines for the items given.MappingLineModelgenerateMappingLine(PropertyDescriptor propertyDescriptor)Generates a mapping line model based on the property descriptor.MappingLineModelgenerateProductAttributeMappingLine(java.lang.String translator, java.lang.String translatorQualifier)Generate a specific translator for type Product (@ClassificationAttributeTranslator)MappingLineModelgenerateTranslatorMappingLine(ClassificationClassModel classificationClass, ClassificationAttributeModel classificationAttribute, java.lang.String translator)Generate a translator mapping mappingLineModelMappingLineModelgenerateTranslatorMappingLine(java.lang.String translatorQualifier, java.lang.String translator)Generate a translator mapping mappingLineModelMappingLineModelgenerateVirtualMappingLine(SourceColumnModel sourceColumn)Generates a so called "virtual" mapping line model after a source column has been dropped into the mapping view without a target attribute specified.protected TypeServicegetCockpitTypeService()protected MappingLineConfigServicegetMappingLineConfigService()protected MappingLineTypeServicegetMappingLineTypeService()ModelServicegetModelService()protected TypeServicegetTypeService()booleanisLineOfDateType(MappingLineModel mappingLineModel)Checks if the mapping mappingLineModel refers to an attribute of a date type (like Product.onlineDate, Product.offlineDate etc.)booleanisLineOfNumberType(MappingLineModel mappingLineModel)Checks if the mapping mappingLineModel refers to an attribute of a number type (like integer, double etc.).voidsetMappingLineConfigService(MappingLineConfigService mappingLineConfigService)voidsetMappingLineTypeService(MappingLineTypeService mappingLineTypeService)voidsetTypeService(TypeService typeService)
-
-
-
Method Detail
-
setTypeService
public void setTypeService(TypeService typeService)
-
getTypeService
protected TypeService getTypeService()
-
getCockpitTypeService
protected TypeService getCockpitTypeService()
-
setMappingLineTypeService
public void setMappingLineTypeService(MappingLineTypeService mappingLineTypeService)
-
getMappingLineTypeService
protected MappingLineTypeService getMappingLineTypeService()
-
setMappingLineConfigService
public void setMappingLineConfigService(MappingLineConfigService mappingLineConfigService)
-
getMappingLineConfigService
protected MappingLineConfigService getMappingLineConfigService()
-
generateMappingLine
public MappingLineModel generateMappingLine(PropertyDescriptor propertyDescriptor)
Description copied from interface:MappingLineServiceGenerates a mapping line model based on the property descriptor.- Specified by:
generateMappingLinein interfaceMappingLineService- Parameters:
propertyDescriptor- property descriptor- Returns:
- mapping mappingLineModel
-
generateAtomicMappingLine
public MappingLineModel generateAtomicMappingLine(ItemAttributePropertyDescriptor propertyDescriptor)
Description copied from interface:MappingLineServiceGenerates an Atomic type mapping line model based on the attribute property descriptor- Specified by:
generateAtomicMappingLinein interfaceMappingLineService- Returns:
- An AtomicTypeMapping line(model)
-
generateVirtualMappingLine
public MappingLineModel generateVirtualMappingLine(SourceColumnModel sourceColumn)
Description copied from interface:MappingLineServiceGenerates a so called "virtual" mapping line model after a source column has been dropped into the mapping view without a target attribute specified. In this case it is still not clear what type of mapping line model (localized, composed, basic etc.) will be used until the tartet attribute is chosen and dropped into the mapping view. Once a target attribute is dropped, the virtual mapping model is replaced by the related mapping line model.- Specified by:
generateVirtualMappingLinein interfaceMappingLineService- Returns:
- virtual mapping mappingLineModel
-
generateMappedSubMappingLines
public boolean generateMappedSubMappingLines(MappingLineModel mappingLineModel, java.util.Collection<ItemModel> items)
Description copied from interface:MappingLineServiceGenerates new sub mapping lines for the items given. This method is used by the UI editors for collection and composed mapping lines: The referenced object in the editor provides the items that specify the object, and the sub lines are created for these items.- Specified by:
generateMappedSubMappingLinesin interfaceMappingLineService- Returns:
- true if any new sub lines were added
-
generateComposedMappingLine
public MappingLineModel generateComposedMappingLine(ItemAttributePropertyDescriptor propertyDescriptor, boolean generateSubLines)
Description copied from interface:MappingLineServiceGenerates a composed mapping mappingLineModel based on the property descriptor- Specified by:
generateComposedMappingLinein interfaceMappingLineService- Returns:
- A composed mappingLine with or without sub lines
-
generateTranslatorMappingLine
public MappingLineModel generateTranslatorMappingLine(java.lang.String translatorQualifier, java.lang.String translator)
Description copied from interface:MappingLineServiceGenerate a translator mapping mappingLineModel- Specified by:
generateTranslatorMappingLinein interfaceMappingLineService- Parameters:
translatorQualifier- for example '@media'translator- for @media it is "de.hybris.platform.impex.jalo.media.MediaDataTranslator"- Returns:
- a translator mapping mappingLineModel
-
generateTranslatorMappingLine
public MappingLineModel generateTranslatorMappingLine(ClassificationClassModel classificationClass, ClassificationAttributeModel classificationAttribute, java.lang.String translator)
Description copied from interface:MappingLineServiceGenerate a translator mapping mappingLineModel- Specified by:
generateTranslatorMappingLinein interfaceMappingLineServicetranslator- for @media it is "de.hybris.platform.impex.jalo.media.MediaDataTranslator"- Returns:
- a translator mapping mappingLineModel
-
generateProductAttributeMappingLine
public MappingLineModel generateProductAttributeMappingLine(java.lang.String translator, java.lang.String translatorQualifier)
Description copied from interface:MappingLineServiceGenerate a specific translator for type Product (@ClassificationAttributeTranslator)- Specified by:
generateProductAttributeMappingLinein interfaceMappingLineService- Parameters:
translator- translatortranslatorQualifier- translator qualifier- Returns:
- translator mappingLine
-
addCollectionEntry
public MappingLineModel addCollectionEntry(CollectionMappingLine mappingLineModel)
Description copied from interface:MappingLineServiceAdds an additional entry mappingLineModel to a collection mapping mappingLineModel.- Specified by:
addCollectionEntryin interfaceMappingLineService- Parameters:
mappingLineModel- collection mappingLineModel- Returns:
- mapping line
-
isLineOfNumberType
public boolean isLineOfNumberType(MappingLineModel mappingLineModel)
Description copied from interface:MappingLineServiceChecks if the mapping mappingLineModel refers to an attribute of a number type (like integer, double etc.).- Specified by:
isLineOfNumberTypein interfaceMappingLineService- Parameters:
mappingLineModel- MappingLineModel- Returns:
- true if the mapping mappingLineModel represents an attribute of a number type
-
isLineOfDateType
public boolean isLineOfDateType(MappingLineModel mappingLineModel)
Description copied from interface:MappingLineServiceChecks if the mapping mappingLineModel refers to an attribute of a date type (like Product.onlineDate, Product.offlineDate etc.)- Specified by:
isLineOfDateTypein interfaceMappingLineService- Parameters:
mappingLineModel- MappingLineModel- Returns:
- true if the mapping mappingLineModel represents an attribute of a date type
-
getModelService
public ModelService getModelService()
-
-