net.ibizsys.model.util.merger.control.toolbar.PSDETBUIActionItemMerger Maven / Gradle / Ivy
package net.ibizsys.model.util.merger.control.toolbar;
import com.fasterxml.jackson.databind.node.ObjectNode;
import net.ibizsys.model.util.merger.IPSModelListMerger;
import net.ibizsys.model.util.merger.IPSModelMergeContext;
import net.ibizsys.model.util.merger.PSModelMergerFactory;
import static net.ibizsys.model.control.toolbar.PSDETBUIActionItemImpl.*;
public class PSDETBUIActionItemMerger extends net.ibizsys.model.util.merger.control.toolbar.PSDEToolbarItemMerger{
@Override
protected boolean isEnableMergeChild(IPSModelMergeContext iPSModelMergeContext, String strFieldName) {
Boolean ret = iPSModelMergeContext.isEnableMergeChild(net.ibizsys.model.control.toolbar.PSDETBUIActionItemImpl.class, strFieldName);
return (ret != null)?ret:super.isEnableMergeChild(iPSModelMergeContext, strFieldName);
}
@Override
protected void onMerge(IPSModelMergeContext iPSModelMergeContext, ObjectNode objectNode, ObjectNode mergeObjectNode) throws Exception {
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSDETOOLBARITEMS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.control.toolbar.IPSDEToolbarItem.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSDETOOLBARITEMS);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSUIACTION)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.view.IPSUIAction.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.mergeSingle(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSUIACTION);
}
}
super.onMerge(iPSModelMergeContext, objectNode, mergeObjectNode);
}
}