@Override
protected ProcessorResult processAttribute(Arguments arguments, Element element, String attributeName) {
Expression expression = (Expression) StandardExpressions.getExpressionParser(arguments.getConfiguration())
.parseExpression(arguments.getConfiguration(), arguments, element.getAttributeValue(attributeName));
ProductOptionValue productOptionValue = (ProductOptionValue) expression.execute(arguments.getConfiguration(), arguments);
ProductOptionValueDTO dto = new ProductOptionValueDTO();
dto.setOptionId(productOptionValue.getProductOption().getId());
dto.setValueId(productOptionValue.getId());
dto.setValueName(productOptionValue.getAttributeValue());
if (productOptionValue.getPriceAdjustment() != null) {
dto.setPriceAdjustment(productOptionValue.getPriceAdjustment().getAmount());
}
try {
ObjectMapper mapper = new ObjectMapper();
Writer strWriter = new StringWriter();
mapper.writeValue(strWriter, dto);