Interface MappingLineModel
-
- All Superinterfaces:
MappingLineObservable
- All Known Subinterfaces:
AttributeCollectionMappingLine,CollectionMappingLine,ComposedTypeMappingLine,TranslatorMappingLine
- All Known Implementing Classes:
AtomicTypeMapping,DefaultAttribCollectionMapping,DefaultCollectionMapping,DefaultComposedTypeMapping,DefaultMappingLine,DefaultTranslatorMapping,EnumTypeMapping,LocalizedAtomicTypeMapping,LocalizedTranslatorMapping,LocalizedTypeMapping,VirtualMappingLine
public interface MappingLineModel extends MappingLineObservable
Interface model of all types of mapping lines in the Import Cockpit
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChild(MappingLineModel mappingLineModel)Adds a new sub mappingLineModel (child) to the mapping mappingLineModel.java.lang.StringgetAttributeCode()Returns the code of the attribute represented by the mapping mappingLineModel.AttributeDescriptorModelgetAttributeDescriptor()Returns the attribute descriptor of this mapping mappingLineModel.java.util.List<MappingLineModel>getChildren()Returns the list of child/sub lines.TypeModelgetCollectionElementType()Returns the type of this collection element.java.lang.StringgetDisplayName()Returns the attribute name of the mapping mappingLineModel for display in the mapping area.AbstractImportFormatgetFormatPattern()Gets the format pattern of the mappingLineModel if there is one (for numbers and dates).intgetLevel()Returns the level of this mappingLineModel in the mapping.MappingModelgetMapping()Returns the mapping to which this mappingLineModel belongs to.MappingLineModelgetParent()Returns the parent of this mapping mappingLineModel or null if the mappingLineModel is on the top level.java.lang.StringgetPropDescriptorQualifier()Returns the property descriptor qualifier of the mapping linSourceColumnModelgetSource()Returns the assigned source column.java.lang.StringgetTranslator()Returns the translator that should be used for importing the mapped attribute values of this mapping mappingLineModel.java.lang.StringgetType()Returns the type of this attribute.java.lang.StringgetTypeCode()Returns the code of the attribute type of the mapping mappingLineModel.java.lang.StringgetValue()Returns the content of the value field of the mapping mappingLineModel.booleanhasChildren()Returns true if this mappingLineModel has children/sub lines.booleanhasSource()Returns true if this mappingLineModel has a sourcebooleanisAllowNull()Returns true if this mappingLineModel is marked to allow null values.booleanisAtomic()Returns true if this mappingLineModel represents an atomic type with (no sub lines possible).booleanisCollapsed()Returns true if the mapping mappingLineModel is opened (in the mapping view) after next updatebooleanisCollectionElement()Returns true if the mapping mappingLineModel is a collection element.booleanisComposed()Returns true if this mappingLineModel is a composed mappingLineModel.booleanisFocused()Returns true if the mapping mappingLineModel is focused after next updatebooleanisSelectorLocked()Returns true if the unique selector is locked for changes.booleanisSourceLocked()Returns true if the source cell field is locked for changes.booleanisUnique()Returns true if this mappingLineModel is marked as unique.booleanisValid()Returns whether the mapping mappingLineModel is valid according to result of the mapping validation.booleanisValueLocked()Returns true if the value field is locked for changes.voidremoveChild(MappingLineModel mappingLineModel)Removes a mappingLineModel from the list of children.voidsetAllowNull(boolean isAllowNull)Sets true if the mapping mappingLineModel should allow null values during import.voidsetAttributeDescriptor(AttributeDescriptorModel attributeDescriptor)Sets the attribute descriptor to the mapping mappingLineModel.voidsetCollapsed(boolean collapsed)Sets the variable that defines if the mapping mappingLineModel is opened or closed (in the mapping view) after next updatevoidsetCollectionElementType(TypeModel model)Sets the type of the collection element.voidsetFocused(boolean focused)Sets the variable that defines if the mapping mappingLineModel is focused after next updatevoidsetFormatPattern(AbstractImportFormat formatPattern)Sets the format patter to the mapping mappingLineModel (for numbers or dates).voidsetMapping(MappingModel mapping)Sets the mapping of the mapping mappingLineModel.voidsetParent(MappingLineModel mappingLineModel)Sets the parent of the mapping mappingLineModelvoidsetPropDescriptorQualifier(java.lang.String propDescriptorQualifier)Sets the property descriptor qualifier to the mapping mappingLineModel.voidsetSource(SourceColumnModel source)Sets the mapped source column (SourceColumnListitemModel object) to the mapping mappingLineModel.voidsetTranslator(java.lang.String translator)Sets the translator that should be used for importing the mapped attribute values of this mapping mappingLineModel.voidsetUnique(boolean unique)voidsetValid(boolean isValid)Sets whether the mapping mappingLineModel is valid according to the mapping validation logic.voidsetValue(java.lang.String value)Sets the content to the value field of the mapping mappingLineModel.-
Methods inherited from interface de.hybris.platform.importcockpit.model.mappingview.mappingline.MappingLineObservable
addObserver, notifyObservers, removeObserver
-
-
-
-
Method Detail
-
setFocused
void setFocused(boolean focused)
Sets the variable that defines if the mapping mappingLineModel is focused after next update- Parameters:
focused-
-
isFocused
boolean isFocused()
Returns true if the mapping mappingLineModel is focused after next update
-
setCollapsed
void setCollapsed(boolean collapsed)
Sets the variable that defines if the mapping mappingLineModel is opened or closed (in the mapping view) after next update- Parameters:
collapsed-
-
isCollapsed
boolean isCollapsed()
Returns true if the mapping mappingLineModel is opened (in the mapping view) after next update
-
getLevel
int getLevel()
Returns the level of this mappingLineModel in the mapping. If this is a direct child of the mapping then the level is 0. If it is a child of another mappingLineModel then it is the level of the parent plus one.- Returns:
- level int
-
getMapping
MappingModel getMapping()
Returns the mapping to which this mappingLineModel belongs to.- Returns:
- mapping
-
setMapping
void setMapping(MappingModel mapping)
Sets the mapping of the mapping mappingLineModel.- Parameters:
mapping-
-
isAtomic
boolean isAtomic()
Returns true if this mappingLineModel represents an atomic type with (no sub lines possible).- Returns:
- true if basic
-
isComposed
boolean isComposed()
Returns true if this mappingLineModel is a composed mappingLineModel. (Sub lines possible, true for collection or composed mapping lines)- Returns:
- true if composed
-
isSourceLocked
boolean isSourceLocked()
Returns true if the source cell field is locked for changes.- Returns:
- true if source cell is locked, otherwise false
-
isValueLocked
boolean isValueLocked()
Returns true if the value field is locked for changes.- Returns:
- true if value field is locked for changes, otherwise false
-
hasChildren
boolean hasChildren()
Returns true if this mappingLineModel has children/sub lines.- Returns:
- true if the mapping mappingLineModel children
-
getChildren
java.util.List<MappingLineModel> getChildren()
Returns the list of child/sub lines.- Returns:
- list of MappingLineModel sub mappingLineModel objects
-
addChild
void addChild(MappingLineModel mappingLineModel)
Adds a new sub mappingLineModel (child) to the mapping mappingLineModel.- Parameters:
mappingLineModel- additional mappingLineModel
-
removeChild
void removeChild(MappingLineModel mappingLineModel)
Removes a mappingLineModel from the list of children.- Parameters:
mappingLineModel- mappingLineModel to remove
-
getValue
java.lang.String getValue()
Returns the content of the value field of the mapping mappingLineModel.- Returns:
- value string
-
setValue
void setValue(java.lang.String value)
Sets the content to the value field of the mapping mappingLineModel.- Parameters:
value-
-
getTranslator
java.lang.String getTranslator()
Returns the translator that should be used for importing the mapped attribute values of this mapping mappingLineModel.- Returns:
- translator
-
setTranslator
void setTranslator(java.lang.String translator)
Sets the translator that should be used for importing the mapped attribute values of this mapping mappingLineModel.- Parameters:
translator-
-
getParent
MappingLineModel getParent()
Returns the parent of this mapping mappingLineModel or null if the mappingLineModel is on the top level.- Returns:
- parent
-
setParent
void setParent(MappingLineModel mappingLineModel)
Sets the parent of the mapping mappingLineModel- Parameters:
mappingLineModel- parent mapping mappingLineModel
-
getSource
SourceColumnModel getSource()
Returns the assigned source column.- Returns:
- source SourceColumnListitemModel object
-
setSource
void setSource(SourceColumnModel source)
Sets the mapped source column (SourceColumnListitemModel object) to the mapping mappingLineModel.- Parameters:
source- SourceColumnListitemModel object
-
getAttributeDescriptor
AttributeDescriptorModel getAttributeDescriptor()
Returns the attribute descriptor of this mapping mappingLineModel. Can be null in some cases (localization entries).- Returns:
- attribute descriptor
-
setAttributeDescriptor
void setAttributeDescriptor(AttributeDescriptorModel attributeDescriptor)
Sets the attribute descriptor to the mapping mappingLineModel.- Parameters:
attributeDescriptor-
-
hasSource
boolean hasSource()
Returns true if this mappingLineModel has a source- Returns:
- true if has source
-
getType
java.lang.String getType()
Returns the type of this attribute.- Returns:
- type
-
isUnique
boolean isUnique()
Returns true if this mappingLineModel is marked as unique.- Returns:
- true if unique
-
setUnique
void setUnique(boolean unique)
-
isAllowNull
boolean isAllowNull()
Returns true if this mappingLineModel is marked to allow null values. In this case a [allowNull=true] modifier will be added to impex header entry.- Returns:
- true if allowNull set to "true"
-
setAllowNull
void setAllowNull(boolean isAllowNull)
Sets true if the mapping mappingLineModel should allow null values during import. If true a [allowNull=true] modifier will be added to impex header entry.- Parameters:
isAllowNull-
-
isSelectorLocked
boolean isSelectorLocked()
Returns true if the unique selector is locked for changes.- Returns:
- true if unique is locked for changes
-
isCollectionElement
boolean isCollectionElement()
Returns true if the mapping mappingLineModel is a collection element.- Returns:
- true if the mapping mappingLineModel is an element of a collection
-
getCollectionElementType
TypeModel getCollectionElementType()
Returns the type of this collection element.- Returns:
- element type TypeModel
-
setCollectionElementType
void setCollectionElementType(TypeModel model)
Sets the type of the collection element.- Parameters:
model- TypeModel
-
setPropDescriptorQualifier
void setPropDescriptorQualifier(java.lang.String propDescriptorQualifier)
Sets the property descriptor qualifier to the mapping mappingLineModel.- Parameters:
propDescriptorQualifier-
-
getPropDescriptorQualifier
java.lang.String getPropDescriptorQualifier()
Returns the property descriptor qualifier of the mapping lin- Returns:
- property descriptor qualifier
-
setValid
void setValid(boolean isValid)
Sets whether the mapping mappingLineModel is valid according to the mapping validation logic.- Parameters:
isValid-
-
isValid
boolean isValid()
Returns whether the mapping mappingLineModel is valid according to result of the mapping validation.- Returns:
- true if the mapping mappingLineModel is valid
-
getFormatPattern
AbstractImportFormat getFormatPattern()
Gets the format pattern of the mappingLineModel if there is one (for numbers and dates).- Returns:
- format pattern as string
-
setFormatPattern
void setFormatPattern(AbstractImportFormat formatPattern)
Sets the format patter to the mapping mappingLineModel (for numbers or dates).- Parameters:
formatPattern-
-
getDisplayName
java.lang.String getDisplayName()
Returns the attribute name of the mapping mappingLineModel for display in the mapping area.- Returns:
- display name of the attribute represented by the mapping mappingLineModel
-
getAttributeCode
java.lang.String getAttributeCode()
Returns the code of the attribute represented by the mapping mappingLineModel.- Returns:
- attribute code
-
getTypeCode
java.lang.String getTypeCode()
Returns the code of the attribute type of the mapping mappingLineModel.- Returns:
- type code
-
-