Package org.huihoo.workflow.usermodel

Examples of org.huihoo.workflow.usermodel.WorkflowGroup


    List users = new ArrayList();
    List groupIds = workflowActivity.getPerformers();
    int sizeGroup = groupIds.size();
    for (int i = 0; i < sizeGroup; ++i)
    {
      WorkflowGroup group = (WorkflowGroup) userDatabase.findGroup((String) groupIds.get(i));
      Iterator userInterator = group.getParticipants();
      while (userInterator.hasNext())
      {
        WorkflowParticipant user = (WorkflowParticipant) userInterator.next();
        append2List(users, user);
      }
View Full Code Here


  {
    ArrayList results = new ArrayList();
    Iterator groups = database.getGroups();
    while (groups.hasNext())
    {
      WorkflowGroup group = (WorkflowGroup) groups.next();
      if (group.isInDepartment(this))
      {
        results.add(group);
      }
    }
    return (results.iterator());
View Full Code Here

  public void removeGroups()
  {
    Iterator groups = database.getGroups();
    while (groups.hasNext())
    {
      WorkflowGroup group = (WorkflowGroup) groups.next();
      if (group.isInDepartment(this))
      {
        group.setDepartment(null);
      }
    }
  }
View Full Code Here

   */
  public WorkflowGroup findGroup(String groupid)
  {
    Connection conn = null;
    PreparedStatement pstmt = null;
    WorkflowGroup group = null;

    String strSQL =
      "SELECT  vc_uuid,vc_name,vc_description,vc_parent,vc_departmentid,vc_presidentid FROM "
        + getSchemaContext().getTableName(SchemaContext.SCHEMA_DEPARTMENT)
        + " WHERE vc_uuid=?";
    try
    {
      conn = ConnUtils.getConnection(getStore());
      pstmt = conn.prepareStatement(strSQL);
      pstmt.setString(1, groupid);

      ResultSet rs = pstmt.executeQuery();
      if (rs.next())
      {
        WorkflowGroup parentGroup = null;
        String parentGroup_id = rs.getString("vc_parent");

        if (parentGroup_id != null)
        {
          parentGroup = findGroup(parentGroup_id);
View Full Code Here

      for (int i = 1; i <= sizeUserGroup; ++i)
      {
        jrs.absolute(i);
        String groupid = jrs.getString("vc_groupid");
        String userid = jrs.getString("vc_userid");
        WorkflowGroup workflowGroup = findGroup(groupid);
        WorkflowParticipant workflowUser = findParticipant(userid);
        workflowGroup.addPaticipant(workflowUser);
      }
      jrs.release();

      //---------------------------------------------create user department relation
      strSQL =
View Full Code Here

        int sizeGroup = jrs.getRowCount();
        for (int i = 1; i <= sizeGroup; ++i)
        {
          jrs.absolute(i);
          WorkflowGroup workflowGroup =
          createGroup_impl(
              jrs.getString("vc_uuid"),
              jrs.getString("vc_name"),
              jrs.getString("vc_description"),
              parentGroup);
          workflowGroup.setDepartment(this.findDepartment(jrs.getString("vc_departmentid")))
          workflowGroup.setPresident(this.findParticipant(jrs.getString("vc_presidentid")));   
          groups.put(jrs.getString("vc_uuid"), workflowGroup);
          genGroupTree(groups, workflowGroup);

        }
        jrs.release();
      }
      catch (SQLException sqlex)
      {
        ;
      }

    }
    else
    {
      Connection conn = null;
      PreparedStatement pstmt = null;
      ResultSet rs = null;

      try
      {
        strSQL += " WHERE vc_parent=?";

        conn = ConnUtils.getConnection(getStore());
        pstmt = conn.prepareStatement(strSQL);
        pstmt.setString(1, parentGroup.getName());
        rs = pstmt.executeQuery();
        while (rs.next())
        {
          WorkflowGroup workflowGroup =
            createGroup_impl(
              rs.getString("vc_uuid"),
              rs.getString("vc_name"),
              rs.getString("vc_description"),
              parentGroup);
          workflowGroup.setDepartment(this.findDepartment(rs.getString("vc_departmentid")))
          workflowGroup.setPresident(this.findParticipant(rs.getString("vc_presidentid")))
          groups.put(rs.getString("vc_uuid"), workflowGroup);
          genGroupTree(groups, workflowGroup);
        }
      }
      catch (SQLException ex)
View Full Code Here

     * @param groupname   The group name of the new group
     * @param description The description of this group
     */
  public WorkflowGroup createGroup_impl(String groupid, String groupname, String description)
  {
    WorkflowGroup group = new WorkflowGroupImpl_RT(this, groupid, groupname, description);
    return (group);
  }
View Full Code Here

    String groupid,
    String groupname,
    String description,
    WorkflowGroup parentGroup)
  {
    WorkflowGroup group = new WorkflowGroupImpl_RT(this, groupid, groupname, description, parentGroup);

    return (group);
  }
View Full Code Here

     * @param groupname   The group name of the new group
     * @param description The description of this group
     */
  public WorkflowGroup createGroup(String groupid, String groupname, String description)
  {
    WorkflowGroup group = new WorkflowGroupImpl(this, groupid, groupname, description);
    synchronized (groups)
    {
      groups.put(group.getUUID(), group);
    }
    return (group);
  }
View Full Code Here

    return (group);
  }

  public WorkflowGroup createGroup(String groupid, String groupname, String description, WorkflowGroup parentGroup)
  {
    WorkflowGroup group = new WorkflowGroupImpl(this, groupid, groupname, description, parentGroup);

    synchronized (groups)
    {
      groups.put(group.getUUID(), group);
    }
    return (group);
  }
View Full Code Here

TOP

Related Classes of org.huihoo.workflow.usermodel.WorkflowGroup

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.