Examples of TenancyValues


Examples of com.exedosoft.safe.TenancyValues

    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) {
View Full Code Here

Examples of com.exedosoft.safe.TenancyValues

    Transaction t = insertInstallRecord.currentTransaction();
    t.begin();

    try {
      TenancyValues tv = (TenancyValues) DOGlobals.getInstance()
          .getSessoinContext().getTenancyValues();
     
      if(tv.getTenant().getUid().equals(appShare.getValue("auth_tenant_id"))){
        this.setEchoValue(I18n.instance().get("应用已经存在!"));

        return this.NO_FORWARD;
      }

      Map paras = new HashMap();
      paras.put("use_tenant_id", tv.getTenant().getUid());
      paras.put("use_tenant_name", tv.getTenant().getValue("l10n"));
      insertInstallRecord.invokeUpdate(paras);

      URL url = DODataSource.class.getResource("/globals.xml");
      String s = url.getPath();
      String s2 = s;
View Full Code Here

Examples of com.exedosoft.safe.TenancyValues

    // /globals 放到session中

    // //需要更改多租户表中,租户数据库中的数据源
    // ////每个租户为定位到某个物理数据库中
    // ///租户数据库分配
    TenancyValues tv = new TenancyValues(dds, tenant);

    tv.setDataDDS(dataDds);
    DOGlobals.getInstance().getSessoinContext().setTenancyValues(tv);

    /**
     * 查找账号
     */
 
View Full Code Here

Examples of com.exedosoft.safe.TenancyValues

    // /globals 放到session中

    // //需要更改多租户表中,租户数据库中的数据源
    // ////每个租户为定位到某个物理数据库中
    // ///租户数据库分配
    TenancyValues tv = new TenancyValues(dds, tenant);

    tv.setDataDDS(dataDds);
    DOGlobals.getInstance().getSessoinContext().setTenancyValues(tv);

    /**
     * 查找账号
     */
 
View Full Code Here

Examples of com.exedosoft.safe.TenancyValues

  public static void storeAccount(BOInstance<?> paraInstance){

   
    String objuid = paraInstance.getUid();
    String name = paraInstance.getValue("user_code");
    TenancyValues tv = DOGlobals.getInstance().getSessoinContext()
    .getTenancyValues();
    String tenancyId = paraInstance.getValue("tenancyId");
    if(tenancyId==null){
      tenancyId = tv.getTenant().getValue("name");
    }
    String password = paraInstance.getValue("password");
    password = StringUtil.MD5(password);

    String asrole = "0";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.