Package com.exedosoft.plat.bo

Examples of com.exedosoft.plat.bo.DOBO


  private void authMenu(String parterUid) {
    List allAuthMenus = SessionParterFactory.getSessionParter()
        .getMenuAuthConfigByAccount(parterUid);

    DOBO boUser = OrgParter.getDefaultEmployee().getDoBO();
    BOInstance user = boUser.getInstance(parterUid);

    System.out.println("Enter:::::::::::::DOAuthUserSave");

    if (user == null) {
      System.out.println("User is null!!!!!!!!!");
View Full Code Here


        .getValueArray("checkinstance_hidden");
    // ////////////////清楚缓存

    // ///////////界面对应的业务对象即使需要刷新的业务对象

    DOBO refreshBO = null;

    try {
      DOFormModel buttonForm = null;

      String invokeButtonID = this.actionForm.getValue("invokeButtonUid");
      if (invokeButtonID != null && !"".equals(invokeButtonID.trim())) {// ////////////首先根据启发按钮获取
        buttonForm = DOFormModel.getFormModelByID(invokeButtonID);
      }
      if (buttonForm != null
          && buttonForm.getTargetGridModels().size() <= 1) {
        if (buttonForm.getGridModel().getService() != null) {
          refreshBO = buttonForm.getGridModel().getService().getBo();
        }
      }

    } catch (Exception e) {
      e.printStackTrace();
    }

    if (refreshBO == null) {
      refreshBO = this.service.getBo();
      log.info("No InvokeButton's ID transed and refresh BO'name ::=="
          + refreshBO.getName());
    }

    Connection con = null;

    try {
      con = this.service.getBo().getDataBase().getContextConnection();
      log.info("Current SQL:" + this.service.getTempSql());
      PreparedStatement pstmt = con.prepareStatement(this.service
          .getTempSql());

      int batchSize = 0;

      for (int len = 0; len < key_hiddens.length; len++) {

        String keyHidden = key_hiddens[len];
        if (!listKeys.contains(keyHidden)) {
          continue;
        }
        log
            .info("Select Data's ID::::::::::::::::::::::::"
                + keyHidden);

        BOInstance oldInstance = refreshBO.refreshContext(keyHidden);
        String newKeyValue = null;

        int i = 1;
        for (Iterator it = this.service.retrieveParaServiceLinks()
            .iterator(); it.hasNext();) {
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public String excute() throws ExedoException {

    DOBO ptNI = DOBO.getDOBOByName("do_wfi_processinstance");
    BOInstance curPt = ptNI.getCorrInstance();
    BOInstance echo = new BOInstance();

    ProcessInstance pi = ProcessInstance.getProcessInstance(curPt.getUid());

    if (curPt == null || pi == null) {
View Full Code Here

  }

  private void baseAuth(String parterUid, List allAuthMenus, String strKey,
      int type,String whereDOBO) {

    DOBO boRole = OrgParter.getDefaultRole().getDoBO();
    BOInstance role = boRole.getInstance(parterUid);

    if (role == null) {
      System.out.println("User is null!!!!!!!!!");
      return;
    }
View Full Code Here

  private static final long serialVersionUID = 7566742608663452803L;

  @Override
  public String excute() throws ExedoException {

    DOBO ptPI = DOBO.getDOBOByName("do_wfi_processinstance");//do.wfi.processinstance
    System.out.println("ptPI=========" +  ptPI.getCorrInstance());
   
    if (ptPI.getCorrInstance() == null) {
      this.setEchoValue(I18n.instance().get("当前工作流上下文丢失,请重新操作!"));
      return null;
    }
   
    WFEngine  engine = WFEngineFactory.getWFEngine();
   
    ProcessInstance pi = null;
    try {
      pi = engine.loadProcessInstance(ptPI.getCorrInstance().getUid());
    } catch (WFException e2) {
      // TODO Auto-generated catch block
      e2.printStackTrace();
    }
   
View Full Code Here

   *
   */
  private static final long serialVersionUID = -6384956483993324561L;

  public String excute() {
    DOBO ptNI = DOBO.getDOBOByName("do_wfi_nodeinstance");
    if (ptNI.getCorrInstance() == null) {
      this.setEchoValue(I18n.instance().get("当前工作流上下文丢失,请重新操作!"));
      return null;
    }
    NodeInstance ni = NodeInstance.getNodeInstanceByID(ptNI
        .getCorrInstance().getUid());
    WFUtil.refreshWFPara(ni.getProcessInstance());

    try {
      this.service.invokeUpdate();
View Full Code Here

    // TODO Auto-generated constructor stub
  }
 
  public static void refreshWFPara(ProcessInstance pi) {
 
      DOBO piBO = DOBO.getDOBOByName("do_wfi_processinstance");
      piBO.refreshContext(pi.getObjUid());
      DOBO busiBO = pi.getProcessTemplate().getDoBO();
      if (busiBO != null) {
        if (busiBO != null) {
          busiBO.refreshContext(pi.getInstanceUid());
        }
      }
 
      DOBO busiBO2 = pi.getProcessTemplate().getDoBO2();
      if (busiBO2 != null) {
        if (busiBO2 != null) {
          busiBO2.refreshContext(pi.getInstanceUid2());
        }
      }
 
      DOBO busiBO3 = pi.getProcessTemplate().getDoBO3();
      if (busiBO3 != null) {
        if (busiBO3 != null) {
          busiBO3.refreshContext(pi.getInstanceUid3());
        }
      }
    }
View Full Code Here

  private static final long serialVersionUID = -7966629819816418584L;

  public String excute() {
   
    DOBO ptNI = DOBO.getDOBOByName("do_wfi_nodeinstance");
   
    if(ptNI.getCorrInstance()==null){
     
      this.setEchoValue(I18n.instance().get("当前工作流上下文丢失,请重新操作!"));
      return null;
    }
    NodeInstance ni = NodeInstance.getNodeInstanceByID(ptNI.getCorrInstance().getUid());
    WFUtil.refreshWFPara(ni.getProcessInstance());
   
    try {
      ni.perform();
    } catch (WFException e) {
View Full Code Here

   
  //  jit();
 
   
    /////////////////初始化全局参数,其实应该放入DOGlobals 里面作为全局变量,但是平台还不直接支持全局变量,只能先这样
    DOBO doGlobals = DOBO.getDOBOByName("do.globals");
    if(doGlobals!=null){
      doGlobals.refreshContext("000000");
    }

    //100000
   
    return 5;
View Full Code Here

   * @param response
   */
  public static void outStream(String bouid, String thisuuid, String name,
      String rename, String downLoadSizeCol, HttpServletResponse response) {

    DOBO bo = DOBO.getDOBOByID(bouid);
    BOInstance instance = bo.getInstance(thisuuid);
    String renameValue = "attachment";
    if (rename != null) {
      renameValue = instance.getValue(rename);
      try {
        renameValue = URLEncoder.encode(renameValue, "UTF-8");
      } catch (UnsupportedEncodingException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
   
    response.addHeader("Content-Disposition", "attachment;filename="
        + renameValue);
    StringBuffer sql = new StringBuffer("select ");
    sql.append(name);
    sql.append(" from ").append(bo.getSqlStr()).append(" where ").append(
        bo.getKeyCol()).append(" = ?");
    log.info("The get blob sql is " + sql);
    Connection con = null;
    OutputStream output = null;
    InputStream is = null;
    try {
      con = bo.getDataBase().getContextConnection();
      PreparedStatement pstmt = con.prepareStatement(sql.toString());
      pstmt.setString(1, thisuuid);
      ResultSet rset = pstmt.executeQuery();
      Blob blob = null;
      if (rset.next()) {
        blob = (Blob) rset.getBlob(1);
      }
      output = response.getOutputStream();
      is = blob.getBinaryStream();
      byte[] b = new byte[1024];
      int i = 0;
      while ((i = is.read(b)) > 0) {
        output.write(b, 0, i);
      }
      output.flush();
    } catch (Exception ex1) {
      log.error(ex1);
    } finally {
      try {
        bo.getDataBase().ifCloseConnection(con);
        if (is != null) {
          is.close();
          is = null;
        }
        if (output != null) {
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.