Package org.libreplan.web.orders

Examples of org.libreplan.web.orders.CriterionRequirementWrapper


    @Override
    @Transactional(readOnly = true)
    public void assignCriterionRequirementWrapper() {
        if((getModel() != null) && (getElement() != null)){
            CriterionRequirementWrapper newRequirementWrapper = createCriterionRequirementWreapper(null);
            criterionRequirementWrappers.add(newRequirementWrapper);
        }
    }
View Full Code Here


    private CriterionRequirementWrapper createCriterionRequirementWreapper(
            HoursGroupWrapper hoursGroupWrapper) {
        CriterionRequirement newRequirement = DirectCriterionRequirement
                .create();
        CriterionRequirementWrapper newRequirementWrapper = new CriterionRequirementWrapper(
                newRequirement, hoursGroupWrapper, true);
        return newRequirementWrapper;
    }
View Full Code Here

        return null;
    }

    public CriterionRequirementWrapper validateHoursGroupWrappers() {
        for (HoursGroupWrapper hoursGroupWrapper : hoursGroupsWrappers) {
            CriterionRequirementWrapper requirementWrapper = validateWrappers(hoursGroupWrapper
                    .getCriterionRequirementWrappersView());
            if (requirementWrapper != null) {
                return requirementWrapper;
            }
        }
View Full Code Here

     * requirement, add new Exception and delete Exception
     */
    public void addCriterionToHoursGroupWrapper(
            HoursGroupWrapper hoursGroupWrapper) {
        if ((getModel() != null) && (getElement() != null)) {
            CriterionRequirementWrapper requirement = createCriterionRequirementWreapper(hoursGroupWrapper);
            hoursGroupWrapper.assignCriterionRequirementWrapper(requirement);
        }
    }
View Full Code Here

    }

    public CriterionRequirementWrapper addExceptionToHoursGroupWrapper(
            HoursGroupWrapper hoursGroupWrapper) {
        if ((getModel() != null) && (getElement() != null)) {
            CriterionRequirementWrapper exceptionWrapper = new CriterionRequirementWrapper(
                    CriterionRequirementWrapper.getIndirectTypeLabel());
            exceptionWrapper.setNewException(true);
            hoursGroupWrapper.addExceptionRequirementWrappers(exceptionWrapper);
            return exceptionWrapper;
        }
        return null;
    }
View Full Code Here

        confirm();
        return true;
    }

    private boolean showInvalidValues() {
        CriterionRequirementWrapper invalidWrapper = validateWrappers(criterionRequirementWrappers());
        if (invalidWrapper != null) {
            showInvalidValues(invalidWrapper);
            return true;
        }

        CriterionRequirementWrapper invalidHoursGroupWrapper = validateHoursGroupWrappers();
        if (invalidHoursGroupWrapper != null) {
            showInvalidValuesInHoursGroups(invalidHoursGroupWrapper);
            return true;
        }
        return false;
View Full Code Here

            HoursGroupWrapper hoursGroupWrapper);

    public void removeCriterionToHoursGroup(Component self) {
        try {
            Row row = (Row) self.getParent().getParent();
            CriterionRequirementWrapper requirementWrapper = (CriterionRequirementWrapper) row
                    .getValue();
            HoursGroupWrapper hoursGroupWrapper = getHoursGroupOfRequirementWrapper(row);
            deleteCriterionToHoursGroup(hoursGroupWrapper, requirementWrapper);
            repaint(self, hoursGroupWrapper);
        } catch (Exception e) {
View Full Code Here

    public void onOK(KeyEvent event) {
        Component listitem = event.getReference();
        if (listitem instanceof Listitem) {
            Bandbox bandbox = (Bandbox) listitem.getParent().getParent()
                    .getParent();
            CriterionRequirementWrapper criterionRequirementWrapper = (CriterionRequirementWrapper) ((Row) bandbox
                    .getParent().getParent()).getValue();

            selectCriterionAndType((Listitem) listitem, bandbox,
                    criterionRequirementWrapper);
View Full Code Here

    private void initializeWrappers() {
        criterionRequirementWrappers = new ArrayList<CriterionRequirementWrapper>();
        for(CriterionRequirement requirement :
            orderElementTemplate.getCriterionRequirements()) {
            CriterionRequirementWrapper Wrapper = new CriterionRequirementWrapper(
                    requirement, null, false);
            criterionRequirementWrappers.add(Wrapper);
        }
    }
View Full Code Here

    private void initializeWrappers() {
        criterionRequirementWrappers = new ArrayList<CriterionRequirementWrapper>();
        for(CriterionRequirement requirement :
            orderElement.getCriterionRequirements()){
            CriterionRequirementWrapper Wrapper = new CriterionRequirementWrapper(
                    requirement, null, false);
            criterionRequirementWrappers.add(Wrapper);
        }
    }
View Full Code Here

TOP

Related Classes of org.libreplan.web.orders.CriterionRequirementWrapper

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.