Package org.uengine.ui.tree.model

Examples of org.uengine.ui.tree.model.Item


   
    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql, new RowMapper() {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
       
        Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint);
       
        if (permission.containsKey(AclManager.PERMISSION_VIEW) ||
            permission.containsKey(AclManager.PERMISSION_INITIATE) ) {
          String parentFolder = rs.getString("parentfolder");
          String name = rs.getString("name");
          String objtype = rs.getString("objtype");
         
          item = new Item();
          item.setId(String.valueOf(defid));
          item.setName(name);
          item.setParent(parentFolder);
          item.setObj(objtype);
        }
        return item;
      }
    });
  }
View Full Code Here


   
    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql, new RowMapper() {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
       
        Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint);
       
        if (permission.containsKey(AclManager.PERMISSION_VIEW) ||
            permission.containsKey(AclManager.PERMISSION_INITIATE) ) {
          String parentFolder = rs.getString("parentfolder");
          String name = rs.getString("name");
          String objtype = rs.getString("objtype");
         
          item = new Item();
          item.setId(String.valueOf(defid));
          item.setName(name);
          item.setParent(parentFolder);
          item.setObj(objtype);
        }
        return item;
      }
    });
  }
View Full Code Here

    String sql = "SELECT defid, parentfolder, name, objtype, prodver FROM bpm_procdef WHERE isdeleted='0'";
   
    return this.jdbcTemplate.query(sql, new RowMapper() {

      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
        String name = rs.getString("name");
        String objtype = rs.getString("objtype");
        String parentFolder = rs.getString("parentfolder");
       
        item = new Item();
        item.setId(String.valueOf(defid));
        item.setName(name);
        item.setParent(parentFolder);
        item.setObj(objtype);
       
        return item;
      }
     
    });
View Full Code Here

   
    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql, new RowMapper() {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
        Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint, true);
       
        if (permission.containsKey(AclManager.PERMISSION_MANAGEMENT) || permission.containsKey(cPermission)) {
          String name = rs.getString("name");
          String objtype = rs.getString("objtype");
          String parentFolder = rs.getString("parentfolder");
         
          item = new Item();
          item.setId(String.valueOf(defid));
          item.setName(name);
          item.setParent(parentFolder);
          item.setObj(objtype);

          Character[] permissions = null;
          if (permission.size() > 0)
            permissions = (Character[]) permission.keySet().toArray(new Character[permission.size()]);
          item.setAuthority(permissions);
        }
        return item;
      }
    });
  }
View Full Code Here

   
    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql.toString(), new RowMapper() {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
        //Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint);
        Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint, comCode, rs.getString("parentfolder"));
       
        if (permission.containsKey(AclManager.PERMISSION_MANAGEMENT) || permission.containsKey(cPermission)) {
          String name = rs.getString("name");
          String objtype = rs.getString("objtype");
          String parentFolder = rs.getString("parentfolder");
         
          item = new Item();
          item.setId(String.valueOf(defid));
          item.setName(name);
          item.setParent(parentFolder);
          item.setObj(objtype);

          Character[] permissions = null;
          if (permission.size() > 0)
            permissions = (Character[]) permission.keySet().toArray(new Character[permission.size()]);
          item.setAuthority(permissions);
        }
        return item;
      }
    });
  }
View Full Code Here

    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql,
        new RowMapper() {
          public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
            Item item = null;
           
            int defid = rs.getInt("defid");
           
            Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint);
           
            if (permission.containsKey(AclManager.PERMISSION_INITIATE) ||
                permission.containsKey(AclManager.PERMISSION_VIEW) ||
                permission.containsKey(AclManager.PERMISSION_EDIT)) {
              String name = rs.getString("name");
              String objtype = rs.getString("objtype");
              String parentFolder = rs.getString("parentfolder");
             
              item = new Item();
              item.setId(String.valueOf(defid));
              item.setName(name);
              item.setParent(parentFolder);
              item.setObj(objtype);
            }
           
            return item;
          }
        });
View Full Code Here

       .append("   AND  objtype = 'folder'").append("\n")
       .append("   AND  comcode = '").append(comCode).append("'").append("\n");
   
    final List<Item> itemList = this.jdbcTemplate.query(sql.toString(), new RowMapper() {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
        String name = rs.getString("name");
        String objtype = rs.getString("objtype");
        String parentFolder = rs.getString("parentfolder");
       
        item = new Item();
        item.setId(String.valueOf(defid));
        item.setName(name);
        item.setParent(parentFolder);
        item.setObj(objtype);

        return item;
      }
    });
   
View Full Code Here

        return _RESULT_ITEM_LIST;
      }

    public static void find(List<Item> folderItem, String id) {
      String parent = "";
      Item item = null;
     
      for(int i=0; i < folderItem.size(); i++) {
        item = folderItem.get(i);
        if (item.getId().equals(id)) {
          parent = (String)item.getParent();
          break;
        }
      }
     
      for(int i=0; i < folderItem.size(); i++) {
        item = folderItem.get(i);
        if (item.getId().equals(parent)) {
          _RESULT_ITEM_LIST.add(item);
         
          if (item.getParent() != null && !item.getParent().equals("")) {
            find(folderItem, item.getId());
          }
          break;
        }
      }
    }
View Full Code Here

public class FolderListToJSON {
 
  private Collection<Item> makeChildren(Collection<Item> processDefinitionList, String parent, int level) {
    Collection<Item> childProcessDefinitionList = new ArrayList<Item>();

    Item selectItem = new Item();
    selectItem.setId("m" + parent);
    selectItem.setName("move to here");
    selectItem.setObj("select");
    selectItem.setParent(parent);
    processDefinitionList.add(selectItem);
   
    for (Item item : processDefinitionList) {
      if (item != null && item.getParent().equals(parent)) {
        childProcessDefinitionList.add(item);
View Full Code Here

        this.sb.append(padding + "\t" + "<ul>" + "\r\n");
      }
     
      Object[] items = processDefinitionList.toArray();
      for (int i = 0; i < items.length; i++) {
        Item item = (Item) items[i];
       
        if (i == items.length - 1 && level > 1) {
          this.sb.append(padding + "\t" + "<li style=\"background: url('../images/Common/L3-bottom.gif') left top no-repeat;\">" + "\r\n");
        } else {
          this.sb.append(padding + "\t" + "<li>" + "\r\n");
        }
       
        if ("process".equals(item.getObj())) {
          this.sb.append(padding + "\t\t");
          this.sb.append("<a href=\"javascript:viewObjectType(").append(item.getId()).append(");\">" + "\r\n");
          this.sb.append("<img src=\"../images/Common/obj_icon_process.gif\" alt=\"\" width=\"18\" height=\"15\" style=\" vertical-align:middle; padding-right:5px;\" />");
          this.sb.append(item.getName() + "</a>" + "\r\n");
        } else {
          this.sb.append(padding + "\t\t" + "<a>" + item.getName() + "</a>" + "\r\n");
        }

        makeChildrenElement(item.getChildren(), level + 1);
       
        this.sb.append(padding + "\t" + "</li>" + "\r\n");
      }
      this.sb.append(padding + "\t" + "</ul>" + "\r\n");
    }
View Full Code Here

TOP

Related Classes of org.uengine.ui.tree.model.Item

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.