Package wt.change2.converter.richtext
Interface ChangeRichTextConverterDelegate
- All Known Implementing Classes:
ChangeItemRichTextConverterDelegate
public interface ChangeRichTextConverterDelegate
Contract for delegates which perform simple text attributes to rich text attribute conversion
Supported API: true
Supported API: true
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckRichTextTransformation(Persistable persistable) This method performance actual validation of simple to rich text transformation to check if any error is there.booleanconvert(Persistable persistable, boolean cleanSource) This method performs actual copy/move of attributes This method should take care to prevent doing any conversion if source attribute value is blank.This method should return unmodifiable map.This method should return a concrete class which implements wt.change2.CHangeItem or is type of Promotion Notice Typically it will be model class.
-
Method Details
-
getTargetClass
Class getTargetClass()This method should return a concrete class which implements wt.change2.CHangeItem or is type of Promotion Notice Typically it will be model class. Supported API: true Extendable: false- Returns:
- class for which delegate is implemented
-
getAttributesForConversion
This method should return unmodifiable map. Each entry in map has key as source attribute which is expected to be plain text and value as target attribute which is rich text. Should be non-empty. Supported API: true- Returns:
- collection of source and destination attributes for conversion
-
convert
This method performs actual copy/move of attributes This method should take care to prevent doing any conversion if source attribute value is blank. If cleanSource flag is true, source attribute should be set to null. Supported API: true- Parameters:
persistable-cleanSource-- Returns:
- true if conversion was successful and false if conversion was not done or unsucessful
- Throws:
WTPropertyVetoException
-
checkRichTextTransformation
void checkRichTextTransformation(Persistable persistable) throws wt.change2.converter.richtext.WTRichTextTransformationException This method performance actual validation of simple to rich text transformation to check if any error is there. If the given persistable has multiple simple text attribute to be converted to rich text, error report attributes can be appended in same order in the exception being thrown. Supported API: true- Parameters:
persistable-- Throws:
wt.change2.converter.richtext.WTRichTextTransformationException
-