Package com.hybris.backoffice.excel.data
Class SelectedAttribute
- java.lang.Object
-
- com.hybris.backoffice.excel.data.SelectedAttribute
-
- All Implemented Interfaces:
java.lang.Comparable<SelectedAttribute>
public class SelectedAttribute extends java.lang.Object implements java.lang.Comparable<SelectedAttribute>
Represents selected attribute which should be exported/imported. The object consists of isoCode for localized field, getReferenceFormat for reference, defaultValues provided by user in excel sheet and attribute descriptor for given attribute.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREFERENCE_PATTERN_SEPARATORDeprecated.since 1808.
-
Constructor Summary
Constructors Constructor Description SelectedAttribute()SelectedAttribute(AttributeDescriptorModel attributeDescriptor)SelectedAttribute(java.lang.String isoCode, AttributeDescriptorModel attributeDescriptor)SelectedAttribute(java.lang.String isoCode, java.lang.String referenceFormat, java.lang.String defaultValues, AttributeDescriptorModel attributeDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcompareTo(SelectedAttribute o)booleanequals(java.lang.Object o)java.util.Map<java.lang.String,java.lang.String>findDefaultValues()Deprecated.since 1808.AttributeDescriptorModelgetAttributeDescriptor()java.lang.StringgetDefaultValues()java.lang.StringgetIsoCode()java.lang.StringgetName()java.lang.StringgetQualifier()java.lang.StringgetReferenceFormat()inthashCode()booleanisLocalized()booleanisRequired(java.lang.String currentLanguageIsoCode)voidsetAttributeDescriptor(AttributeDescriptorModel attributeDescriptor)voidsetDefaultValues(java.lang.String defaultValues)voidsetIsoCode(java.lang.String isoCode)voidsetReferenceFormat(java.lang.String referenceFormat)
-
-
-
Field Detail
-
REFERENCE_PATTERN_SEPARATOR
@Deprecated public static final java.lang.String REFERENCE_PATTERN_SEPARATOR
Deprecated.since 1808. UseExcelTemplateConstants.REFERENCE_PATTERN_SEPARATORinstead.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SelectedAttribute
public SelectedAttribute()
-
SelectedAttribute
public SelectedAttribute(AttributeDescriptorModel attributeDescriptor)
-
SelectedAttribute
public SelectedAttribute(java.lang.String isoCode, AttributeDescriptorModel attributeDescriptor)
-
SelectedAttribute
public SelectedAttribute(java.lang.String isoCode, java.lang.String referenceFormat, java.lang.String defaultValues, AttributeDescriptorModel attributeDescriptor)
-
-
Method Detail
-
findDefaultValues
@Deprecated public java.util.Map<java.lang.String,java.lang.String> findDefaultValues()
Deprecated.since 1808. UseDefaultImportParameterParser.parseDefaultValues(String, String)insteadParses referencePattern cell (which is located in the second row) and default values cell (which is located in the third row) and creates map where key is equals to reference key and value is equals to value provided in the third row. For example, for the following reference cell's value: catalog:version and default value cell: Defailt:Online the following map will be returned: {{key: catalog, value: Default}, {key: version, value: Online}}- Returns:
- Map of default values. If default values are not provided then only keys will be returned.
-
getIsoCode
public java.lang.String getIsoCode()
-
setIsoCode
public void setIsoCode(java.lang.String isoCode)
-
getReferenceFormat
public java.lang.String getReferenceFormat()
-
setReferenceFormat
public void setReferenceFormat(java.lang.String referenceFormat)
-
getDefaultValues
public java.lang.String getDefaultValues()
-
setDefaultValues
public void setDefaultValues(java.lang.String defaultValues)
-
getAttributeDescriptor
public AttributeDescriptorModel getAttributeDescriptor()
-
setAttributeDescriptor
public void setAttributeDescriptor(AttributeDescriptorModel attributeDescriptor)
-
isRequired
public boolean isRequired(java.lang.String currentLanguageIsoCode)
-
getName
public java.lang.String getName()
-
getQualifier
public java.lang.String getQualifier()
-
isLocalized
public boolean isLocalized()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(SelectedAttribute o)
- Specified by:
compareToin interfacejava.lang.Comparable<SelectedAttribute>
-
-