Package org.libreplan.business.resources.entities

Examples of org.libreplan.business.resources.entities.CriterionWithItsType


    private void getCriterionWithItsType(CriterionType type,
            List<Criterion> children) {
        for (Criterion criterion : children) {
            // Create the criterion with its criterionType and its Hierarchy
            // label
            CriterionWithItsType criterionAndType = new CriterionWithItsType(
                    type, criterion);

            // Add to the list
            criterionsWithItsTypes.add(criterionAndType);
            getCriterionWithItsType(type, criterion.getSortedChildren());
View Full Code Here


        for (Entry<ICriterionType<?>, Collection<Criterion>> entry : map
                .entrySet()) {
            this.workCriterions.addAll(entry.getValue());
            for (Criterion criterion : entry.getValue()) {
                this.fromCriterionToType.put(criterion,
                        new CriterionWithItsType(entry.getKey(), criterion));
            }
        }
    }
View Full Code Here

        throw new RuntimeException("Could not find the criterion " + criterion);
    }

    public void saveCriterionSatisfaction() {
        Criterion choosenCriterion = getChoosenCriterion();
        CriterionWithItsType criterionWithItsType = fromCriterionToType
                .get(choosenCriterion);
        satisfactionEdited.setCriterion(choosenCriterion);
        AddingSatisfactionResult addSatisfaction = workerModel.addSatisfaction(
                criterionWithItsType.getType(), originalSatisfaction,
                satisfactionEdited);
        switch (addSatisfaction) {
        case OK:
            messagesForUser.showMessage(Level.INFO, _("Time period saved"));
            this.workerCRUDController.goToEditForm();
View Full Code Here

    }

    public void selectCriterionAndType(Listitem item, Bandbox bandbox,
        CriterionSatisfactionDTO criterionSatisfactionDTO){
        if(item != null){
            CriterionWithItsType criterionAndType = (CriterionWithItsType)item.getValue();
            bandbox.setValue(criterionAndType.getNameAndType());
            setCriterionWithItsType(criterionAndType,criterionSatisfactionDTO,bandbox);
        } else {
            bandbox.setValue("");
        }
    }
View Full Code Here

        criterionWithItsTypes = new ArrayList<CriterionWithItsType>();
        for(CriterionType type : getTypes()){
            if (type.isEnabled()) {
                for (Criterion criterion : getModel().getCriterionsFor(type)) {
                    if(criterion.isActive()){
                        CriterionWithItsType criterionAndType =
                                new CriterionWithItsType(type,criterion);
                        criterionWithItsTypes.add(criterionAndType);
                    }
                }
            }
        }
View Full Code Here

        this.criterionAndType = "";
        this.setCriterionSatisfaction(criterionSatisfaction);

        Criterion criterion = criterionSatisfaction.getCriterion();
        CriterionType type = criterion.getType();
        this.setCriterionWithItsType(new CriterionWithItsType(type,criterion));
    }
View Full Code Here

            List<Criterion> children) {
        for (Criterion criterion : children) {
            if (criterion.isActive()) {
                // Create the criterion with its criterionType and its Hierarchy
                // label
                CriterionWithItsType criterionAndType = new CriterionWithItsType(
                        type, criterion);
                // Add to the list
                criterionsWithItsTypes.add(criterionAndType);
                getCriterionWithItsType(type, criterion.getSortedChildren());
            }
View Full Code Here

    public List<CriterionWithItsType> getValidCriterions() {
        List<CriterionWithItsType> list = new ArrayList<CriterionWithItsType>();
        for (IndirectCriterionRequirement requirement : getValidIndirectCriterionRequirement()) {
            Criterion criterion = requirement.getCriterion();
            CriterionType type = criterion.getType();
            list.add(new CriterionWithItsType(type, criterion));
        }
        return list;
    }
View Full Code Here

        this.setNewObject(isNewObject);

        if (!isNewObject) {
            Criterion criterion = criterionRequirement.getCriterion();
            CriterionType type = criterion.getType();
            setCriterionWithItsType(new CriterionWithItsType(type, criterion));
        }
    }
View Full Code Here

        criterionWithItsTypes = new ArrayList<CriterionWithItsType>();
        for(CriterionType type : getTypes()){
            if (type.isEnabled()) {
                for (Criterion criterion : getModel().getCriterionsFor(type)) {
                    if(criterion.isActive()){
                        CriterionWithItsType criterionAndType =
                                new CriterionWithItsType(type,criterion);
                        criterionWithItsTypes.add(criterionAndType);
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.libreplan.business.resources.entities.CriterionWithItsType

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.