1 6 7 package javax.portlet; 8 9 15 public class PortletSessionUtil 16 { 17 18 private static final String PORTLET_SCOPE_NAMESPACE = "javax.portlet.p."; 19 20 30 31 public static java.lang.String decodeAttributeName(java.lang.String name) 32 { 33 if (name.startsWith(PORTLET_SCOPE_NAMESPACE)) { 34 int index = name.indexOf('?'); 35 if (index>-1) { 36 name = name.substring(index+1); 37 } 38 } 39 return name; 40 } 41 42 43 58 59 public static int decodeScope(java.lang.String name) 60 { 61 int scope = PortletSession.APPLICATION_SCOPE; if (name.startsWith(PORTLET_SCOPE_NAMESPACE)) { 63 int index = name.indexOf('?'); 64 if (index>-1) { 65 scope = PortletSession.PORTLET_SCOPE; } 67 } 68 return scope; 69 } 70 } 71 72 73 | Popular Tags |