Package org.libreplan.importers

Examples of org.libreplan.importers.SynchronizationInfo


     * Shows the success or failure info of synchronization
     */
    private void showSyncInfo() {
        Map<String, Object> args = new HashMap<String, Object>();

        SynchronizationInfo syncOrderElementInfo = jiraOrderElementSynchronizer
                .getSynchronizationInfo();

        boolean succeeded = isSyncSucceeded(syncOrderElementInfo);

        args.put("syncOrderElementSuccess", succeeded);
        if (syncOrderElementInfo != null) {
            args.put("syncOrderElementFailedReasons", new SimpleListModel(
                    syncOrderElementInfo.getFailedReasons()));
        }

        SynchronizationInfo jiraSyncInfoTimesheet = jiraTimesheetSynchronizer
                .getSynchronizationInfo();

        succeeded = isSyncSucceeded(jiraSyncInfoTimesheet);

        args.put("syncTimesheetSuccess", succeeded);
        if (jiraSyncInfoTimesheet != null) {
                args.put("syncTimesheetFailedReasons", new SimpleListModel(
                    jiraSyncInfoTimesheet.getFailedReasons()));
        }

        Window jiraSyncInfoWindow = (Window) Executions.createComponents(
                "/orders/_jiraSyncInfo.zul", null, args);

View Full Code Here



    private void shwoImpExpInfo() {
        Map<String, Object> args = new HashMap<String, Object>();

        SynchronizationInfo synchronizationInfo = exportTimesheetsToTim.getSynchronizationInfo();
        args.put("action", synchronizationInfo.getAction());
        args.put("showSuccess", synchronizationInfo.isSuccessful());
        args.put("failedReasons",
                new SimpleListModel(synchronizationInfo.getFailedReasons()));

        Window timImpExpInfoWindow = (Window) Executions.createComponents(
                "/orders/_timImpExpInfo.zul", null, args);

        try {
View Full Code Here

    public RowRenderer getSynchronizationInfoRenderer() {
        return new RowRenderer() {

            @Override
            public void render(Row row, Object data) {
                final SynchronizationInfo synchronizationInfo = (SynchronizationInfo) data;
                row.setValue(data);

                Groupbox groupbox = new Groupbox();
                groupbox.setClosable(true);
                Caption caption = new org.zkoss.zul.Caption();
                caption.setLabel(synchronizationInfo.getAction());
                groupbox.appendChild(caption);
                row.appendChild(groupbox);

                if (synchronizationInfo.isSuccessful()) {
                    groupbox.appendChild(new Label(_("Completed")));
                } else {

                    Listbox listbox = new Listbox();

                    listbox.setModel(new SimpleListModel(synchronizationInfo
                            .getFailedReasons()));
                    groupbox.appendChild(listbox);
                }
            }
        };
View Full Code Here

TOP

Related Classes of org.libreplan.importers.SynchronizationInfo

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.