public class DocumentIDColumnDescriptor extends AbstractColumnDescriptor
AbstractDescriptor.ColumnParams, AbstractDescriptor.DescriptorParams, AbstractDescriptor.HeaderParams| Constructor and Description |
|---|
DocumentIDColumnDescriptor(int position,
HeaderDescriptor header,
java.lang.String expr)
Instantiates a new descriptor at given position in header associated with given column qualifier.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateIDForItem(Item item)
Generates an ID for the given item and registers it at the document id registry.
|
void |
registerIDForItem(java.lang.String cellValue,
Item item)
Registers the given ID for the given item at the document id registry, so that the ID will be resolved to that
item later.
|
void |
registerIDForItem(java.lang.String cellValue,
PK itemPK) |
protected void |
validate() |
changePosition, createCSVDecorator, createTranslator, getCSVCellDecorator, getHeader, getQualifier, getQualifierForComment, getValuePosition, shiftPositionextractItemPathElements, extractModifiersMap, getDefinitionSrc, getDescriptorData, getDescriptorTranslator, parseColumnDescriptor, parseHeaderDescriptorpublic DocumentIDColumnDescriptor(int position,
HeaderDescriptor header,
java.lang.String expr)
throws HeaderValidationException
position - the position of the column within headerheader - the header in which the column descriptor will be part ofexpr - the qualifier of the column in header lineHeaderValidationException - no document id registry is set. Pass a DocumentIDRegistry instance while header instantiationpublic void registerIDForItem(java.lang.String cellValue,
Item item)
throws ImpExException
cellValue - the value line entry which represents a document IDitem - the item to which the ID will be mapped and to which the ID will be resolved at later requestsImpExException - error while adding the new ID to registry (ID is already used for an other item)public void registerIDForItem(java.lang.String cellValue,
PK itemPK)
throws ImpExException
ImpExExceptionpublic java.lang.String generateIDForItem(Item item)
item - the item for which an ID is neededprotected void validate()
throws HeaderValidationException
validate in class AbstractColumnDescriptorHeaderValidationExceptionCopyright © 2018 SAP SE. All Rights Reserved.