DAOUtil.INSTANCE().store(wf_history,updateBPService);
/**
* 存储应用的根面板
*/
DOPaneModel pmRoot = new DOPaneModel();
pmRoot.setCategory(aBO);
pmRoot.setName("pane_" + project.getName());
pmRoot.setL10n("pane_" + project.getL10n());
pmRoot.setTitle(project.getDescription());
// //////////////ccLayOutPane
pmRoot.setController(contentPane);
DAOUtil.INSTANCE().store(pmRoot);
// ///////业务对象发布为一个应用
project.setDobo(aBO);
DAOUtil.INSTANCE().store(project);
////头部jsp
DOResource rs = new DOResource();
rs.setResourceName("jspheader_" + project.getName());
rs.setResourcePath(project.getName() + "/FormHeader.jsp");
rs.setResourceType(1);
DAOUtil.INSTANCE().store(rs);
/**
* 建立新的头面板
*/
DOPaneModel pmTop = new DOPaneModel();
pmTop.setController(layOutHeader);
pmTop.setLinkType(DOPaneModel.LINKTYPE_RESOURCE);
pmTop.setLinkUID(rs.getObjUid());
pmTop.setLayoutAlign("top");
pmTop.setCategory(aBO);
pmTop.setL10n(project.getL10n() + "_headerPane");
pmTop.setName(project.getName() + "_headerPane");
DAOUtil.INSTANCE().store(pmTop);
/**
* 建立根面板和头面板的关联关系
*/
DOPaneLinks pmTopLink = new DOPaneLinks();
pmTopLink.setParentPane(pmRoot);
pmTopLink.setChildPane(pmTop);
pmTopLink.setOrderNum(new Integer(5));
DAOUtil.INSTANCE().store(pmTopLink, aService);
/**
* 创建下方的面板
*/
DOPaneModel pmBottom = new DOPaneModel();
pmBottom.setCategory(aBO);
pmBottom.setL10n(project.getL10n() + "_mainpane");
pmBottom.setName(project.getName() + "_mainpane");
pmBottom.setController(ccSplitePane);
DAOUtil.INSTANCE().store(pmBottom);
/**
* 建立根面板和工作区域面板的关联
*/
DOPaneLinks pmBottomLink = new DOPaneLinks();
pmBottomLink.setParentPane(pmRoot);
pmBottomLink.setChildPane(pmBottom);
pmBottomLink.setOrderNum(new Integer(10));
DAOUtil.INSTANCE().store(pmBottomLink, aService);
// /左边面板
DOMenuModel dmRoot = new DOMenuModel();
dmRoot.setCategory(aBO);
dmRoot.setController(menuController);
// ////////同名DOMenuModel
dmRoot.setName(project.getName() + "_root");
dmRoot.setL10n("Welcome " + project.getL10n());
DOService storeRootMenu = DOService.getService("DO_UI_MenuModel_Insert_firstlevel");
DAOUtil.INSTANCE().store(dmRoot,storeRootMenu);
////更新菜单获取的sql语句
DOService menuService = DOService.getService("s_menumodel_byName");
menuService.setMainSql("select * from do_ui_menumodel where name = '" + dmRoot.getName() + "'");
DAOUtil.INSTANCE().store(menuService);
DOMenuModel dmBP = new DOMenuModel();
dmBP.setCategory(aBO);
dmBP.setParentMenu(dmRoot);
dmBP.setController(menuController);
// ////////同名DOMenuModel
dmBP.setName(project.getName());
dmBP.setL10n(project.getL10n());
DAOUtil.INSTANCE().store(dmBP);
///////组织权限相关的菜单 初始化到工程根菜单下面
DOMenuModel dmmAuth = DOMenuModel.getMenuModelByName("dorgauth_bp");
dmmAuth.setParentMenu(dmRoot);
DAOUtil.INSTANCE().store(dmmAuth);
///把工作流相关的菜单初始化到工程根菜单下面
DOMenuModel dorgauth_flow_test = DOMenuModel.getMenuModelByName("dorgauth_flow_test");
dorgauth_flow_test .setParentMenu(dmRoot);
DAOUtil.INSTANCE().store(dorgauth_flow_test );
////工作台jsp
rs = new DOResource();
rs.setResourceName("workbenchjsp_" + project.getName());
rs.setResourcePath(project.getName() + "/workbench.jsp");
rs.setResourceType(1);
DAOUtil.INSTANCE().store(rs);
DOPaneModel pmContent = new DOPaneModel();// ///主内容显示区。
pmContent.setCategory(aBO);
pmContent.setName(project.getName() + "_MainContent");
pmContent.setL10n(project.getL10n() + "_MainContent");
pmContent.setController(mainPage);
pmContent.setLinkType(DOPaneModel.LINKTYPE_RESOURCE);
pmContent.setLinkUID(rs.getObjUid());
DAOUtil.INSTANCE().store(pmContent);
DOPaneLinks pmContentLink = new DOPaneLinks();
pmContentLink.setParentPane(pmBottom);// //bottomPane为父亲
pmContentLink.setChildPane(pmContent);
pmContentLink.setOrderNum(new Integer(17));
DAOUtil.INSTANCE().store(pmContentLink, aService);
DOPaneModel pmLeft = new DOPaneModel();
pmLeft.setController(layOutLeft);
pmLeft.setLinkType(DOPaneModel.LINKTYPE_MENU);
pmLeft.setLinkUID(dmRoot.getObjUid());
pmLeft.setCategory(aBO);
pmLeft.setL10n(project.getL10n() + "_leftindex_pane");
pmLeft.setName(project.getName() + "_leftindex_pane");
/**
* 存储Mobile索引菜单的面包
*/
DOPaneModel pmMobile = new DOPaneModel();
pmMobile.setCategory(aBO);
pmMobile.setName( project.getName() + "_mobile_pane");
pmMobile.setL10n(project.getL10n() + "_Mobile");
pmMobile.setTitle(project.getDescription());
pmMobile.setExedoJsp("../mobile/exedo.jsp");
pmMobile.setLinkType(DOPaneModel.LINKTYPE_MENU);
pmMobile.setLinkUID(dmRoot.getObjUid());
// //////////////ccLayOutPane
pmMobile.setController(contentPane);
DAOUtil.INSTANCE().store(pmMobile);
/**
* 保存左边的左边的索引菜单