Package uk.gov.nationalarchives.droid.gui.action

Examples of uk.gov.nationalarchives.droid.gui.action.ActionFactory


                        lastUpdateTime.toString("E yyyy-MM-dd"));
            }

            if (checkNow) {
                log.info(logMessage);
                final ActionFactory actionFactory = globalContext.getActionFactory();
                final CheckSignatureUpdateAction checkUpdatedSignatureAction = actionFactory
                        .newCheckSignatureUpdateAction();

                checkUpdatedSignatureAction.start(this);
                Map<SignatureType, SignatureFileInfo> availableUpdates =
                    checkUpdatedSignatureAction.getSignatureFileInfos();

                // do the download, prompting if necesssary
                if (!checkUpdatedSignatureAction.hasError()
                        && availableUpdates != null && !availableUpdates.isEmpty()) {
                    boolean showPrompt = properties.getBoolean("update.downloadPrompt");
                   
                   
                    Collection<SignatureFileInfo> filesToUpdate = showPrompt
                            ? promptForUpdate(availableUpdates.values())
                            : availableUpdates.values();
                   
                    if (!filesToUpdate.isEmpty()) {
                        UpdateSignatureAction downloadAction = actionFactory.newSignaureUpdateAction();
                        downloadAction.setUpdates(filesToUpdate);
                        downloadAction.start(this);
                    }
                }
               
View Full Code Here


    private void jMenuToolsActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuToolsActionPerformed
        // TODO add your handling code here:
    }// GEN-LAST:event_jMenuToolsActionPerformed

    private void updateNowMenuItemActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_updateNowMenuItemActionPerformed
        final ActionFactory actionFactory = globalContext.getActionFactory();
        final CheckSignatureUpdateAction checkUpdatedSignatureAction = actionFactory.newCheckSignatureUpdateAction();

        checkUpdatedSignatureAction.start(this);
        Map<SignatureType, SignatureFileInfo> availableUpdates = checkUpdatedSignatureAction.getSignatureFileInfos();

        if (!checkUpdatedSignatureAction.hasError() && !checkUpdatedSignatureAction.isCancelled()) {
            // do the download, prompting if necesssary
            if (!availableUpdates.isEmpty()) {
                if (!promptForUpdate(availableUpdates.values()).isEmpty()) {
                    UpdateSignatureAction downloadAction = actionFactory.newSignaureUpdateAction();
                    downloadAction.setUpdates(availableUpdates.values());
                    downloadAction.start(this);
                }
            } else {
                DialogUtils.showUpdateUnavailableDialog(this);
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.gui.action.ActionFactory

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.