Package com.exedosoft.plat.bo

Examples of com.exedosoft.plat.bo.DOService


  public static void main(String[] args) throws SQLException,
      ClassNotFoundException {

   
   
     DOService aService = DOService.getService("t_expense_browse");
     BOInstance bi = aService.getInstance("40288024292af50d01292af8121e0001");
     System.out.println("Data::" + bi);
    
   
   
//    LDAPManager.check();
View Full Code Here


      Document document = saxReader.read(fileName);

      Element rootElement = document.getRootElement();

      DOService appInsert = DOService.getService("DO_Application_Insert");

      DOService packageInsert = DOService
          .getService("DO_BusiPackage_copy");

      DOService doboInsert = DOService.getService("DO_BO_Insert");

      DOService parameterInsert = DOService
          .getService("DO_Parameter_copy");

      DOService propertyInsert = DOService
          .getService("DO_BO_Property_copy");

      DOService doRuleInsert = DOService.getService("DO_Rule_Insert");

      DOService serviceInsert = DOService.getService("DO_Service_copy");

      DOService serviceRuleInsert = DOService
          .getService("DO_Service_Rule_copy");

      DOService paraServiceInsert = DOService
          .getService("DO_Parameter_Service_Copy_Batch");

      DOService paneLinksInsert = DOService
          .getService("DO_UI_PaneLinks_copy");

      DOService formInsert = DOService
          .getService("DO_UI_FormModel_COPY_TO_GRID_EN");

      DOService formTargetInsert = DOService
          .getService("DO_UI_FormTargets_Insert");

      DOService formLinksInsert = DOService
          .getService("DO_UI_FormLinks_Insert");

      DOService gridInsert = DOService
          .getService("DO_UI_GridModel_Insert");

      DOService paneModelInsert = DOService
          .getService("DO_UI_PaneModel_copy");

      DOService treeModelInsert = DOService
          .getService("DO_UI_TreeModel_Insert");

      DOService menuModelInsert = DOService
          .getService("DO_UI_MenuModel_copy");

      DOService controllerInsert = DOService
          .getService("DO_UI_Controller_Insert");

      DOService actionInsert = DOService
          .getService("DO_ActionConfig_Insert");

      String tenancy = null;
      String curTenancy = null;
      String createTableSql = null;
View Full Code Here

 
    return DEFAULT_FORWARD;
  }

  public static  void removeBO(BOInstance instance) {
    DOService deletes = DOService.getService("DO_Parameter_deletebybouid");
    Transaction t = deletes.currentTransaction();
    t.begin();
    try {
      deletes.invokeUpdate(instance.getUid());
     
      deleteRubbish(instance,"DO_BO_Property_deletebybouid");
      deleteRubbish(instance,"DO_Rule_deletebybouid");
      deleteRubbish(instance,"DO_Service_deletebybouid");
      deleteRubbish(instance,"DO_Service_Rule_DeleteRubbish");
View Full Code Here

    }
    t.end();
  }

  private static  void deleteRubbish(BOInstance instance,String serviceName) throws ExedoException {
    DOService deletes = DOService.getService(serviceName);
    deletes.invokeUpdate(instance.getUid());
  }
View Full Code Here

    String path = this.getClass().getResource("/").getPath();
    File current_dir = new File(path);
    //��ȡWEB-INFOĿ¼�ĸ�Ŀ¼
    File root_dir = new File(new File(current_dir.getParent()).getParent() + "/exedo/webv3/template/cms/theme/");
    File[] listDirs = root_dir.listFiles();
    DOService service = DOService .getService("cms_options_list");
    BOInstance bo = new BOInstance();
    List<BOInstance> l = service.invokeSelect(bo);
    String current_theme = "";
    if ( !l.isEmpty()){
      for(BOInstance b : l){
        System.out.println(b.getValue("opt_key"));
        if(b.getValue("opt_key").equals("themes_dir")){
View Full Code Here

    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) {
      t.rollback();
      e.printStackTrace();
    }

    sb.append("</export>");
   
    URL url = DODataSource.class.getResource("/globals.xml");
    String s = url.getPath();
    String s2 = s;
    s = s.substring(0, s2.toLowerCase().indexOf("web-inf"));
   
    TenancyValues tv = (TenancyValues) DOGlobals.getInstance()
    .getSessoinContext().getTenancyValues();

   
    File tenantFile = new File(s + "appshare/" +  tv.getTenant().getValue("name"));
    tenantFile.mkdir();
   
    StringBuffer fileName = new StringBuffer(tenantFile.getAbsolutePath())
    .append("/")
    .append(selectApp.getValue("name"))
    .append(".xml");
    try {
       // TODO GOOGLE IO
//      BufferedWriter out =  null;
      BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
          new FileOutputStream(fileName.toString()), "utf-8"));
      out.append(sb.toString());
      out.flush();
      out.close();
     
      DOService insertAppShare = DOService.getService("multi_appshare_insert");
      Map paras = new HashMap();
      paras.put("xml_path", new StringBuffer(tv.getTenant().getValue("name")).append("/")
          .append(selectApp.getValue("name"))
          .append(".xml").toString());
      paras.put("app_name", selectApp.getValue("l10n"));
      paras.put("app_desc", selectApp.getValue("description"));
      paras.put("share_date", new java.sql.Date(System.currentTimeMillis()));
      paras.put("share_app_id",selectApp.getUid());
      paras.put("auth_tenant_name", tv.getTenant().getValue("l10n"));
      paras.put("auth_tenant_id", tv.getTenant().getUid());
      insertAppShare.invokeUpdate(paras);
    } catch (UnsupportedEncodingException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
View Full Code Here

    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>");
    }
    sb.append("</export>");
    this.setEchoValue(sb.toString());
View Full Code Here

        list = gridModel.getService().invokeSelect(pageNo, pageNum);
      }
    }

    // ///处理第二服务(统计用)
    DOService secondService = gridModel.getSecondService();
    if (secondService != null) {
      List secondResult = secondService.invokeSelect();
      if (secondResult.size() > 0) {
        BOInstance statistics = (BOInstance) secondResult.get(0);
        data.put("statistics", statistics.getMap());
        StringBuilder sb = new StringBuilder();
        List<DOFormModel> listFm = gridModel
View Full Code Here

          // ///保存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();
View Full Code Here

      setEchoValue(I18n.instance().get("没有数据!"));

      return NO_FORWARD;
    }
   
    DOService copyService = this.service;
    if("en".equals(DOGlobals.getValue("lang.local"))){
      copyService = DOService.getService("DO_UI_FormModel_COPY_TO_GRID_EN");
    }
    
   
    Transaction t = copyService.currentTransaction();
    try {
      t.begin();
      DOBO boForm = DOBO.getDOBOByName("do_ui_formmodel");
      DOBO boFormTarget = DOBO.getDOBOByName("DO_UI_FormTargets");
      DOBO boFormLink = DOBO.getDOBOByName("DO_UI_FormLinks");
      for(int i = 0; i < checks.length ; i++){
        BOInstance biForm = boForm.getInstance(checks[i]);
        DOFormModel aFm = DOFormModel.getFormModelByID(biForm.getUid());
       
        biForm.putValue("objuid", null);
        biForm.putValue("gridModelUid", gridModelUid);
        BOInstance newBiForm = copyService.invokeUpdate(biForm);
        // //保存FormModel
        for(Iterator<DOFormTarget> itTargetGrid = aFm.getTargetGridModels().iterator();itTargetGrid.hasNext(); ){
          DOFormTarget aFt = itTargetGrid.next();
          BOInstance biFt = boFormTarget.getInstance(aFt.getObjUid());
          biFt.putValue("objuid", null);
View Full Code Here

TOP

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

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.