Class Europe1RowTranslator
- java.lang.Object
-
- de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
-
- de.hybris.platform.impex.jalo.translators.SingleValueTranslator
-
- de.hybris.platform.europe1.jalo.impex.Europe1RowTranslator
-
- Direct Known Subclasses:
Europe1PricesTranslator.Europe1PriceRowTranslator,Europe1ProductDiscountTranslator.Europe1DiscountRowTranslator,Europe1UserDiscountsTranslator.Europe1GlobalDiscountRowTranslator
public abstract class Europe1RowTranslator extends SingleValueTranslator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classEurope1RowTranslator.ParsedCurrency
-
Constructor Summary
Constructors Constructor Description Europe1RowTranslator()Europe1RowTranslator(java.text.SimpleDateFormat dateFormat, java.text.NumberFormat numberFormat, java.util.Locale loc)For testing purposes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.MapgetCurrenciesISOs()protected java.util.MapgetCurrenciesSymbols()protected java.text.DateFormatgetDateFormat()protected java.lang.StringgetDateFormatString(AbstractDescriptor columnDescriptor)protected java.text.NumberFormatgetNumberFormat()protected java.lang.StringgetNumberFormatString(AbstractDescriptor columnDescriptor)voidinit(StandardColumnDescriptor columnDescriptor)Called once per header creation to allow configuring this translator using column modifiers etc.protected Europe1RowTranslator.ParsedCurrencyparseCurrency(java.lang.String valueExpr)protected DateRangeparseDateRange(java.lang.String valueExpr)Parses a given daterange expression to aDateRangeobject.protected java.util.DatetransformEndDate(java.util.Date endDate)Transforms the time of the given date to 23:59:59 if it is 00:00:00.protected java.util.DatetransformStartDate(java.util.Date startDate)TPlease override this method if you want to add your own transformation.-
Methods inherited from class de.hybris.platform.impex.jalo.translators.SingleValueTranslator
convertToJalo, convertToString, exportValue, getEmptyValue, importValue, isEmpty
-
Methods inherited from class de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
clearStatus, createTranslator, createTranslator, createTranslator, debug, error, getColumnDescriptor, getFlexibleSearch, info, isDebugEnabled, isInfoEnabled, setEmpty, setError, validate, warn, wasEmpty, wasUnresolved
-
-
-
-
Method Detail
-
init
public void init(StandardColumnDescriptor columnDescriptor)
Description copied from class:AbstractValueTranslatorCalled once per header creation to allow configuring this translator using column modifiers etc.- Overrides:
initin classAbstractValueTranslator- Parameters:
columnDescriptor- descriptor where the value to translate belongs to
-
parseDateRange
protected DateRange parseDateRange(java.lang.String valueExpr)
Parses a given daterange expression to aDateRangeobject.- Parameters:
valueExpr- expression to parse- Returns:
- parsed date range
-
transformStartDate
protected java.util.Date transformStartDate(java.util.Date startDate)
TPlease override this method if you want to add your own transformation.- Parameters:
startDate- date to transform- Returns:
- transformed date (given one is returned)
-
transformEndDate
protected java.util.Date transformEndDate(java.util.Date endDate)
Transforms the time of the given date to 23:59:59 if it is 00:00:00. This is needed for the end date of the daterange attribute because of better search results. If start date same as end date you get in problems). Please override this method if you disable the special transformation or if you want to add your own transformation.- Parameters:
endDate- date to transform- Returns:
- transformed date (time is set to 23:59:59 if it was 00:00:00)
-
parseCurrency
protected Europe1RowTranslator.ParsedCurrency parseCurrency(java.lang.String valueExpr)
-
getDateFormat
protected java.text.DateFormat getDateFormat()
-
getNumberFormat
protected java.text.NumberFormat getNumberFormat()
-
getCurrenciesISOs
protected java.util.Map getCurrenciesISOs()
-
getCurrenciesSymbols
protected java.util.Map getCurrenciesSymbols()
-
getDateFormatString
protected java.lang.String getDateFormatString(AbstractDescriptor columnDescriptor)
-
getNumberFormatString
protected java.lang.String getNumberFormatString(AbstractDescriptor columnDescriptor)
-
-