1 19 24 25 package org.netbeans.modules.j2ee.sun.share.configbean.customizers.webapp; 26 27 import java.util.ResourceBundle ; 28 29 import org.netbeans.modules.j2ee.sun.share.configbean.customizers.common.TextMapping; 30 31 35 public final class ScopeMapping { 36 37 38 private ScopeMapping() { 39 } 42 43 44 static final ResourceBundle webappBundle = ResourceBundle.getBundle( 45 "org.netbeans.modules.j2ee.sun.share.configbean.customizers.webapp.Bundle"); 47 private static final TextMapping scopeBlank = 49 new TextMapping("", ""); private static final TextMapping scopeContextAttribute = 51 new TextMapping("context.attribute", webappBundle.getString("SCOPE_CONTEXT_ATTRIBUTE")); private static final TextMapping scopeRequestHeader = 53 new TextMapping("request.header", webappBundle.getString("SCOPE_REQUEST_HEADER")); private static final TextMapping scopeRequestParameter = 55 new TextMapping("request.parameter", webappBundle.getString("SCOPE_REQUEST_PARAMETER")); private static final TextMapping scopeRequestCookie = 57 new TextMapping("request.cookie", webappBundle.getString("SCOPE_REQUEST_COOKIE")); private static final TextMapping scopeRequestAttribute = 59 new TextMapping("request.attribute", webappBundle.getString("SCOPE_REQUEST_ATTRIBUTE")); private static final TextMapping scopeSessionAttribute = 61 new TextMapping("session.attribute", webappBundle.getString("SCOPE_SESSION_ATTRIBUTE")); private static final TextMapping scopeSessionId = 63 new TextMapping("session.id", webappBundle.getString("SCOPE_SESSION_ID")); 65 private static final TextMapping matchEquals = 67 new TextMapping("equals", webappBundle.getString("EXPR_EQUALS")); private static final TextMapping matchGreater = 69 new TextMapping("greater", webappBundle.getString("EXPR_GREATER")); private static final TextMapping matchLesser = 71 new TextMapping("lesser", webappBundle.getString("EXPR_LESSER")); private static final TextMapping matchNotEquals = 73 new TextMapping("not-equals", webappBundle.getString("EXPR_NOT_EQUALS")); private static final TextMapping matchInRange = 75 new TextMapping("in-range", webappBundle.getString("EXPR_IN_RANGE")); 77 78 private static final TextMapping [] scopeTypes = { 79 scopeBlank, 80 scopeContextAttribute, 81 scopeRequestHeader, scopeRequestParameter, scopeRequestCookie, scopeRequestAttribute, 82 scopeSessionAttribute, 83 }; 84 85 86 private static final TextMapping [] keyScopeTypes = { 87 scopeBlank, 88 scopeContextAttribute, 89 scopeRequestHeader, scopeRequestParameter, scopeRequestCookie, 90 scopeSessionId, scopeSessionAttribute, 91 }; 92 93 94 private static final TextMapping [] matchExpressions = { 95 matchEquals, matchGreater, matchLesser, matchNotEquals, matchInRange, 96 }; 97 98 101 public static TextMapping [] getScopeMappings() { 102 return scopeTypes; 103 } 104 105 108 public static TextMapping [] getKeyScopeMappings() { 109 return keyScopeTypes; 110 } 111 112 115 public static TextMapping [] getMatchExpressionMappings() { 116 return matchExpressions; 117 } 118 119 } 120 | Popular Tags |