Examples of BODepartment


Examples of com.zycus.dotproject.bo.BODepartment

  }

  private String getAllDepartmentsAndChildDepartmentsForUserAsString(StringBuilder stringBuilder, Set<BODepartment> departmentsOwned, int counter) {

    for (Iterator departmentsOwnedIterator = departmentsOwned.iterator(); departmentsOwnedIterator.hasNext();) {
      BODepartment currentDepartment = (BODepartment) departmentsOwnedIterator.next();
      if (counter == 0) {
        stringBuilder.append(currentDepartment.getDepartmentID());
      } else {
        stringBuilder.append(", " + currentDepartment.getDepartmentID());
      }

      counter++;

      if (currentDepartment.getChildDepartments() != null) {
        getAllDepartmentsAndChildDepartmentsForUserAsString(stringBuilder, currentDepartment.getChildDepartments(), counter);
      }
    }

    return stringBuilder.toString();
  }
View Full Code Here

Examples of com.zycus.dotproject.bo.BODepartment

      return false;
    }
  }

  public boolean isDepartmentOrparentDepartmentOwner(BOUser user, BOProject project) {
    BODepartment projectDepartment = null;
    if (project.getProjectDepartments() != null && project.getProjectDepartments().size() > 0) {
      projectDepartment = project.getProjectDepartments().iterator().next();

      Set<BODepartment> departmentsOwned = user.getDepartmentsOwned();
View Full Code Here

Examples of com.zycus.dotproject.bo.BODepartment

  private boolean containsDepartment(BODepartment projectDepartment, Set<BODepartment> departmentsOwned) {
    if (departmentsOwned.contains(projectDepartment)) {
      return true;
    } else {
      for (Iterator depOwnedIterator = departmentsOwned.iterator(); depOwnedIterator.hasNext();) {
        BODepartment currOwnedDep = (BODepartment) depOwnedIterator.next();

        Set<BODepartment> childDep = currOwnedDep.getChildDepartments();
        containsDepartment(projectDepartment, childDep);
      }
    }

    return false;
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.