Package org.libreplan.business.planner.entities

Examples of org.libreplan.business.planner.entities.AssignmentFunction


        return stretchesFunctionModel.getStretchesFunction();
    }

    public void setResourceAllocation(ResourceAllocation<?> resourceAllocation,
            StretchesFunctionTypeEnum type) {
        AssignmentFunction assignmentFunction = resourceAllocation
                .getAssignmentFunction();
        stretchesFunctionModel.init((StretchesFunction) assignmentFunction,
                resourceAllocation, type);
        reloadStretchesListAndCharts();
    }
View Full Code Here


    }

    private void updateAssignmentFunctionListbox() {
        initializeAndAppendFlatFunction(assignmentFunctionListbox);

        AssignmentFunction function = getAssignmentFunction();
        if (function != null) {
            Listitem listitem = new Listitem(_(function.getName()));
            listitem.setDisabled(true);
            assignmentFunctionListbox.appendChild(listitem);
            assignmentFunctionListbox.setSelectedItem(listitem);
        }
    }
View Full Code Here

    public boolean isAssignmentFunctionNotFlat() {
        return getAssignmentFunction() != null;
    }

    public boolean isAssignmentFunctionManual() {
        AssignmentFunction assignmentFunction = getAssignmentFunction();
        return (assignmentFunction != null) && assignmentFunction.isManual();
    }
View Full Code Here

    }

    @Test
    @Transactional
    public void testSaveAssignmentFunction() {
        AssignmentFunction assignmentFunction = createValidAssignmentFunction();
        assignmentFunctionDAO.save(assignmentFunction);
        assertTrue(assignmentFunctionDAO.exists(assignmentFunction.getId()));
    }
View Full Code Here

    @Test
    @Transactional
    public void testRemoveAssignmentFunction()
            throws InstanceNotFoundException {
        AssignmentFunction assignmentFunction = createValidAssignmentFunction();
        assignmentFunctionDAO.save(assignmentFunction);
        assignmentFunctionDAO.remove(assignmentFunction.getId());
        assertFalse(assignmentFunctionDAO.exists(assignmentFunction.getId()));
    }
View Full Code Here

    @Test
    @Transactional
    public void testListAssignmentFunction() {
        int previous = assignmentFunctionDAO.list(AssignmentFunction.class).size();

        AssignmentFunction assignmentFunction1 = createValidAssignmentFunction();
        assignmentFunctionDAO.save(assignmentFunction1);
        AssignmentFunction assignmentFunction2 = createValidAssignmentFunction();
        assignmentFunctionDAO.save(assignmentFunction1);
        assignmentFunctionDAO.save(assignmentFunction2);

        List<AssignmentFunction> list = assignmentFunctionDAO
                .list(AssignmentFunction.class);
View Full Code Here

                                .withPreviousAssociatedResources()
                                .onIntervalWithinTask(
                                        resourceAllocation.getStartDate(),
                                        resourceAllocation.getEndDate())
                                .allocate(value);
                        AssignmentFunction assignmentFunction = resourceAllocation.getAssignmentFunction();
                        if (assignmentFunction != null) {
                            assignmentFunction.applyTo(resourceAllocation);
                        }

                        fireCellChanged();
                        reloadEffortsSameRowForDetailItems();
                        reloadAllEffort();
View Full Code Here

        this.functionName = getAssignmentFunctionName(allocations);
    }

    private String getAssignmentFunctionName(
            List<? extends ResourceAllocation<?>> allocations) {
        AssignmentFunction function = getAssignmentFunction(allocations);
        return (function != null) ? function.getName()
                : AssignmentFunctionName.FLAT.toString();
    }
View Full Code Here

        derivedAllocation.getResources();
        derivedAllocation.getConfigurationUnit().getWorkerAssignments().size();
    }

    private static void forceLoadOfAssignmentFunction(ResourceAllocation<?> each) {
        AssignmentFunction function = each.getAssignmentFunction();
        if ((function != null) && (function instanceof StretchesFunction)) {
            ((StretchesFunction) function).getStretches().size();
        }
    }
View Full Code Here

TOP

Related Classes of org.libreplan.business.planner.entities.AssignmentFunction

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.