Examples of CatalogBean


Examples of com.liusoft.dlog4j.beans.CatalogBean

      if (site == null) {
        msgs.add("log", new ActionMessage("error.site_not_available"));
        break;
      }
      boolean catalog_can_access = false;
      CatalogBean catalog = null;
      // վ�����Է���վ�ڵ��κη���
      if (site.isOwner(loginUser)) {
        catalog = CatalogDAO.getCatalogByID(log.getCatalogId());
        if (catalog!=null && catalog.getSite().getId() == site.getId())
          catalog_can_access = true;
      } else {
        // �г��û��ڸ�վ��ɷ��ʵ��ռǷ���
        List catalogs = CatalogDAO.listCatalogs(site, loginUser, true);
        for (int i = 0; catalogs != null && i < catalogs.size(); i++) {
          CatalogBean t_catalog = (CatalogBean) catalogs.get(i);
          if (t_catalog.getId() == log.getCatalogId()) {
            catalog = t_catalog;
            catalog_can_access = true;
            break;
          }
        }
View Full Code Here

Examples of com.liusoft.dlog4j.beans.CatalogBean

        catalog_can_access = true;
      } else {
        // �г��û��ڸ�վ��ɷ��ʵ��ռǷ���
        List catalogs = CatalogDAO.listCatalogs(site, loginUser, true);
        for (int i = 0; catalogs != null && i < catalogs.size(); i++) {
          CatalogBean t_catalog = (CatalogBean) catalogs.get(i);
          if (t_catalog.getId() == log.getCatalogId()) {
            catalog_can_access = true;
            break;
          }
        }
      }
View Full Code Here

Examples of com.liusoft.dlog4j.beans.CatalogBean

      if (site == null) {
        msgs.add("log", new ActionMessage("error.site_not_available"));
        break;
      }
      boolean catalog_can_access = false;
      CatalogBean catalog = null;
      // վ�����Է���վ�ڵ��κη���
      if (site.isOwner(loginUser)) {
        catalog = CatalogDAO.getCatalogByID(log.getCatalogId());
        if (catalog.getSite().getId() == site.getId())
          catalog_can_access = true;
      } else {
        // �г��û��ڸ�վ��ɷ��ʵ��ռǷ���
        List catalogs = CatalogDAO.listCatalogs(site, loginUser, true);
        for (int i = 0; catalogs != null && i < catalogs.size(); i++) {
          CatalogBean t_catalog = (CatalogBean) catalogs.get(i);
          if (t_catalog.getId() == log.getCatalogId()) {
            catalog = t_catalog;
            catalog_can_access = true;
            break;
          }
        }
View Full Code Here

Examples of com.liusoft.dlog4j.beans.CatalogBean

      if (site == null) {
        msgs.add("log", new ActionMessage("error.site_not_available"));
        break;
      }
      boolean catalog_can_access = false;
      CatalogBean catalog = null;
      // վ�����Է���վ�ڵ��κη���
      if (site.isOwner(loginUser)) {
        catalog = CatalogDAO.getCatalogByID(log.getCatalogId());
        if (catalog.getSite().getId() == site.getId())
          catalog_can_access = true;
      } else {
        // �г��û��ڸ�վ��ɷ��ʵ��ռǷ���
        List catalogs = CatalogDAO.listCatalogs(site, loginUser, true);
        for (int i = 0; catalogs != null && i < catalogs.size(); i++) {
          CatalogBean t_catalog = (CatalogBean) catalogs.get(i);
          if (t_catalog.getId() == log.getCatalogId()
              && t_catalog.getSite().getId() == site.getId()) {
            catalog = t_catalog;
            catalog_can_access = true;
            break;
          }
        }
View Full Code Here

Examples of com.liusoft.dlog4j.beans.CatalogBean

    Query q = old_ssn.createQuery("FROM CatalogForm c ORDER BY c.id ASC");
    List catalogs = q.list();
   
    for(int i=0;i<catalogs.size();i++){
      CatalogForm cform = (CatalogForm)catalogs.get(i);
      CatalogBean cbean = new CatalogBean();
      cbean.setSite(site);
      cbean.setCreateTime(new Date());
      cbean.setDetail(cform.getDetail());
      cbean.setName(cform.getName());
      cbean.setArticleCount(0);
      cbean.setSortOrder(cform.getOrder());
      if(cform.getType()==CatalogForm.TYPE_OWNER)
        cbean.setType(CatalogBean.TYPE_OWNER);
      else
        cbean.setType(CatalogBean.TYPE_GENERAL);
      new_ssn.save(cbean);
      catalogids.put(new Integer(cform.getId()), cbean)
      System.out.println("Catalog: " + cform.getId() + " -> " + cbean.getId());
    }
  }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.bean.CatalogBean

  }
 
  @GET
  @Path("catalog")
  public CatalogBean getWidgetCatalog() {
    CatalogBean result;
    try {
      result = WidgetStore.getCatalog();
    } catch (IllegalAccessException e) {
      throw new WebApplicationException(Response.status(Response.Status.INTERNAL_SERVER_ERROR)
          .entity("No catalog exists.").build());
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.bean.CatalogBean

  public static void cacheWidgets() throws IllegalAccessException {
    StringBuilder widgetPath = new StringBuilder();
    widgetPath.append(hiccPath);
    Path widgetFiles = new Path(widgetPath.toString());
    FileSystem fs;
    catalog = new CatalogBean();
    catalog.setId("root");
    catalog.setLabel("root");
    try {
      fs = FileSystem.get(config);
      FileStatus[] fstatus = fs.listStatus(widgetFiles);
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.bean.CatalogBean

  public static void cacheWidgets() throws IllegalAccessException {
    StringBuilder widgetPath = new StringBuilder();
    widgetPath.append(hiccPath);
    Path widgetFiles = new Path(widgetPath.toString());
    FileSystem fs;
    catalog = new CatalogBean();
    catalog.setId("root");
    catalog.setLabel("root");
    try {
      fs = FileSystem.get(config);
      FileStatus[] fstatus = fs.listStatus(widgetFiles);
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.bean.CatalogBean

  public static void cacheWidgets() throws IllegalAccessException {
    StringBuilder widgetPath = new StringBuilder();
    widgetPath.append(hiccPath);
    Path widgetFiles = new Path(widgetPath.toString());
    FileSystem fs;
    catalog = new CatalogBean();
    catalog.setId("root");
    catalog.setLabel("root");
    try {
      fs = FileSystem.get(config);
      FileStatus[] fstatus = fs.listStatus(widgetFiles);
View Full Code Here

Examples of test.CatalogBean

   
    int i = 0;
    for (Catalog cInd : c) {

      CatalogBean v = new CatalogBean();
      v.setId(String.valueOf(i++));
      v.setC(cInd);
      v.setSelected(false);
      catalog.add(v);

    }

    em.getTransaction().commit();
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.