Package net.sourceforge.ganttproject.resource

Examples of net.sourceforge.ganttproject.resource.HumanResourceManager


     *
     * @param mpx
     *            Current MPXFile instance
     */
    private void processResources(MPXFile mpx) {
        HumanResourceManager hrm = (HumanResourceManager) m_project
                .getHumanResourceManager();
        LinkedList resources = mpx.getAllResources();
        Iterator iter = resources.iterator();
        Resource resource;
        HumanResource people;

        while (iter.hasNext() == true) {
            resource = (Resource) iter.next();
            if (resource.getName() != null) {
                people = hrm.newHumanResource();
                people.setName(resource.getName());
                people.setMail(resource.getEmailAddress());
                hrm.add(people);

                m_resourceMap
                        .put(resource.getID(), new Integer(people.getId()));
            }
        }
View Full Code Here


     * @param mpx
     *            Currenct MPXFile instance
     */
    private void processResourceAssignments(MPXFile mpx) {
        TaskManager tm = m_project.getTaskManager();
        HumanResourceManager hrm = (HumanResourceManager) m_project
                .getHumanResourceManager();
        LinkedList assignments = mpx.getAllResourceAssignments();
        Iterator iter = assignments.iterator();
        com.tapsterrock.mpx.ResourceAssignment assignment;
        int gTaskID;
        int gResourceID;
        GanttTask gTask;
        ProjectResource gResource;
        ResourceAssignment gAssignment;

        while (iter.hasNext() == true) {
            assignment = (com.tapsterrock.mpx.ResourceAssignment) iter.next();
            gTaskID = mapTaskNumber(assignment.getTask().getID());
            gResourceID = mapResourceNumber(assignment.getResource().getID());

            if ((gTaskID != -1) && (gResourceID != -1)) {
                gTask = tm.getTask(gTaskID);
                gResource = hrm.getById(gResourceID);

                gAssignment = gTask.getAssignmentCollection().addAssignment(
                        gResource);
                gAssignment.setLoad((float) assignment.getUnitsValue());
                gAssignment.setCoordinator(false);
View Full Code Here

        return result;
    }

    protected void setUp() throws Exception {
        super.setUp();
        myHumanResourceManager = new HumanResourceManager(RoleManager.Access
                .getInstance().getDefaultRole());
        getResourceManager().create("test resource#1", 1);
        getResourceManager().create("test resource#2", 2);
        myTaskManager = newTaskManager();
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        myTimeUnitStack = new GregorianTimeUnitStack();
        myTaskManager = newTaskManager();
        myRoleManager = new RoleManagerImpl();
        myResourceManager = new HumanResourceManager(myRoleManager
                .getDefaultRole());
    }
View Full Code Here

    public ResourceManager getHumanResourceManager() {
        ResourceManager result = (ResourceManager) managerHash
                .get(HUMAN_RESOURCE_MANAGER_ID);
        if (result == null) {
            result = new HumanResourceManager(getRoleManager().getDefaultRole());
            // result.addView(getPeople());
            managerHash.put(HUMAN_RESOURCE_MANAGER_ID, result);
            result.addView(this);
        }
        return result;
View Full Code Here

  private final CustomColumnsManager myTaskCustomColumnManager;
  private final CustomColumnsStorage myTaskCustomColumnStorage;
  private final List myBaselines = new ArrayList();

    public GanttProjectImpl() {
        myResourceManager = new HumanResourceManager(RoleManager.Access.getInstance().getDefaultRole());
        myTaskManagerConfig = new TaskManagerConfigImpl(myResourceManager, GanttLanguage.getInstance());
        myTaskManager = TaskManager.Access.newInstance(null, myTaskManagerConfig);
        myUIConfiguration = new UIConfiguration(Fonts.DEFAULT_MENU_FONT, Fonts.DEFAULT_CHART_FONT, Color.BLUE, true);
        myTaskCustomColumnStorage = new CustomColumnsStorage();
        myTaskCustomColumnManager = new CustomColumnsManager(myTaskCustomColumnStorage);
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.resource.HumanResourceManager

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.