Ejemplo n.º 1
0
  private void changeWebManage() {
    WebConfig vo = new WebConfig();
    try {
      int monflag = getParaIntValue("value");
      WebConfigDao configdao = new WebConfigDao();
      try {
        vo = (WebConfig) configdao.findByID(getParaValue("id"));
      } catch (Exception e) {
        e.printStackTrace();
      } finally {
        configdao.close();
      }

      vo.setFlag(monflag);
      configdao = new WebConfigDao();
      try {
        configdao.update(vo);
      } catch (Exception e) {
        e.printStackTrace();
      } finally {
        configdao.close();
      }

      Web web = (Web) PollingEngine.getInstance().getWebByID(vo.getId());
      web.setFlag(monflag);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Ejemplo n.º 2
0
  /**
   * 获取 WEB 列表
   *
   * @return
   */
  public List getWebList() {
    // WEB

    List weblist = null;

    WebConfigDao webConfigDao = new WebConfigDao();
    try {
      weblist = webConfigDao.findByCondition(getWebSql());
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      webConfigDao.close();
    }

    if (weblist == null) {
      weblist = new ArrayList();
    }

    return weblist;
  }