Class HeaderDescriptor
- java.lang.Object
-
- de.hybris.platform.impex.jalo.header.AbstractDescriptor
-
- de.hybris.platform.impex.jalo.header.HeaderDescriptor
-
public class HeaderDescriptor extends AbstractDescriptor
Represents an header line within an ImpEx script. It mainly consists of the header mode, the configured composed type and a list of configured columns.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHeaderDescriptor.AttributeConstraintFilterFilter which decides if an attribute has to be treated as mandatory and initial only.protected static classHeaderDescriptor.DefaultAttributeConstraintFilterDefault implementation of an attribute constraint filter which decides for mandatory if the attributeis not private and not optional and for initial only if it is not writable and and initial.protected classHeaderDescriptor.PermittedTypeMappingObject representing one permitted type ex- or importable by this header.-
Nested classes/interfaces inherited from class de.hybris.platform.impex.jalo.header.AbstractDescriptor
AbstractDescriptor.ColumnParams, AbstractDescriptor.DescriptorParams, AbstractDescriptor.HeaderParams
-
-
Constructor Summary
Constructors Constructor Description HeaderDescriptor(ImpExReader reader, java.lang.String expr, AbstractDescriptor.DescriptorParams headerParams, java.lang.String location, DocumentIDRegistry docIDRegistry)Non-parsing constructor - Creates a new header instance.HeaderDescriptor(ImpExReader reader, java.lang.String expr, java.util.List<java.lang.String> columnExpressions, java.lang.String location, DocumentIDRegistry docIDRegistry)Self-parsing constructor - Creates a new header instance.HeaderDescriptor(ImpExReader reader, java.lang.String expr, java.util.List<java.lang.String> columnExpressions, java.lang.String location, DocumentIDRegistry docIDRegistry, HeaderValidationException headerException)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddOmittedTypeMessage(PK typePK, java.lang.String msg)Adds an message to the omitted type messages list.protected voidadjustValuePositions()Discovers all virtual columns and removes them from the column range[0,x].protected ComposedTypecalculateDefaultComposedType()Calculates the top-most permitted composed type starting at configured type.protected HeaderDescriptor.PermittedTypeMappingcalculatePermittedType(ComposedType ct)Creates aHeaderDescriptor.PermittedTypeMappingfor given composed type.protected java.util.Map<java.lang.String,HeaderDescriptor.PermittedTypeMapping>calculatePermittedTypes()Filters any composed (sub)type which doesn't fit the currently configured columns.java.util.Set<StandardColumnDescriptor>calculateUniqueAttributeColumns()Gets the configured columns which are describing attributes of the default composed type (seegetDefaultComposedType()) and are unique.protected java.util.Set<StandardColumnDescriptor>calculateUniqueAttributeColumns(ComposedType targetType)Gets all columns configured at header which are describing an attribute of given type and are unique.protected HeaderCellTranslatorcreateTranslator(java.lang.String expr)Creates the translator class which parses the own definition text of this descriptor.voiddebug(java.lang.String msg)Deprecated.since ages - use logging methodCategory.debug(Object)directlyjava.util.Map<java.lang.Integer,java.lang.String>dump()Gets the header as list of Strings for dumping purposes.voiderror(java.lang.String msg)Deprecated.since ages - use logging methodCategory.error(Object)directlyprotected ComposedTypefindConfiguredComposedType()Tries to gather the composed type instance configured in header line.java.util.List<java.lang.String>getAllColumnQualifiers()Gets a list of all configured columns represented by their qualifier.java.util.Set<StandardColumnDescriptor>getAllColumns(ComposedType targetType)Gets all columns for given composed type.java.util.List<AbstractColumnDescriptor>getColumns()Gets the column descriptors configured for this header.protected java.util.Collection<StandardColumnDescriptor>getColumnsByAttribute(AttributeDescriptor ad)Searches the set of configured columns for columns which are describing given type attribute (which are mapped to this descriptor).java.util.Collection<AbstractColumnDescriptor>getColumnsByQualifier(java.lang.String qualifier)Searches the set of configured columns for columns with given qualifier.java.util.Set<StandardColumnDescriptor>getColumnsForCreation(ComposedType targetType)Deprecated.since ages - usegetColumnsForCreation(String)insteadjava.util.Set<StandardColumnDescriptor>getColumnsForCreation(java.lang.String targetTypeCode)Gets all permitted columns for given composed type's code which are not read-only and part-of. These columns has to be used for creation case.java.util.Set<StandardColumnDescriptor>getColumnsForUpdate(ComposedType targetType)Deprecated.since ages - usegetColumnsForUpdate(String)instead.java.util.Set<StandardColumnDescriptor>getColumnsForUpdate(java.lang.String targetTypeCode)Gets all permitted columns for given composed type's code which are not read-only, and inital-only and unique columns. These columns has to be used for update case.ComposedTypegetConfiguredComposedType()Returns the configured composed type, regardless of whether or not it is actually permitted by this header.java.lang.StringgetConfiguredComposedTypeCode()Returns the configured composed type, regardless of whether or not it is actually permitted by this header.ComposedTypegetDefaultComposedType()Gets the top-most permitted composed type starting at configured type (seecalculateDefaultComposedType().java.lang.StringgetDefaultComposedTypeCode()Gets the top-most permitted composed type starting at configured type (seecalculateDefaultComposedType().DocumentIDRegistrygetDocumentIDRegistry()Returns the used registry for document id's.java.util.Map<java.lang.String,java.lang.Object>getInterceptorRelatedParameters()HeaderValidationExceptiongetInvalidHeaderException()Gets exception associated with invalid header or null if header is valid.java.lang.StringgetLocation()Gets the location of this header line within the read ImpExScript.EnumerationValuegetMode()Gets the mode of this header configured at header line.intgetNumCols()java.lang.StringgetOmittedTypesMessages(PK typePK)Gets a reason text for not omitting given type for this header.java.util.Set<StandardColumnDescriptor>getPartOfColumns(ComposedType targetType)Gets all permitted columns for given composed type which are part-of and not read-only.java.util.Set<StandardColumnDescriptor>getPartOfColumns(java.lang.String targetTypeCode)Gets all permitted columns for given composed type's code which are part-of and not read-only.java.util.Set<java.lang.String>getPermittedTypeCodes()Gets the codes of all types which are subtypes of the configured one and have passed all checks of thecalculatePermittedType(ComposedType)method.ImpExReadergetReader()Gets the reader instance which had created this header.<T extends AbstractColumnDescriptor>
java.util.Collection<T>getSpecificColumns(java.lang.Class<T> descriptor)Returns a collection of all column descriptors instances which are instance of the given descriptor class.java.lang.StringgetTypeCode()Gets the code of the configured composed type of header.java.util.Set<StandardColumnDescriptor>getUniqueAttributeColumns(ComposedType targetType)Gets all columns for given composed type which are unique.java.util.Set<StandardColumnDescriptor>getUniqueAttributeColumns(java.lang.String targetTypeCode)Gets all permitted columns for given composed type which are unique.voidinfo(java.lang.String msg)Deprecated.since ages - use logging methodCategory.info(Object)directlybooleanisBatchMode()Checks if the batch modifier is set for this header.booleanisDebugEnabled()Deprecated.since ages - use logging methodCategory.isDebugEnabled()directlybooleanisDefaultComposedTypeSingleton()Returns whether the default composed typegetDefaultComposedType()is a singleton.booleanisInfoEnabled()Deprecated.since ages - use logging methodCategory.isInfoEnabled()directlybooleanisInsertMode()Checks whether the header mode isINSERT.booleanisInsertUpdateMode()Checks whether the header mode isINSERT_UPDATE.booleanisPermittedType(ComposedType ct)Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)).booleanisPermittedType(java.lang.String code)Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)).booleanisPermittedTypeForInsert(ComposedType ct)Deprecated.since ages - @deprecated useisPermittedTypeForInsert(String)booleanisPermittedTypeForInsert(java.lang.String ct)Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)) for inserts inINSERT or INSERT_UPDATEmodes.booleanisPermittedTypeForUpdate(ComposedType ct)Deprecated.since ages - useisPermittedTypeForUpdate(String)booleanisPermittedTypeForUpdate(java.lang.String ct)Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)) for updates inUPDATE or INSERT_UPDATEmodes.booleanisRemoveMode()Checks whether the header mode isREMOVE.booleanisUpdateMode()Checks whether the header mode isUPDATE.booleanisValid()True, if validvoidsetColumns(java.util.List<AbstractColumnDescriptor> columnDescriptors)Sets the columns of this header and triggers depending steps like Determination of the permitted types, the configured columns and the correct positions of the columns.java.lang.StringtoString()voidvalidate()voidwarn(java.lang.String msg)Deprecated.since ages - use logging methodCategory.warn(Object)directly-
Methods inherited from class de.hybris.platform.impex.jalo.header.AbstractDescriptor
extractItemPathElements, extractModifiersMap, getDefinitionSrc, getDescriptorData, getDescriptorTranslator, parseColumnDescriptor, parseHeaderDescriptor
-
-
-
-
Constructor Detail
-
HeaderDescriptor
public HeaderDescriptor(ImpExReader reader, java.lang.String expr, java.util.List<java.lang.String> columnExpressions, java.lang.String location, DocumentIDRegistry docIDRegistry) throws HeaderValidationException
Self-parsing constructor - Creates a new header instance. Use this constructor if you have a header line as list of Strings. Determines header params, the configured composed type, the permitted types, the configured columns, the default composed type and determines the correct positions of the columns.- Parameters:
reader- calling reader instance mainly for logging purposesexpr- the first record entry of the header linecolumnExpressions- list of all further records (columns) of header linelocation- current location of used readerdocIDRegistry- registry used for storing used documents IDs- Throws:
HeaderValidationException- error while determining and checking type and columns
-
HeaderDescriptor
public HeaderDescriptor(ImpExReader reader, java.lang.String expr, AbstractDescriptor.DescriptorParams headerParams, java.lang.String location, DocumentIDRegistry docIDRegistry) throws HeaderValidationException
Non-parsing constructor - Creates a new header instance. Use this constructor if you get the header line column by column. Determines the configured composed type. Columns will not be checked and determined as well as other tasks depending on that step.. Please callsetColumns(List)later for performing these missing steps.- Parameters:
reader- calling reader instance mainly for logging purposesexpr- the first record entry of the header lineheaderParams- already parsed params of headerlocation- current location of used readerdocIDRegistry- registry used for storing used documents IDs- Throws:
HeaderValidationException- error while determining and checking type and columns
-
HeaderDescriptor
public HeaderDescriptor(ImpExReader reader, java.lang.String expr, java.util.List<java.lang.String> columnExpressions, java.lang.String location, DocumentIDRegistry docIDRegistry, HeaderValidationException headerException) throws HeaderValidationException
- Throws:
HeaderValidationException
-
-
Method Detail
-
isValid
public boolean isValid()
True, if valid- Returns:
- true if header is valid
-
getInvalidHeaderException
public HeaderValidationException getInvalidHeaderException()
Gets exception associated with invalid header or null if header is valid.- Returns:
- exception or null if valid
-
setColumns
public void setColumns(java.util.List<AbstractColumnDescriptor> columnDescriptors) throws HeaderValidationException
Sets the columns of this header and triggers depending steps like Determination of the permitted types, the configured columns and the correct positions of the columns. Can only be called once!!- Parameters:
columnDescriptors- list of all column descriptors for this header- Throws:
HeaderValidationException- error while determining and checking columns
-
adjustValuePositions
protected void adjustValuePositions() throws HeaderValidationExceptionDiscovers all virtual columns and removes them from the column range[0,x]. All virtual columns are set to the position-1 * position. Furthermore it maps each column to the column position defined by modifier 'pos' (if used). If the modifier is used for one column then it has to be used for each other column, for avoiding position conflicts. Furthermore, the defined position has to be unique.- Throws:
HeaderValidationException- Modifier position is not used consequently by all or nothing columns, or two position modifiers have the same value
-
getReader
public ImpExReader getReader()
Gets the reader instance which had created this header. Mainly used for logging purposes.- Returns:
- reader which had created this header
-
isDebugEnabled
@Deprecated public boolean isDebugEnabled()
Deprecated.since ages - use logging methodCategory.isDebugEnabled()directlyChecks if the debug method of the reader is enabled or if no reader set the logger will be checked.- Returns:
- is debug mode enabled?
-
debug
@Deprecated public void debug(java.lang.String msg)
Deprecated.since ages - use logging methodCategory.debug(Object)directlyDebugs a message with the reader or the current logger instance.- Parameters:
msg- debug message
-
isInfoEnabled
@Deprecated public boolean isInfoEnabled()
Deprecated.since ages - use logging methodCategory.isInfoEnabled()directlyChecks if the info method of the reader is enabled or if no reader set the logger will be checked.- Returns:
- is info mode enabled?
-
info
@Deprecated public void info(java.lang.String msg)
Deprecated.since ages - use logging methodCategory.info(Object)directlyLogs an info message with the reader or the current logger instance.- Parameters:
msg- info message
-
warn
@Deprecated public void warn(java.lang.String msg)
Deprecated.since ages - use logging methodCategory.warn(Object)directlyLogs an warn message with the reader or the current logger instance.- Parameters:
msg- warn message
-
error
@Deprecated public void error(java.lang.String msg)
Deprecated.since ages - use logging methodCategory.error(Object)directlyLogs an error message with the reader or the current logger instance.- Parameters:
msg- error message
-
createTranslator
protected HeaderCellTranslator createTranslator(java.lang.String expr)
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
-
isBatchMode
public boolean isBatchMode()
Checks if the batch modifier is set for this header.- Returns:
- true if
batch=trueis set for header, false otherwise
-
isInsertMode
public boolean isInsertMode()
Checks whether the header mode isINSERT.- Returns:
- true if header mode is
INSERT, false otherwise
-
isUpdateMode
public boolean isUpdateMode()
Checks whether the header mode isUPDATE.- Returns:
- true if header mode is
UPDATE, false otherwise
-
isInsertUpdateMode
public boolean isInsertUpdateMode()
Checks whether the header mode isINSERT_UPDATE.- Returns:
- true if header mode is
INSERT_UPDATE, false otherwise
-
isRemoveMode
public boolean isRemoveMode()
Checks whether the header mode isREMOVE.- Returns:
- true if header mode is
REMOVE, false otherwise
-
getColumns
public java.util.List<AbstractColumnDescriptor> getColumns()
Gets the column descriptors configured for this header.- Returns:
- list of all configured column descriptors
-
getNumCols
public int getNumCols()
-
getSpecificColumns
public <T extends AbstractColumnDescriptor> java.util.Collection<T> getSpecificColumns(java.lang.Class<T> descriptor)
Returns a collection of all column descriptors instances which are instance of the given descriptor class. With that you can get for example all special columns.- Type Parameters:
T- Type of column descriptors the result will contain (will be filtered)- Parameters:
descriptor- the class of which the descriptors have top be an instance of- Returns:
- a collection of objects which are instances of the given class
-
getTypeCode
public java.lang.String getTypeCode()
Gets the code of the configured composed type of header.- Returns:
- code of configured composed type
-
findConfiguredComposedType
protected ComposedType findConfiguredComposedType() throws HeaderValidationException
Tries to gather the composed type instance configured in header line.- Returns:
- the composed type configured at header line
- Throws:
HeaderValidationException- configured type is not existent at type system
-
getConfiguredComposedType
public ComposedType getConfiguredComposedType()
Returns the configured composed type, regardless of whether or not it is actually permitted by this header. To get the top-most permitted type usegetDefaultComposedType().- Returns:
- the configured composed type instance
-
getConfiguredComposedTypeCode
public java.lang.String getConfiguredComposedTypeCode()
Returns the configured composed type, regardless of whether or not it is actually permitted by this header. To get the top-most permitted type usegetDefaultComposedType().- Returns:
- the configured composed type instance
-
calculateDefaultComposedType
protected ComposedType calculateDefaultComposedType()
Calculates the top-most permitted composed type starting at configured type. Gets the configured composed type if it is permitted (seeisPermittedType(ComposedType)) and not abstract and not jalo, it will be used, else the subtypes will be searched until a type is found which fits the condition. The check of the subtypes is done as in breath depth search.- Returns:
- the top-most permitted composed type starting at configured one
-
getDefaultComposedType
public ComposedType getDefaultComposedType()
Gets the top-most permitted composed type starting at configured type (seecalculateDefaultComposedType().- Returns:
- the top-most permitted composed type starting at configured one
-
isDefaultComposedTypeSingleton
public boolean isDefaultComposedTypeSingleton()
Returns whether the default composed typegetDefaultComposedType()is a singleton. Does noNullPointerExceptioncheck.
-
getDefaultComposedTypeCode
public java.lang.String getDefaultComposedTypeCode()
Gets the top-most permitted composed type starting at configured type (seecalculateDefaultComposedType().- Returns:
- the top-most permitted composed type starting at configured one
-
getPermittedTypeCodes
public java.util.Set<java.lang.String> getPermittedTypeCodes()
Gets the codes of all types which are subtypes of the configured one and have passed all checks of thecalculatePermittedType(ComposedType)method.- Returns:
- codes of all permitted types
-
isPermittedType
public boolean isPermittedType(ComposedType ct)
Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)).- Parameters:
ct- type to check for permitted type- Returns:
- true if given type is permitted by this header, false otherwise
-
isPermittedTypeForInsert
@Deprecated public boolean isPermittedTypeForInsert(ComposedType ct)
Deprecated.since ages - @deprecated useisPermittedTypeForInsert(String)Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)) for inserts inINSERT or INSERT_UPDATEmodes.Permits only when the type can be found in the permitted types and the type is not marked only for updates (see also
HeaderDescriptor.PermittedTypeMapping.isOnlyForUpdate()).- Parameters:
ct- type to check for permitted type- Returns:
- true if given type is permitted by this header, false otherwise
-
isPermittedTypeForInsert
public boolean isPermittedTypeForInsert(java.lang.String ct)
Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)) for inserts inINSERT or INSERT_UPDATEmodes.Permits only when the type can be found in the permitted types and the type is not marked only for updates (see also
HeaderDescriptor.PermittedTypeMapping.isOnlyForUpdate()).- Parameters:
ct- type to check for permitted type- Returns:
- true if given type is permitted by this header, false otherwise
-
isPermittedTypeForUpdate
@Deprecated public boolean isPermittedTypeForUpdate(ComposedType ct)
Deprecated.since ages - useisPermittedTypeForUpdate(String)Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)) for updates inUPDATE or INSERT_UPDATEmodes.- Parameters:
ct- type to check for permitted type- Returns:
- true if given type is permitted by this header, false otherwise
-
isPermittedTypeForUpdate
public boolean isPermittedTypeForUpdate(java.lang.String ct)
Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)) for updates inUPDATE or INSERT_UPDATEmodes.- Parameters:
ct- type to check for permitted type- Returns:
- true if given type is permitted by this header, false otherwise
-
isPermittedType
public boolean isPermittedType(java.lang.String code)
Checks whether the given type is permitted by this header (is subtype of configured one and fits all checks ofcalculatePermittedType(ComposedType)).- Parameters:
code- code of type to check for permitted type- Returns:
- true if given type is permitted by this header, false otherwise
-
getMode
public EnumerationValue getMode()
Gets the mode of this header configured at header line.- Returns:
- configured header mode
-
dump
public java.util.Map<java.lang.Integer,java.lang.String> dump()
Gets the header as list of Strings for dumping purposes.- Returns:
- header as list of strings mapped to their position
-
addOmittedTypeMessage
protected void addOmittedTypeMessage(PK typePK, java.lang.String msg)
Adds an message to the omitted type messages list. These messages are created if a type is found which fits the configured type but does not has passed all checks of thecalculatePermittedType(ComposedType).- Parameters:
msg- message containing the omitted type code and reason why it was omitted
-
calculatePermittedType
protected HeaderDescriptor.PermittedTypeMapping calculatePermittedType(ComposedType ct)
Creates aHeaderDescriptor.PermittedTypeMappingfor given composed type. While creation it checks that- it is not abstract and not jalo-only
- at least one unique attribute column can be found in INSERT or INSERT_UPDATE mode
- no mandatory attribute columns are missing except REMOVE mode
- an no initial-only attribute columns are missing in INSERT or INSERT_UPDATE mode
ImpExConstants.Enumerations.ImpExValidationModeEnum.IMPORT_RELAXEDmode all checks are disabled. If an check fails, anullwill be returned and theaddOmittedTypeMessage(PK, String)will be called.- Parameters:
ct- composed type for which a mapping will be created- Returns:
- created type mapping with all columns enabled which are configured at header or null if an check fails
-
calculatePermittedTypes
protected java.util.Map<java.lang.String,HeaderDescriptor.PermittedTypeMapping> calculatePermittedTypes()
Filters any composed (sub)type which doesn't fit the currently configured columns. A type is not permitted when:- it is abstract or jalo-only
- no unique attribute columns can be found in INSERT or INSERT_UPDATE mode
- mandatory attribute columns are missing except REMOVE mode
- initial-only attribute columns are missing in INSERT or INSERT_UPDATE mode
- Returns:
- all permitted types based upon this headers composed type
-
validate
public void validate() throws HeaderValidationException- Specified by:
validatein classAbstractDescriptor- Throws:
HeaderValidationException
-
getColumnsForUpdate
@Deprecated public java.util.Set<StandardColumnDescriptor> getColumnsForUpdate(ComposedType targetType)
Deprecated.since ages - usegetColumnsForUpdate(String)instead.Gets all permitted columns for given composed type which are not- read-only,
- and inital-only
- and unique columns.
- Parameters:
targetType- type for which the columns for update are needed- Returns:
- set of columns for update or empty set if type is not permitted
-
getColumnsForUpdate
public java.util.Set<StandardColumnDescriptor> getColumnsForUpdate(java.lang.String targetTypeCode)
Gets all permitted columns for given composed type's code which are not- read-only,
- and inital-only
- and unique columns.
- Parameters:
targetTypeCode- type code for which the columns for update are needed- Returns:
- set of columns for update or empty set if type is not permitted
-
getColumnsForCreation
@Deprecated public java.util.Set<StandardColumnDescriptor> getColumnsForCreation(ComposedType targetType)
Deprecated.since ages - usegetColumnsForCreation(String)insteadGets all permitted columns for given composed type which are not- read-only
- and part-of.
- Parameters:
targetType- type for which the columns for creation are needed- Returns:
- set of columns for creation or empty set if type is not permitted
-
getColumnsForCreation
public java.util.Set<StandardColumnDescriptor> getColumnsForCreation(java.lang.String targetTypeCode)
Gets all permitted columns for given composed type's code which are not- read-only
- and part-of.
- Parameters:
targetTypeCode- type coce for which the columns for creation are needed- Returns:
- set of columns for creation or empty set if type is not permitted
-
getPartOfColumns
public java.util.Set<StandardColumnDescriptor> getPartOfColumns(ComposedType targetType)
Gets all permitted columns for given composed type which are- part-of
- read-only.
- Parameters:
targetType- type for which the part-of columns are needed- Returns:
- set of part-of columns or empty set if type is not permitted
-
getPartOfColumns
public java.util.Set<StandardColumnDescriptor> getPartOfColumns(java.lang.String targetTypeCode)
Gets all permitted columns for given composed type's code which are- part-of
- read-only.
- Parameters:
targetTypeCode- type for which the part-of columns are needed- Returns:
- set of part-of columns or empty set if type is not permitted
-
getAllColumns
public java.util.Set<StandardColumnDescriptor> getAllColumns(ComposedType targetType)
Gets all columns for given composed type.- Parameters:
targetType- type for which the all columns are needed- Returns:
- set of columns or empty set if type is not permitted
-
getUniqueAttributeColumns
public java.util.Set<StandardColumnDescriptor> getUniqueAttributeColumns(ComposedType targetType)
Gets all columns for given composed type which are- unique.
- Parameters:
targetType- type for which the unique columns are needed- Returns:
- set of unique columns or empty set if type is not permitted
-
getUniqueAttributeColumns
public java.util.Set<StandardColumnDescriptor> getUniqueAttributeColumns(java.lang.String targetTypeCode)
Gets all permitted columns for given composed type which are- unique.
- Parameters:
targetTypeCode- code of type for which the unique columns are needed- Returns:
- set of unique columns or empty set if type is not permitted
-
calculateUniqueAttributeColumns
protected java.util.Set<StandardColumnDescriptor> calculateUniqueAttributeColumns(ComposedType targetType)
Gets all columns configured at header which are describing an attribute of given type and are unique.- Parameters:
targetType- type to which all configured unique columns will be returned- Returns:
- list of all unique columns in respect to given type
-
calculateUniqueAttributeColumns
public java.util.Set<StandardColumnDescriptor> calculateUniqueAttributeColumns()
Gets the configured columns which are describing attributes of the default composed type (seegetDefaultComposedType()) and are unique.- Returns:
- unique columns of default composed type
-
getAllColumnQualifiers
public java.util.List<java.lang.String> getAllColumnQualifiers()
Gets a list of all configured columns represented by their qualifier.- Returns:
- list of all configured columns
-
getColumnsByAttribute
protected java.util.Collection<StandardColumnDescriptor> getColumnsByAttribute(AttributeDescriptor ad)
Searches the set of configured columns for columns which are describing given type attribute (which are mapped to this descriptor).- Parameters:
ad- descriptor to which all configured columns are needed- Returns:
- list of all columns which are matched to given descriptor or an empty list
-
getColumnsByQualifier
public java.util.Collection<AbstractColumnDescriptor> getColumnsByQualifier(java.lang.String qualifier)
Searches the set of configured columns for columns with given qualifier.- Parameters:
qualifier- qualifier of resulting columns- Returns:
- list of all columns which have given qualifier as qualifier
-
getLocation
public java.lang.String getLocation()
Gets the location of this header line within the read ImpExScript.- Returns:
- location of based header line
-
getDocumentIDRegistry
public DocumentIDRegistry getDocumentIDRegistry()
Returns the used registry for document id's.- Returns:
- the used document id registry
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getOmittedTypesMessages
public java.lang.String getOmittedTypesMessages(PK typePK)
Gets a reason text for not omitting given type for this header.- Returns:
- reason text for omitting the type or null if there is no reason.
-
getInterceptorRelatedParameters
public java.util.Map<java.lang.String,java.lang.Object> getInterceptorRelatedParameters()
-
-