Package com.adito.keystore.wizards

Examples of com.adito.keystore.wizards.AbstractKeyStoreImportType


    public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
                    HttpServletResponse response) throws Exception {
        // Do the install
        List<WizardActionStatus> actionStatus = new ArrayList<WizardActionStatus>();
        AbstractWizardSequence seq = getWizardSequence(request);
        AbstractKeyStoreImportType importType = KeyStoreImportTypeManager.getInstance().getType(
            (String)seq.getAttribute(KeyStoreImportTypeForm.ATTR_TYPE, ReplyFromCAImportType.REPLY_FROM_CA));
        File f = (File)seq.getAttribute(KeyStoreImportFileForm.ATTR_UPLOADED_FILE, null);
        String alias = (String)seq.getAttribute(KeyStoreImportFileForm.ATTR_ALIAS, null);
        String passphrase = (String)seq.getAttribute(KeyStoreImportFileForm.ATTR_PASSPHRASE, null);
        try {
            importType.doInstall(f, alias, passphrase, seq, LogonControllerFactory.getInstance().getSessionInfo(request));
            actionStatus.add(new WizardActionStatus(WizardActionStatus.COMPLETED_OK, "keyStoreImportType." + importType.getName() + ".installed", alias, "", "", "", "", importType.getBundle()));
        }
        catch(Exception e) {
            log.error("Failed to load key.", e);
            actionStatus.add(new WizardActionStatus(WizardActionStatus.COMPLETED_WITH_ERRORS, "keyStoreImportType." + importType.getName() + ".installFailed", alias, e.getMessage(), "", "", "", importType.getBundle()));           
        }
        ((AbstractWizardFinishForm) form).setActionStatus(actionStatus);
        return super.unspecified(mapping, form, request, response);
    }
View Full Code Here


     */
    public ActionForward exit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {

        AbstractWizardSequence seq = getWizardSequence(request);
        AbstractKeyStoreImportType importType = KeyStoreImportTypeManager.getInstance().getType(
            (String)seq.getAttribute(KeyStoreImportTypeForm.ATTR_TYPE, ReplyFromCAImportType.REPLY_FROM_CA));
        ActionForward fwd = cancel(mapping, form, request, response);
        if(importType != null && importType.isRestartRequired()) {
            String orig = fwd.getPath();
            fwd = mapping.findForward("restartRequired");
            fwd = CoreUtil.addParameterToForward(fwd, "no", orig);
        }
        return fwd;
View Full Code Here

                errs.add(Globals.ERROR_KEY, new ActionMessage("keyStoreImportWizard.keyStoreImportFile.noFileProvided"));
            } else {

                AbstractWizardSequence seq = (AbstractWizardSequence) request.getSession().getAttribute(Constants.WIZARD_SEQUENCE);

                AbstractKeyStoreImportType importType = KeyStoreImportTypeManager.getInstance().getType(
                    (String)seq.getAttribute(KeyStoreImportTypeForm.ATTR_TYPE, ReplyFromCAImportType.REPLY_FROM_CA));
                SessionInfo sessionInfo = getSessionInfo(request);
                importType.validate(errs, alias, passphrase, seq, sessionInfo);

                if (errs.size() == 0) {

                    in = uploadFile.getInputStream();
                    out = new FileOutputStream(uploadedFile);
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.struts.actions.DispatchAction#unspecified(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        ActionForward fwd = super.unspecified(mapping, form, request, response);
        AbstractKeyStoreImportType importType = KeyStoreImportTypeManager.getInstance().getType(
            (String)getWizardSequence(request).getAttribute(KeyStoreImportTypeForm.ATTR_TYPE, ReplyFromCAImportType.REPLY_FROM_CA));
        importType.init(request);
        return fwd;
    }
View Full Code Here

TOP

Related Classes of com.adito.keystore.wizards.AbstractKeyStoreImportType

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.