Class AbstractColumnDescriptor
java.lang.Object
de.hybris.platform.impex.jalo.header.AbstractDescriptor
de.hybris.platform.impex.jalo.header.AbstractColumnDescriptor
- Direct Known Subclasses:
DocumentIDColumnDescriptor,SpecialColumnDescriptor,StandardColumnDescriptor
Represents a descriptor of a column. A column holds the header instance it belongs to, the position within this
header as well as a cell decorator additionally to the instances hold by a general descriptor.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.impex.jalo.header.AbstractDescriptor
AbstractDescriptor.ColumnParams, AbstractDescriptor.DescriptorParams, AbstractDescriptor.HeaderParams -
Constructor Summary
ConstructorsConstructorDescriptionAbstractColumnDescriptor(int position, HeaderDescriptor header, String expr) Self-parsing constructor.AbstractColumnDescriptor(int position, HeaderDescriptor header, String expr, AbstractDescriptor.DescriptorParams params) Non-parsing constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidchangePosition(int newPos) Assigns this column a new value position.protected CSVCellDecoratorEvaluates thecellDecoratormodifier and instantiates the specified class if set.protected HeaderCellTranslatorcreateTranslator(String expr) Creates the translator class which parses the own definition text of this descriptor.Gets the cell decorator instance specified for this column.Gets the header instance this column belongs to.Gets the qualifier of this column without prefix (If the qualifier is "Principal.uid", only "uid" will be returned, all until the first dot will be cut).intGets the position of this column within header.protected voidshiftPosition(int offset) Shifts this column to the right by the given offset.protected voidvalidate()Methods inherited from class de.hybris.platform.impex.jalo.header.AbstractDescriptor
extractItemPathElements, extractModifiersMap, getDefinitionSrc, getDescriptorData, getDescriptorTranslator, parseColumnDescriptor, parseHeaderDescriptor
-
Constructor Details
-
AbstractColumnDescriptor
public AbstractColumnDescriptor(int position, HeaderDescriptor header, String expr) throws HeaderValidationException Self-parsing constructor. Creates a new column descriptor belonging to given header, creates fitting translator and parses all column parameters from given expression.- Parameters:
position- position of column within headerheader- the header the column belongsexpr- column expression- Throws:
HeaderValidationException- error while parsing column expression
-
AbstractColumnDescriptor
public AbstractColumnDescriptor(int position, HeaderDescriptor header, String expr, AbstractDescriptor.DescriptorParams params) throws HeaderValidationException Non-parsing constructor. Creates a new column descriptor belonging to given header using given column parameters.- Parameters:
position- position of column within headerheader- the header the column belongsexpr- column expressionparams- already parsed column parameters- Throws:
HeaderValidationException- error while processing column expression
-
-
Method Details
-
changePosition
protected void changePosition(int newPos) Assigns this column a new value position.- Parameters:
newPos- the new position of the column
-
shiftPosition
protected void shiftPosition(int offset) Shifts this column to the right by the given offset.pos += offset
- Parameters:
offset- the offset which will be add to the position
-
createCSVDecorator
Evaluates thecellDecoratormodifier and instantiates the specified class if set.- Returns:
- the cell decorator class specified at modifier of this column
- Throws:
HeaderValidationException- specified class is not of correct type
-
getCSVCellDecorator
Gets the cell decorator instance specified for this column.- Returns:
- assigned cell decorator
-
createTranslator
Description copied from class:AbstractDescriptorCreates the translator class which parses the own definition text of this descriptor.- Specified by:
createTranslatorin classAbstractDescriptor- Parameters:
expr- the definition text- Returns:
- the translator instance
-
getQualifier
Gets the qualifier of this column without prefix (If the qualifier is "Principal.uid", only "uid" will be returned, all until the first dot will be cut).- Returns:
- qualifier of this column
-
getValuePosition
public int getValuePosition()Gets the position of this column within header. It may not be the original position because of calls of thechangePosition(int)orshiftPosition(int)methods.- Returns:
- position of column within header
-
getHeader
Gets the header instance this column belongs to.- Returns:
- mapped header
-
validate
- Specified by:
validatein classAbstractDescriptor- Throws:
HeaderValidationException
-
getQualifierForComment
-