Exemplo n.º 1
0
 public Node getNode(String name) {
   Collection nodes = manager.getAllQueries();
   for (Iterator iter = nodes.iterator(); iter.hasNext(); ) {
     Query node = (Query) iter.next();
     if (node.getName().equals(name)) {
       return node;
     }
   }
   return null;
 }
Exemplo n.º 2
0
  public Node getNode(HttpServletRequest req) {
    Query query = new Query();
    int id = getId(req);
    int pid = getParentId(req);
    String name = req.getParameter("name");
    String desc = req.getParameter("description");
    boolean isLeaf = WebUtil.getBooleanParameter(req, "isLeaf", false);

    query.setId(id);
    query.setIsLeaf(isLeaf);
    query.setName(name);
    query.setPid(pid);
    query.setDescription(desc);
    return query;
  }
Exemplo n.º 3
0
 public void updateNode(Object node) throws EntityExistException {
   Query db = (Query) node;
   manager.updateQuery(db.getId(), db.getName(), db.getDescription());
 }
Exemplo n.º 4
0
 public String getNodeName(Node node) {
   Query query = (Query) node;
   return query.getName();
 }
Exemplo n.º 5
0
 public void addNode(Object node) throws EntityExistException {
   Query query = (Query) node;
   manager.addQuery(query.getPid(), query.getName(), query.getDescription(), query.getIsLeaf());
 }
Exemplo n.º 6
0
 public void copyNode(Object node) throws EntityExistException {
   Query query = (Query) node;
   manager.copyQuery(query.getId(), query.getName(), query.getDescription());
 }