Package com.exedosoft.plat.bo

Examples of com.exedosoft.plat.bo.DOBO


              if (aNode instanceof Element) {
                String aJson = ((Element) aNode).getTextTrim();
                BOInstance biApp = BOInstance
                    .fromJSONString(aJson);

                DOBO boApp = DOBO
                    .getDOBOByName("do_application");
                BOInstance exists = boApp.getInstance(biApp
                    .getValue("objuid"));
                if (exists != null) {
                  log.info("待导入的工程已经存在,请删除后再导入!" + exists);
                  this.setEchoValue(I18n.instance().get(
                      "待导入的工程已经存在,请删除后再导入!"));
                  return false;
                }
                appInsert.invokeUpdate(biApp);
                isApp = true;
              }

            }

          } else if (elem.getName().equals("package")) {
            insertANode(packageInsert, aNode, curTenancy);
          } else if (elem.getName().equals("bo")) {

            for (Iterator itlii = elem.iterator(); itlii.hasNext();) {
              Node aLi = (Node) itlii.next();

              if (aNode instanceof Element) {
                String aJson = ((Element) aNode).getTextTrim();
                BOInstance bi = BOInstance
                    .fromJSONString(aJson);

                DOBO bo = DOBO.getDOBOByName("do_bo");
                BOInstance exists = bo.getInstance(bi
                    .getValue("objuid"));
                if (exists != null) {
                  log.info("待导入的业务对象已经存在,请删除后再导入!" + exists);
                  this.setEchoValue(I18n.instance().get(
                      "待导入的业务对象已经存在,请删除后再导入!"));
View Full Code Here


  public String excute() {
   
    //DOService DO_BusiPackage_deletebyapplicationuid = DOService.getService("DO_BusiPackage_deletebyapplicationuid");
   
    DOBO bo = DOBO.getDOBOByName("DO_BO");
    BOInstance instance = bo.getCorrInstance();
   
    removeBO(instance);
 
    return DEFAULT_FORWARD;
  }
View Full Code Here

   * Save 的情况,所以Parameter 取值时不考虑auto_condition(查询) 的情况
   */

  public String excute() {
   
    DOBO bo = DOBO.getDOBOByName("do_application");
    String applicationUid = bo.getCorrInstance().getUid();
    if(applicationUid==null){
      this.setEchoValue(I18n.instance().get("没有找到需要初始化的应用!"));
      return NO_FORWARD;
    }

View Full Code Here

      this.setEchoValue(I18n.instance().get("未配置SQL 语句"));
      return NO_FORWARD;
    }

    StringBuilder sb = new StringBuilder("<export>");
    DOBO bo = DOBO.getDOBOByName("do_application");
    BOInstance selectApp = bo.getCorrInstance();
   
    DOService findShare = DOService.getService("multi_appshare_findbyshareappid");
    List findApps = findShare.invokeSelect(selectApp.getUid());
    if(findApps!=null && findApps.size() >0 ){
      this.setEchoValue(I18n.instance().get("分享的应用必须原创APP,该应用已经分享到AppShare,不能重复分享!"));
      return NO_FORWARD;
    }

    sb.append("<app>").append(selectApp.toJSONString()).append("</app>\n");

    DOService findBP = DOService
        .getService("DO_BusiPackage_byapplicationuid");

    DOService findBO = DOService.getService("DO_BO_FindByBPUid_Form");

    Transaction t = findBP.currentTransaction();
    List<String> allIDs = new ArrayList<String>();
    DOExport export = new DOExport();
    try {
      t.begin();
      List bps = appendJSONS(sb, "package", findBP);
      // 服务下面的参数

      DOBO aBO = DOBO.getDOBOByName("do_bo");
      for (Iterator itBp = bps.iterator(); itBp.hasNext();) {
        BOInstance biBP = (BOInstance) itBp.next();
        List bos = findBO.invokeSelect(biBP.getUid());
        for (Iterator itBO = bos.iterator(); itBO.hasNext();) {
          BOInstance biBO = (BOInstance) itBO.next();
          aBO.refreshContext(biBO.getUid());
          export.exportBO(sb, biBO);
        }
      }
      t.end();
    } catch (Exception e) {
View Full Code Here

  @Override
  public String excute() throws ExedoException {


    StringBuilder sb = new StringBuilder("<export>");
    DOBO bo = DOBO.getDOBOByName("DO_ActionConfig");

    BOInstance biController = bo.getCorrInstance();
    if (biController != null) {
      DOService pm = DOService.getService(biController.getUid());
      sb.append("\n<action><li>").append(StringUtil.filter(biController.toJSONString())).append(
          "</li></action>");
    }
View Full Code Here

  private static final long serialVersionUID = 4555077593344493040L;

  @Override
  public String excute() throws ExedoException {
   
    DOBO bo = DOBO.getDOBOByName("do_bo");
    BOInstance instance = bo.getCorrInstance();
    if(instance==null){
      this.setEchoValue(I18n.instance().get("没有数据!"));
      return NO_FORWARD;
    }
   
    String colName =  this.actionForm.getValue("col_name");
    String dobouid = this.actionForm.getValue("bouid");
   
    if(colName==null && dobouid ==null){
      this.setEchoValue(I18n.instance().get("字段名称或者类型没有定义!"));
      return NO_FORWARD;
    }
   
    DOBO linkBO = DOBO.getDOBOByID(dobouid);
   
    PropertyManager pm = new PropertyManager();
    pm.buildRelation(colName, linkBO);

    return DEFAULT_FORWARD;
View Full Code Here

   */
  private static final long serialVersionUID = 1L;

  public String excute() {

    DOBO bo = DOBO.getDOBOByName("do_datasource");
    DODataSource dss = DODataSource.getDataSourceByL10n(bo
        .getCorrInstance().getValue("l10n"));
   
    String fileName = null;
   
    URL url = DOGlobals.class.getResource("/globals.xml");
View Full Code Here

    changeDataSource("t_expense",dss);
  }

  private void changeDataSource(String boName, DODataSource dss) {
   
    DOBO boDept = DOBO.getDOBOByName(boName);
    boDept.setDataBase(dss);
    try {
      DAOUtil.INSTANCE().store(boDept);
    } catch (ExedoException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

    }

    Transaction t = this.service.currentTransaction();
    try {
      t.begin();
      DOBO boPane = DOBO.getDOBOByName("do_ui_panemodel");
      DOBO boGrid = DOBO.getDOBOByName("do_ui_gridmodel");
      DOBO boForm = DOBO.getDOBOByName("do_ui_formmodel");
      DOBO boFormLink = DOBO.getDOBOByName("DO_UI_FormLinks");
      DOBO boFormTarget = DOBO.getDOBOByName("DO_UI_FormTargets");

      // /还要复制子面板连接(子面板内部不复制)
      BOInstance biPane = boPane.getCorrInstance();
      DOPaneModel pm = DOPaneModel.getPaneModelByID(biPane.getUid());

      DOGridModel gm = pm.getGridModel();
      // //如果连接的是表格:::::暂时只实现这个
      if (gm != null) {

        // /////保存GridModel
        BOInstance biGrid = boGrid.getInstance(gm.getObjUid());
        biGrid.putValue("objuid", null);
        biGrid.putValue("name", biGrid.getValue("name") + "_copy");
        biGrid.putValue("l10n", biGrid.getValue("l10n") + "_copy");
        BOInstance newBiGrid = boGrid.getDInsertService().invokeUpdate(
            biGrid);

        // //保存GridModel

        // /保存面板
        biPane.putValue("objuid", null);
        biPane.putValue("name", biPane.getValue("name") + "_copy");
        biPane.putValue("l10n", biPane.getValue("l10n") + "_copy");
        biPane.putValue("linkuid", newBiGrid.getUid());       
        boPane.getDInsertService().invokeUpdate(biPane);
        // /保存面板

        List<DOFormModel> fms = gm.getAllGridFormLinks();
        Map<DOFormModel,BOInstance> map = new HashMap<DOFormModel,BOInstance>();
        for (Iterator<DOFormModel> it = fms.iterator(); it.hasNext();) {
          DOFormModel aFm = it.next();
          // ///保存FormModel
          BOInstance biForm = boForm.getInstance(aFm.getObjUid());
          biForm.putValue("objuid", null);
          biForm.putValue("gridModelUid", newBiGrid.getUid());
         
          DOService fmInsert = boForm.getDInsertService();
         
          if("en".equals(DOGlobals.getValue("lang.local"))){
            fmInsert = DOService.getService("DO_UI_FormModel_Insert_EN");
          }
         
          BOInstance newBiForm = fmInsert.invokeUpdate(biForm);
         
          map.put(aFm, newBiForm);
          // //保存FormModel
          for(Iterator<DOFormTarget> itTargetGrid = aFm.getTargetGridModels().iterator();itTargetGrid.hasNext(); ){
            DOFormTarget aFt = itTargetGrid.next();
            BOInstance biFt = boFormTarget.getInstance(aFt.getObjUid());
            biFt.putValue("objuid", null);
            biFt.putValue("formUid", newBiForm.getUid());
            boFormTarget.getDInsertService().invokeUpdate(biFt);           
          }
        }

        /////linkForms 需要单独处理
        for (Iterator<DOFormModel> it = fms.iterator(); it.hasNext();) {
View Full Code Here

    if ("true".equals(DOGlobals.getValue("multi.tenancy"))) {
      dss = DOGlobals.getInstance().getSessoinContext()
          .getTenancyValues().getDataDDS();
    } else {// 单租户情况

      DOBO bo = DOBO.getDOBOByName("do_datasource");
      dss = DODataSource.getDataSourceByL10n(bo.getCorrInstance()
          .getValue("l10n"));
    }

    // if(dss.getDriverClass().equals("org.hsqldb.jdbcDriver") &&
    // dss.getDriverUrl().indexOf("jdbc:hsqldb") == -1){
View Full Code Here

TOP

Related Classes of com.exedosoft.plat.bo.DOBO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.