Package com.adito.core

Examples of com.adito.core.BundleActionMessage


            String stacktraceAsString = VfsUtils.maskSensitiveArguments(CoreUtil.toString(e));
            log.error("Failed to upload:" + stacktraceAsString);
           
            String exceptionMessage = VfsUtils.maskSensitiveArguments(e.getMessage());
            ActionMessages msgs = new ActionMessages();
            msgs.add(Globals.MESSAGE_KEY, new BundleActionMessage("vfs", "upload.info.fileNotUploaded", exceptionMessage));
            saveErrors(request, msgs);
            if (null != upload.getUploadedForward())
                return upload.getUploadedForward();
            else
                throw e;
View Full Code Here


            request.setAttribute(Constants.REQ_ATTR_UPLOAD_DETAILS, new Integer(uploadId));

            ActionForward fwd = handler.performUpload(request, response, upload, uploadForm.getUploadFile());
            ActionMessages msgs = new ActionMessages();
            if(upload.getResourcePath()==null) {
                msgs.add(Globals.MESSAGE_KEY, new BundleActionMessage("vfs", "upload.info.fileUploadedNoPath", uploadForm.getUploadFile()
                        .getFileName()));
            } else {
                msgs.add(Globals.MESSAGE_KEY, new BundleActionMessage("vfs", "upload.info.fileUploaded", uploadForm.getUploadFile()
                            .getFileName(), upload.getResourcePath()));
            }
            saveMessages(request, msgs);
            request.setAttribute(Constants.REQ_ATTR_UPLOAD_DETAILS, uploadId);
            uploadForm.setUploadId(uploadId);
            return fwd;
        }
        catch (CoreException ce) {
            log.error("Failed to upload.", ce);
            ActionMessages errs = getErrors(request);
            errs.add(Globals.ERROR_KEY, ce.getBundleActionMessage());
            saveErrors(request, errs);
            if (null != upload.getUploadedForward())
                return new RedirectWithMessages(upload.getUploadedForward(), request);
            else
                throw ce;
        }       
        catch (Exception e) {
            log.error("Failed to upload.", e);
            ActionMessages msgs = new ActionMessages();
            msgs.add(Globals.MESSAGE_KEY, new BundleActionMessage("vfs", "upload.info.fileNotUploaded", e.getMessage()));
            saveErrors(request, msgs);
            if (null != upload.getUploadedForward())
                return upload.getUploadedForward();
            else
                throw e;
View Full Code Here

        // Get the task and add some progress bars
        Task task = (Task) request.getAttribute(TaskHttpServletRequest.ATTR_TASK);
        TaskProgressBar overallProgress = new TaskProgressBar("overall", 0, 10, 0);
        task.addProgressBar(overallProgress);
        overallProgress.setNote(new BundleActionMessage("install", "taskProgress.install.overall.note"));
        TaskProgressBar atomicProgress = new TaskProgressBar("atomic", 0, 100, 0);
        task.addProgressBar(atomicProgress);

        // Do the install
        List<WizardActionStatus> actionStatus = new ArrayList<WizardActionStatus>();
View Full Code Here

    private void doConfigureCertificate(TaskProgressBar overallProgress, TaskProgressBar atomicProgress,
                                        List<WizardActionStatus> actionStatus, AbstractWizardSequence seq)
                    throws InterruptedException {
        // Certificates (1)
        overallProgress.setValue(1);
        atomicProgress.setNote(new BundleActionMessage("install", "taskProgress.install.atomic.certificates.note"));
        Thread.sleep(INSTALL_TASK_DELAY);
        actionStatus.add(configureCertificate(seq));
        Thread.sleep(INSTALL_TASK_DELAY);
    }
View Full Code Here

    private void doConfigureUserDatabase(TaskProgressBar overallProgress, TaskProgressBar atomicProgress,
                                         List<WizardActionStatus> actionStatus, AbstractWizardSequence seq) throws Exception,
                    InterruptedException {
        // User database (2)
        overallProgress.setValue(2);
        atomicProgress.setNote(new BundleActionMessage("install", "taskProgress.install.atomic.userDatabase.note"));
        Thread.sleep(INSTALL_TASK_DELAY);
        actionStatus.add(configureUserDatabase(seq));
        Thread.sleep(INSTALL_TASK_DELAY);
    }
View Full Code Here

    private void doConfigureSuperUser(HttpServletRequest request, TaskProgressBar overallProgress, TaskProgressBar atomicProgress,
                                      List<WizardActionStatus> actionStatus, AbstractWizardSequence seq)
                    throws InterruptedException {
        // Super user (3)
        overallProgress.setValue(3);
        atomicProgress.setNote(new BundleActionMessage("install", "taskProgress.install.atomic.superUser.note"));
        Thread.sleep(INSTALL_TASK_DELAY);
        actionStatus.addAll(configureSuperUser(seq, request));
        Thread.sleep(INSTALL_TASK_DELAY);
    }
View Full Code Here

    private void doWebServer(TaskProgressBar overallProgress, TaskProgressBar atomicProgress,
                             List<WizardActionStatus> actionStatus, AbstractWizardSequence seq) throws InterruptedException {
        // Web server (4)
        overallProgress.setValue(4);
        atomicProgress.setNote(new BundleActionMessage("install", "taskProgress.install.atomic.webServer.note"));
        Thread.sleep(INSTALL_TASK_DELAY);
        actionStatus.add(webServer(seq));
        Thread.sleep(INSTALL_TASK_DELAY);
    }
View Full Code Here

    private void doConfigureProxies(HttpServletRequest request, TaskProgressBar overallProgress, TaskProgressBar atomicProgress,
                                    List<WizardActionStatus> actionStatus, AbstractWizardSequence seq) throws InterruptedException {
        // Proxies (5)
        overallProgress.setValue(5);
        atomicProgress.setNote(new BundleActionMessage("install", "taskProgress.install.atomic.proxies.note"));
        Thread.sleep(INSTALL_TASK_DELAY);
        actionStatus.add(configureProxies(seq, request));
        Thread.sleep(INSTALL_TASK_DELAY);
    }
View Full Code Here

    }

    private void doCommitProperties(TaskProgressBar overallProgress, TaskProgressBar atomicProgress) throws InterruptedException {
        // Now commit properties (6)
        overallProgress.setValue(6);
        atomicProgress.setNote(new BundleActionMessage("install", "taskProgress.install.atomic.commitProperties.note"));
        Thread.sleep(INSTALL_TASK_DELAY);
        PropertyClassManager.getInstance().commit();
        Thread.sleep(INSTALL_TASK_DELAY);
    }
View Full Code Here

                if (this.getDestinationURL().indexOf("${") == -1){
                    // only chek the format if there is no hash on the front.
                    new URL(this.getDestinationURL());
                }
            } catch (MalformedURLException e) {
                errs.add(Globals.ERROR_KEY, new BundleActionMessage(seq.getCurrentPageForm().getResourceBundle(), seq
                                .getCurrentPageForm().getResourcePrefix()
                                + ".error.malformedURLException"));
            }
           

            if(getCategory().trim().equals("")) {
                errs.add(Globals.ERROR_KEY, new BundleActionMessage(seq.getCurrentPageForm().getResourceBundle(), seq
                                .getCurrentPageForm().getResourcePrefix()
                                + ".error.noCategory"));               
            }
           
            if (type == WebForward.TYPE_PATH_BASED_REVERSE_PROXY){
View Full Code Here

TOP

Related Classes of com.adito.core.BundleActionMessage

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.