1 19 20 package com.sslexplorer.properties.attributes.wizards.actions; 21 22 import javax.servlet.http.HttpServletRequest ; 23 import javax.servlet.http.HttpServletResponse ; 24 25 import org.apache.struts.action.ActionForm; 26 import org.apache.struts.action.ActionForward; 27 import org.apache.struts.action.ActionMapping; 28 29 import com.sslexplorer.core.CoreUtil; 30 import com.sslexplorer.policyframework.Permission; 31 import com.sslexplorer.policyframework.PolicyConstants; 32 import com.sslexplorer.properties.attributes.AbstractAttributeKey; 33 import com.sslexplorer.properties.attributes.AttributeDefinition; 34 import com.sslexplorer.properties.attributes.AttributesPropertyClass; 35 import com.sslexplorer.properties.impl.userattributes.UserAttributes; 36 import com.sslexplorer.security.LogonControllerFactory; 37 import com.sslexplorer.security.SessionInfo; 38 import com.sslexplorer.wizard.AbstractWizardSequence; 39 import com.sslexplorer.wizard.DefaultWizardSequence; 40 import com.sslexplorer.wizard.WizardStep; 41 import com.sslexplorer.wizard.actions.AbstractWizardAction; 42 43 52 public class AttributeDefinitionDetailsAction extends AbstractWizardAction { 53 54 57 public final static String ATTR_CLASS = "class"; 58 59 62 public final static String ATTR_NAME = "name"; 63 64 67 public final static String ATTR_DESCRIPTION = "description"; 68 69 72 public AttributeDefinitionDetailsAction() { 73 super(PolicyConstants.ATTRIBUTE_DEFINITIONS_RESOURCE_TYPE, new Permission[] {PolicyConstants.PERM_MAINTAIN }); 74 } 75 76 public int getNavigationContext(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { 77 return SessionInfo.MANAGEMENT_CONSOLE_CONTEXT; 78 } 79 80 public ActionForward previous(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) 81 throws Exception { 82 throw new Exception ("No previous steps."); 83 } 84 85 93 protected AbstractWizardSequence createWizardSequence(ActionMapping mapping, ActionForm form, HttpServletRequest request, 94 HttpServletResponse response) throws Exception { 95 ActionForward fwd = mapping.findForward("finish"); 96 SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request); 97 DefaultWizardSequence seq = new DefaultWizardSequence(fwd, "properties", "attributeDefinitionWizard", CoreUtil.getReferer(request), 98 "attributeDefinitionWizard", session); 99 seq.putAttribute(ATTR_CLASS, UserAttributes.NAME); 100 seq.addStep(new WizardStep("/attributeDefinitionDetails.do", true)); 101 seq.addStep(new WizardStep("/attributeDefinitionOptions.do")); 102 seq.addStep(new WizardStep("/attributeDefinitionSummary.do")); 103 return seq; 104 } 105 } 106 | Popular Tags |