示例#1
0
  public AuditPlanForm() {
    master = new DataSourceRMI("AuditPlan");
    master.setUrl("pt.inescporto.siasoft.go.auditor.ejb.session.AuditPlan");

    if (!MenuSingleton.isSupplier()) {
      Vector binds = new Vector();
      binds.add(new TplString(MenuSingleton.getEnterprise()));
      try {
        master.setLinkCondition("fkEnterpriseID = ?", binds);
      } catch (DataSourceException ex) {
      }
    }
    DataSourceRMI dsAuditPlanActions = new DataSourceRMI("AuditPlanActions");
    dsAuditPlanActions.setUrl("pt.inescporto.siasoft.go.auditor.ejb.session.AuditPlanActions");

    DSRelation aaRelation = new DSRelation("AuditPlanAuditPlanActions");
    aaRelation.setMaster(master);
    aaRelation.setDetail(dsAuditPlanActions);
    aaRelation.addKey(new RelationKey("auditPlanID", "auditPlanID"));

    try {
      master.addDataSourceLink(aaRelation);
    } catch (DataSourceException ex) {
      ex.printStackTrace();
    }

    setDataSource(master);

    try {
      jbInit();
    } catch (Exception ex) {
      ex.printStackTrace();
    }
    allHeaders =
        new String[] {
          res.getString("label.code"),
          res.getString("auditPlan.label.scope"),
          res.getString("auditPlan.label.propose"),
          res.getString("auditPlan.label.periodicity"),
          res.getString("auditPlan.label.auditType"),
          res.getString("auditPlan.label.nextAuditDate"),
          res.getString("auditPlanLink.label.enterprise"),
          res.getString("auditPlanLink.label.enterpriseCell"),
          res.getString("auditPlanLink.label.activity")
        };
    start();
  }
示例#2
0
  public SMTPConfigForm() {
    super();

    DataSourceRMI master = new DataSourceRMI("SMTPConfig");
    master.setUrl("pt.inescporto.template.email.ejb.session.SMTPConfig");
    setDataSource(master);

    allHeaders =
        new String[] {res.getString("email.label.hostname"), res.getString("email.label.username")};
    setAccessPermitionIdentifier("SMTP_CONFIG");

    init();
    start();
  }
示例#3
0
  public EnterpriseCellForm() {
    super();

    // define the datasource tree
    DataSourceRMI master = new DataSourceRMI("EnterpriseCell");
    master.setUrl("pt.inescporto.siasoft.go.fun.ejb.session.EnterpriseCell");
    if (!MenuSingleton.isSupplier()) {
      Vector binds = new Vector();
      binds.add(new TplString(MenuSingleton.getEnterprise()));
      try {
        master.setLinkCondition("enterpriseID = ?", binds);
      } catch (DataSourceException ex) {
        ex.printStackTrace();
      }
    }

    // register the master datasource the this form
    setDataSource(master);

    // set the id from permission control
    setAccessPermitionIdentifier("ENTERPRISECELL");

    // headers for the table headers
    allHeaders =
        new String[] {
          res.getString("enterpriseCell.label.enterprise"),
          res.getString("enterpriseCell.label.code"),
          res.getString("enterpriseCell.label.desc"),
          res.getString("enterpriseCell.label.obs"),
          res.getString("enterpriseCell.label.x"),
          res.getString("enterpriseCell.label.y"),
          res.getString("enterpriseCell.label.dx"),
          res.getString("enterpriseCell.label.dy"),
          res.getString("enterpriseCell.label.father")
        };

    init();
    start();
  }