Examples of OrderSyncInfo


Examples of org.libreplan.business.orders.entities.OrderSyncInfo

    /**
     * Updates the UI text last synchronized date and the text imported label
     */
    private void updateOrderLastSyncInfoScreen() {
        OrderSyncInfo orderSyncInfo = jiraOrderElementSynchronizer
                .getOrderLastSyncInfo(getOrder());

        if (orderSyncInfo != null) {
            txtLastSyncDate.setValue(Util.formatDateTime(orderSyncInfo
                        .getLastSyncDate()));
            txtImportedLabel.setValue(orderSyncInfo.getKey());
        }
    }
View Full Code Here

Examples of org.libreplan.business.orders.entities.OrderSyncInfo

        if (workers == null && workers.isEmpty()) {
            synchronizationInfo.addFailedReason(_("No workers found"));
            return;
        }

        OrderSyncInfo orderSyncInfo = orderSyncInfoDAO
                .findLastSynchronizedInfoByOrderAndConnectorName(order,
                        PredefinedConnectors.JIRA.getName());
        if (orderSyncInfo == null) {
            synchronizationInfo.addFailedReason(_(
                            "Order \"{0}\" not found. Order probalbly not synchronized",
                    order.getName()));
            return;
        }
        if (StringUtils.isBlank(orderSyncInfo.getKey())) {
            synchronizationInfo.addFailedReason(_(
                    "Key for Order \"{0}\" is empty",
                    order.getName()));
            return;
        }

        String code = order.getCode() + "-" + orderSyncInfo.getKey();

        WorkReport workReport = updateOrCreateWorkReport(code);

        for (IssueDTO issue : issues) {
            WorkLogDTO worklog = issue.getFields().getWorklog();
View Full Code Here

Examples of org.libreplan.business.orders.entities.OrderSyncInfo

            final Order order) {
        adHocTransactionService
                .runOnAnotherTransaction(new IOnTransaction<Void>() {
                    @Override
                    public Void execute() {
                        OrderSyncInfo orderSyncInfo = orderSyncInfoDAO
                                .findByKeyOrderAndConnectorName(productCode,
                                        order,
                                        PredefinedConnectors.TIM.getName());
                        if (orderSyncInfo == null) {
                            orderSyncInfo = OrderSyncInfo.create(productCode,
                                    order, PredefinedConnectors.TIM.getName());
                        }
                        orderSyncInfo.setLastSyncDate(new Date());
                        orderSyncInfoDAO.save(orderSyncInfo);
                        return null;
                    }
                });
    }
View Full Code Here

Examples of org.libreplan.business.orders.entities.OrderSyncInfo

     * @param orderSyncInfo
     *            the {@link OrderSyncInfo}
     */
    private boolean existsOtherOrderSyncInfoByKeyOrderAndConnectorName(
            OrderSyncInfo orderSyncInfo) {
        OrderSyncInfo found = findByKeyOrderAndConnectorName(
                orderSyncInfo.getKey(), orderSyncInfo.getOrder(),
                orderSyncInfo.getConnectorName());
        return found != null && found != orderSyncInfo;
    }
View Full Code Here

Examples of org.libreplan.business.orders.entities.OrderSyncInfo

    public void saveSyncInfo(final String key, final Order order) {
        adHocTransactionService
                .runOnAnotherTransaction(new IOnTransaction<Void>() {
                    @Override
                    public Void execute() {
                        OrderSyncInfo orderSyncInfo = orderSyncInfoDAO
                                .findByKeyOrderAndConnectorName(key, order,
                                        PredefinedConnectors.JIRA.getName());
                        if (orderSyncInfo == null) {
                            orderSyncInfo = OrderSyncInfo.create(key, order,
                                    PredefinedConnectors.JIRA.getName());
                        }
                        orderSyncInfo.setLastSyncDate(new Date());
                        orderSyncInfoDAO.save(orderSyncInfo);
                        return null;
                    }
                });
    }
View Full Code Here

Examples of org.libreplan.business.orders.entities.OrderSyncInfo

    /**
     * Updates the UI text last synchronized date and the text product code
     */
    private void updateOrderLastSyncInfoScreen() {
        OrderSyncInfo orderSyncInfo = exportTimesheetsToTim
                .getOrderLastSyncInfo(getOrder());
        if (orderSyncInfo != null) {
            labelLastSyncDate.setValue(Util.formatDateTime(orderSyncInfo
                    .getLastSyncDate()));
            labelProductCode.setValue("(" + orderSyncInfo.getKey() + ")");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.