Package org.libreplan.business.externalcompanies.entities

Examples of org.libreplan.business.externalcompanies.entities.EndDateCommunication


            EndDateCommunicationToCustomerDTO endDateCommunicationToCustomerDTO) {
        Date endDate = DateConverter.toDate(endDateCommunicationToCustomerDTO.endDate);
        Date communicationDate = DateConverter
                .toDate(endDateCommunicationToCustomerDTO.communicationDate);
        Date saveDate = DateConverter.toDate(endDateCommunicationToCustomerDTO.saveDate);
        EndDateCommunication endDateCommunicationToCustomer = EndDateCommunication
                .create(saveDate, endDate, communicationDate);
        return endDateCommunicationToCustomer;
    }
View Full Code Here


    @Override
    public void addAskedEndDate(Date value) {
        if (getOrder() != null) {
            Order order = (Order) getOrder();

            EndDateCommunication askedEndDate = EndDateCommunication.create(
                    new Date(), value, null);
            order.addAskedEndDate(askedEndDate);
        }
    }
View Full Code Here

            Order order = (Order) getOrder();
            if (order.getEndDateCommunicationToCustomer().isEmpty()) {
                return false;
            }

            EndDateCommunication endDateCommunicationToCustomer = order
                    .getEndDateCommunicationToCustomer().first();
            Date currentEndDate = endDateCommunicationToCustomer.getEndDate();
            return (currentEndDate.compareTo(value) == 0);
        }
        return false;
    }
View Full Code Here

            Order order) {
        List<OrderElementWithAdvanceMeasurementsOrEndDateDTO> orderElementWithAdvanceMeasurementsDTOs = new ArrayList<OrderElementWithAdvanceMeasurementsOrEndDateDTO>();
        // create the asked end dates
        EndDateCommunicationToCustomerDTO endDateCommunicationToCustomerDTO = null;
        if (isAnyEndDateNotReported(order)) {
            EndDateCommunication lastEndDateCommunicationToCustomerReported = order
                    .getLastEndDateCommunicationToCustomer();
            lastEndDateCommunicationToCustomerReported.setCommunicationDate(new Date());
            endDateCommunicationToCustomerDTO = OrderElementConverter.toDTO(lastEndDateCommunicationToCustomerReported);
        }

        // create the progress
        DirectAdvanceAssignment directAdvanceAssignment = order
View Full Code Here

        return "Updated";
    }

    private boolean isAnyEndDateNotReported(Order order) {
        if (order != null && order.getEndDateCommunicationToCustomer() != null) {
            EndDateCommunication lastAskedEndDate = order
                    .getLastEndDateCommunicationToCustomer();
            return lastAskedEndDate != null ? (lastAskedEndDate.getCommunicationDate() == null)
                    : false;
        }
        return false;
    }
View Full Code Here

    private class EndDatesRenderer implements RowRenderer {

        @Override
        public void render(Row row, Object data) throws Exception {
            EndDateCommunication endDateFromSubcontractor = (EndDateCommunication) data;
            row.setValue(endDateFromSubcontractor);

            appendLabel(row,
                    Util.formatDate(endDateFromSubcontractor.getEndDate()));
            appendLabel(row, Util.formatDateTime(endDateFromSubcontractor
                    .getCommunicationDate()));
            appendOperations(row, endDateFromSubcontractor);
        }
View Full Code Here

            return updateButton;
        }

        private boolean isUpgradeable(EndDateCommunication endDateFromSubcontractor) {
            EndDateCommunication lastEndDateReported = getSubcontractedTaskData()
                    .getLastEndDatesCommunicatedFromSubcontractor();
            if (lastEndDateReported != null) {
                if (lastEndDateReported.equals(endDateFromSubcontractor)) {
                    Date newEndDate = lastEndDateReported.getEndDate();
                    Date endDateTask = taskEditFormComposer.getTaskDTO().endDate;
                    if (endDateTask != null) {
                        return (newEndDate.compareTo(endDateTask) != 0);
                    }
                    return true;
View Full Code Here

    private class EndDatesRenderer implements RowRenderer {

        @Override
        public void render(Row row, Object data) throws Exception {
            EndDateCommunication endDate = (EndDateCommunication) data;
            row.setValue(endDate);

            appendLabel(row, Util.formatDateTime(endDate.getSaveDate()));
            appendLabel(row, Util.formatDate(endDate.getEndDate()));
            appendLabel(row,
                    Util.formatDateTime(endDate.getCommunicationDate()));
            appendOperations(row, endDate);
        }
View Full Code Here

            return deleteButton;
        }

        private boolean isNotUpdate(final EndDateCommunication endDate) {
            EndDateCommunication lastAskedEndDate = getOrder()
                    .getEndDateCommunicationToCustomer().first();
            if ((lastAskedEndDate != null) && (lastAskedEndDate.equals(endDate))) {
                return (lastAskedEndDate.getCommunicationDate() != null);
            }
            return true;
        }
View Full Code Here

TOP

Related Classes of org.libreplan.business.externalcompanies.entities.EndDateCommunication

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.