net.ibizsys.model.util.merger.control.panel.PSSysPanelMerger Maven / Gradle / Ivy
package net.ibizsys.model.util.merger.control.panel;
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.panel.PSSysPanelImpl.*;
public class PSSysPanelMerger extends net.ibizsys.model.util.merger.control.PSControlContainerMerger{
@Override
protected boolean isEnableMergeChild(IPSModelMergeContext iPSModelMergeContext, String strFieldName) {
Boolean ret = iPSModelMergeContext.isEnableMergeChild(net.ibizsys.model.control.panel.PSSysPanelImpl.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_GETALLPSPANELFIELDS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.control.panel.IPSPanelField.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETALLPSPANELFIELDS);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSLAYOUT)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.control.layout.IPSLayout.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.mergeSingle(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSLAYOUT);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETROOTPSPANELITEMS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.control.panel.IPSPanelItem.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETROOTPSPANELITEMS);
}
}
super.onMerge(iPSModelMergeContext, objectNode, mergeObjectNode);
}
}