net.ibizsys.model.util.merger.app.PSSubAppRefMerger Maven / Gradle / Ivy
package net.ibizsys.model.util.merger.app;
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.app.PSSubAppRefImpl.*;
public class PSSubAppRefMerger extends net.ibizsys.model.util.merger.app.PSApplicationObjectMerger{
@Override
protected boolean isEnableMergeChild(IPSModelMergeContext iPSModelMergeContext, String strFieldName) {
Boolean ret = iPSModelMergeContext.isEnableMergeChild(net.ibizsys.model.app.PSSubAppRefImpl.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_GETALLPSAPPDEUIACTIONGROUPS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.app.dataentity.IPSAppDEUIActionGroup.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETALLPSAPPDEUIACTIONGROUPS);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETALLPSAPPVIEWS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.app.view.IPSAppView.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETALLPSAPPVIEWS);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETALLPSDEDRCONTROLS)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.control.IPSControl.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.merge(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETALLPSDEDRCONTROLS);
}
}
if(isEnableMergeChild(iPSModelMergeContext, ATTR_GETPSAPPMENUMODEL)){
IPSModelListMerger iPSModelListMerger = iPSModelMergeContext.getPSModelListMerger(net.ibizsys.model.app.appmenu.IPSAppMenuModel.class, true);
if(iPSModelListMerger != null){
iPSModelListMerger.mergeSingle(iPSModelMergeContext, objectNode, mergeObjectNode, ATTR_GETPSAPPMENUMODEL);
}
}
super.onMerge(iPSModelMergeContext, objectNode, mergeObjectNode);
}
}