Package com.adito.wizard

Examples of com.adito.wizard.AbstractWizardSequence


        super.reset(mapping, request);
       
        /* Determine the currently selected user database so it can be used to determine the
         * category to display
         */
        AbstractWizardSequence seq = getWizardSequence(request);
        String udbName = (String)seq.getAttribute(SelectUserDatabaseForm.ATTR_USER_DATABASE, JDBCUserDatabase.DATABASE_TYPE);
        userDatabaseDefinition = UserDatabaseManager.getInstance().getUserDatabaseDefinition(udbName);
    }
View Full Code Here


     *      javax.servlet.http.HttpServletResponse)
     */
    public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
                                     HttpServletResponse response) throws Exception {
        List<WizardActionStatus> actionStatus = new ArrayList<WizardActionStatus>();
        AbstractWizardSequence seq = getWizardSequence(request);
        String name = (String) seq.getAttribute(WebForwardResourceDetailsForm.ATTR_RESOURCE_NAME, null);
        String description = (String) seq.getAttribute(WebForwardResourceDetailsForm.ATTR_RESOURCE_DESCRIPTION, null);
        boolean favorite = ((Boolean) seq.getAttribute(WebForwardResourceDetailsForm.ATTR_FAVORITE, Boolean.FALSE)).booleanValue();

        int type = ((Integer) seq.getAttribute(WebForwardTypeSelectionForm.ATTR_TYPE, new Integer(0))).intValue();
        String category = (String) seq.getAttribute(WebForwardSpecificDetailsForm.ATTR_CATEGORY, null);
        String destinationURL = (String) seq.getAttribute(WebForwardSpecificDetailsForm.ATTR_DESTINATION_URL, null);

        PropertyList restrictToHosts = ((PropertyList) seq.getAttribute(WebForwardSpecificDetailsForm.ATTR_RESTRICT_TO_HOSTS, null));
        String encodeing = (String) seq.getAttribute(WebForwardSpecificDetailsForm.ATTR_ENCODEING, "");

        String authenticationUsername = (String) seq.getAttribute(WebForwardAuthenticationDetailsForm.ATTR_AUTHENTICATION_USERNAME,
            null);
        String authenticationPassword = (String) seq.getAttribute(WebForwardAuthenticationDetailsForm.ATTR_AUTHENTICATION_PASSWORD,
            null);
        String preferredAuthenticationScheme = (String) seq.getAttribute(
            WebForwardAuthenticationDetailsForm.ATTR_PREFERRED_AUTHENTICATION_SCHEME, null);

        String paths = (String) seq.getAttribute(WebForwardSpecificDetailsForm.ATTR_PATHS, "");
        String hostHeader = (String) seq.getAttribute(WebForwardSpecificDetailsForm.ATTR_HOST_HEADER, "");
        boolean activeDNS = ((Boolean) seq.getAttribute(WebForwardSpecificDetailsForm.ATTR_ACTIVE_DNS, Boolean.FALSE))
                        .booleanValue();

        String formParameters = (String) seq.getAttribute(WebForwardAuthenticationDetailsForm.ATTR_FORM_PARAMETERS, "");
        String formType = (String) seq.getAttribute(WebForwardAuthenticationDetailsForm.ATTR_FORM_TYPE, "");
        boolean autoStart = false; // TODO this needs to be hooked in
        User user = this.getSessionInfo(request).getUser();
       
        WebForward webForward = null;
        try {
View Full Code Here

        task.addProgressBar(atomicProgress);

        // Do the install
        List<WizardActionStatus> actionStatus = new ArrayList<WizardActionStatus>();
        ((InstallForm) form).setActionStatus(actionStatus);
        AbstractWizardSequence seq = getWizardSequence(request);


        overallProgress.setMaxValue(6);
        task.configured();
View Full Code Here

     *      javax.servlet.http.HttpServletRequest)
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        if (getResourceName() != null && isCommiting()) {
            ActionErrors errs = super.validate(mapping, request);
            AbstractWizardSequence seq = getWizardSequence(request);
           
            try {
                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

        if (!validateKeyStore(keyStoreType, password, keystoreFile)) {
            saveError(request, "installation.uploadExistingCertificate.importFailure");
            return mapping.getInputForward();
        }

        AbstractWizardSequence seq = (AbstractWizardSequence) request.getSession().getAttribute(Constants.WIZARD_SEQUENCE);
        seq.putAttribute(ImportExistingCertificateForm.ATTR_PASSPHRASE, password);
        seq.putAttribute(ImportExistingCertificateForm.ATTR_UPLOADED_FILE, keystoreFile);
        seq.putAttribute(ImportExistingCertificateForm.ATTR_KEY_STORE_TYPE, keyStoreType);
        seq.putAttribute(ImportExistingCertificateForm.ATTR_ALIAS, alias.trim());
        saveMessage(request, "installation.uploadExisting.uploaded", fileName, uploadFile.getFileSize());
        return mapping.findForward("success");
    }
View Full Code Here

     *      javax.servlet.http.HttpServletResponse)
     */
    public ActionForward previous(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        ActionForward previous = super.previous(mapping, form, request, response);
        AbstractWizardSequence sequence = getWizardSequence(request);
       
        UserDatabase database = (UserDatabase) sequence.getAttribute(SelectUserDatabaseForm.ATTR_USER_DATABASE_INSTANCE, null);
        if (database != null && database.isOpen()) {
            database.close();
        }
       
        String databaseDefinition = (String) sequence.getAttribute(SelectUserDatabaseForm.ATTR_USER_DATABASE, "");
        UserDatabaseDefinition definition = UserDatabaseManager.getInstance().getUserDatabaseDefinition(databaseDefinition);
        if (definition.getInstallationCategory() > 0) {
            return mapping.findForward("configureUserDatabase");
        }
        return previous;
View Full Code Here

    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);
        String policyName = (String) seq.getAttribute(PolicyDetailsForm.ATTR_RESOURCE_NAME, null);
        String policyDescription = (String) seq.getAttribute(PolicyDetailsForm.ATTR_RESOURCE_DESCRIPTION, null);
        try {
            Policy pol =PolicyDatabaseFactory.getInstance().createPolicy(policyName, policyDescription, Policy.TYPE_NORMAL, getSessionInfo(request).getUser().getRealm().getRealmID());
    
            actionStatus.add(new WizardActionStatus(WizardActionStatus.COMPLETED_OK,
                            "policyWizard.policyFinish.status.policyCreated"));

            CoreEvent coreEvent = new ResourceChangeEvent(this, CoreEventConstants.CREATE_POLICY, pol, getSessionInfo(request),
                    CoreEvent.STATE_SUCCESSFUL);
            CoreServlet.getServlet().fireCoreEvent(coreEvent);
           
            try {
              UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(LogonControllerFactory.getInstance().getSessionInfo(request).getUser().getRealm());
                for (Iterator i = ((PropertyList) seq.getAttribute(PolicyPrincipalSelectionForm.ATTR_SELECTED_ACCOUNTS, null))
                                .iterator(); i.hasNext();) {
                    User user = udb.getAccount((String) i.next());
                    PolicyDatabaseFactory.getInstance().grantPolicyToPrincipal(pol,
                                    user);
                    CoreServlet.getServlet().fireCoreEvent(new CoreEvent(this, CoreEventConstants.GRANT_POLICY_TO_PRINCIPAL, pol, getSessionInfo(request),
                            CoreEvent.STATE_SUCCESSFUL).addAttribute(CoreAttributeConstants.EVENT_ATTR_PRINCIPAL_TYPE, "user").addAttribute(
                            CoreAttributeConstants.EVENT_ATTR_POLICY_NAME,
                            pol.getResourceName()).addAttribute(CoreAttributeConstants.EVENT_ATTR_PRINCIPAL_ID, user.getPrincipalName()));
                }
                for (Iterator i = ((PropertyList) seq.getAttribute(PolicyPrincipalSelectionForm.ATTR_SELECTED_ROLES, null))
                                .iterator(); i.hasNext();) {
                    Role role = udb.getRole((String) i.next());
                    PolicyDatabaseFactory.getInstance().grantPolicyToPrincipal(pol,
                                    role);
View Full Code Here

    }

    public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
                    HttpServletResponse response) throws Exception {
        List<WizardActionStatus> actionStatus = new ArrayList<WizardActionStatus>();
        AbstractWizardSequence seq = getWizardSequence(request);
        SessionInfo info = this.getSessionInfo(request);
        String name = (String) seq.getAttribute(AccessRightsDetailsForm.ATTR_RESOURCE_NAME, null);
        String description = (String) seq.getAttribute(AccessRightsDetailsForm.ATTR_RESOURCE_DESCRIPTION, null);
        PropertyList permissionList = (PropertyList) seq.getAttribute(AccessRightsPermissionsForm.ATTR_SELECTED_ACCESS_RIGHTS, null);
        String permissionClass = (String) seq.getAttribute(AccessRightsDetailsForm.ATTR_RESOURCE_PERMISSION_CLASS, null);
        AccessRights accessRights = null;
        Calendar now = Calendar.getInstance();
        try {
            DefaultAccessRights defaultAccessRights = new DefaultAccessRights(info.getUser().getRealm().getRealmID(), 0, name, description, new ArrayList<AccessRight>(), permissionClass, now, now);
            defaultAccessRights.setAllAccessRights(info.getHttpSession(), permissionList);
View Full Code Here

    /* (non-Javadoc)
     * @see com.adito.wizard.forms.AbstractWizardForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        super.reset(mapping, request);
        AbstractWizardSequence seq = getWizardSequence(request);
        selectedAccessRights = (PropertyList)seq.getAttribute(getAttributeKey(), new PropertyList())
        SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
        String permissionClass = (String) seq.getAttribute(AccessRightsDetailsForm.ATTR_RESOURCE_PERMISSION_CLASS,
                        PolicyConstants.DELEGATION_CLASS);
        AccessRightsMultiSelectDataSource accessRightsMultiSelectDataSource = new AccessRightsMultiSelectDataSource(permissionClass);
        accessRightsModel = new MultiSelectSelectionModel(session, accessRightsMultiSelectDataSource, selectedAccessRights);
    }
View Full Code Here

     *      javax.servlet.http.HttpServletResponse)
     */
    public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
                    HttpServletResponse response) throws Exception {
        List actionStatus = new ArrayList();
        AbstractWizardSequence seq = getWizardSequence(request);
        String name = (String) seq.getAttribute(SampleDefaultDetailsForm.ATTR_RESOURCE_NAME, null);
        String description = (String) seq.getAttribute(SampleDefaultDetailsForm.ATTR_RESOURCE_DESCRIPTION, null);
        boolean favorite = ((Boolean) seq.getAttribute(SampleDefaultDetailsForm.ATTR_FAVORITE, Boolean.FALSE)).booleanValue();
        int parentResourcePermission = ((Integer) seq.getAttribute(SampleDefaultDetailsForm.ATTR_PARENT_RESOURCE_PERMISSION,
                        new Integer(0))).intValue();
        Sample sample = null;
        try {
            try {
                sample = SamplePlugin.getDatabase().addSample(name, description, parentResourcePermission);
View Full Code Here

TOP

Related Classes of com.adito.wizard.AbstractWizardSequence

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.