1 16 package org.springframework.webflow.execution; 17 18 import org.springframework.core.enums.StaticLabeledEnum; 19 import org.springframework.webflow.core.collection.MutableAttributeMap; 20 import org.springframework.webflow.definition.FlowDefinition; 21 22 34 public abstract class ScopeType extends StaticLabeledEnum { 35 36 41 public static final ScopeType REQUEST = new ScopeType(0, "Request") { 42 public MutableAttributeMap getScope(RequestContext context) { 43 return context.getRequestScope(); 44 } 45 }; 46 47 57 public static final ScopeType FLASH = new ScopeType(1, "Flash") { 58 public MutableAttributeMap getScope(RequestContext context) { 59 return context.getFlashScope(); 60 } 61 }; 62 63 69 public static final ScopeType FLOW = new ScopeType(2, "Flow") { 70 public MutableAttributeMap getScope(RequestContext context) { 71 return context.getFlowScope(); 72 } 73 }; 74 75 82 public static final ScopeType CONVERSATION = new ScopeType(3, "Conversation") { 83 public MutableAttributeMap getScope(RequestContext context) { 84 return context.getConversationScope(); 85 } 86 }; 87 88 91 private ScopeType(int code, String label) { 92 super(code, label); 93 } 94 95 public Class getType() { 96 return ScopeType.class; 98 } 99 100 107 public abstract MutableAttributeMap getScope(RequestContext context); 108 } | Popular Tags |