Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CreativeDecorator.java
@Override
@SneakyThrows
public void mapBtoA(CreativeDecorated b, Creative a, MappingContext mappingContext) {
...
// layout is mandatory for display third party and
String layoutName = b.getLayout();
if (isThirdPartyDisplay || isHostedDisplay) {
if (isCreateOperation) {
ObjectValidationUtils.checkNotNull(layoutName, ErrorMessageEnum.MISSING_REQUIRED_FIELD.getMessage(), "layout");
}
// if (StringUtils.isNoneEmpty(layoutName)) {
// Optional<Integer> layoutId = layoutService.getIdByLayoutName(layoutName);
// ObjectValidationUtils.checkNotNull(layoutId, ErrorMessageEnum.INVALID_FIELD_VALUE.getMessage(), "layout");
// a.setLayoutId(layoutId);
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.